Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install fails #59

Open
luxe opened this issue Aug 16, 2018 · 15 comments
Open

pip install fails #59

luxe opened this issue Aug 16, 2018 · 15 comments

Comments

@luxe
Copy link

luxe commented Aug 16, 2018

pip install language-check                                                                                                                                          1
Collecting language-check
  Using cached https://files.pythonhosted.org/packages/97/45/0fd1d3683d6129f30fa09143fa383cdf6dff8bc0d1648f2cf156109cb772/language-check-1.1.tar.gz
Building wheels for collected packages: language-check
  Running setup.py bdist_wheel for language-check ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-_W9osa/language-check/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpYOwq7gpip-wheel- --python-tag cp27:
  Could not parse Java version from """openjdk version "10.0.1" 2018-04-17
  OpenJDK Runtime Environment (build 10.0.1+10-Ubuntu-3ubuntu1)
  OpenJDK 64-Bit Server VM (build 10.0.1+10-Ubuntu-3ubuntu1, mixed mode)
  """.
  
  ----------------------------------------
  Failed building wheel for language-check
  Running setup.py clean for language-check
Failed to build language-check
Installing collected packages: language-check
  Running setup.py install for language-check ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-_W9osa/language-check/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-xKEHYl-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    Could not parse Java version from """openjdk version "10.0.1" 2018-04-17
    OpenJDK Runtime Environment (build 10.0.1+10-Ubuntu-3ubuntu1)
    OpenJDK 64-Bit Server VM (build 10.0.1+10-Ubuntu-3ubuntu1, mixed mode)
    """.
    
    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-_W9osa/language-check/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-xKEHYl-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-_W9osa/language-check/
@Bachstelze
Copy link

There is a wrong regex for parsing the java version. There are also already 3 pull requests to fix it, but the maintainers are too lazy to merge it.

@zachsamuels
Copy link

I am having this same issue, please fix it.

@rkwojdan
Copy link

We had the same problem and uninstalling java 10 and next installing java 8 solved the issue. Hope it will you, as well.

@pratik1998
Copy link

Error arises due to wrong version of openjdk. I installed oracle java 8 by following instructions from this. Now everything works fine.

@kallewesterling
Copy link

Same error happening now. I just encountered it through the py-contractions package that relies on language-check. (See issue here.)

@nourel
Copy link

nourel commented Aug 12, 2019

Same error happening now. I just encountered it through the py-contractions package that relies on language-check. (See issue here.)

same issue here. We getting this fixed soon ?

@Bachstelze
Copy link

Try to install it from this source. There isn't yet a version on pip with this bug fix.

@KorayTugberk-g
Copy link

I still can't download this package....

@SouravMalliK
Copy link

Hi,
How you use language tool in Google Cloud Function? I'm trying to deploy in GCP Cloud Function with runtime Python 3.7. I could use the library using my local virtual environment where I have java installed. But when I'm trying to deploy it in Cloud Function.. I'm getting the following error message --

Function failed on loading user code. Error message: Code in file main.py can't be loaded. Did you list all required modules in requirements.txt? Detailed stack trace: Traceback (most recent call last): File "/env/local/lib/python3.7/site-packages/google/cloud/functions/worker_v2.py", line 359, in check_or_load_user_function _function_handler.load_user_function() File "/env/local/lib/python3.7/site-packages/google/cloud/functions/worker_v2.py", line 236, in load_user_function spec.loader.exec_module(main_module) File "<frozen importlib._bootstrap_external>", line 728, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/user_code/main.py", line 10, in <module> from libraries.unknown_word import word_meaning File "/user_code/libraries/unknown_word.py", line 18, in <module> tool = language_tool_python.LanguageTool('en-IN') File "/env/local/lib/python3.7/site-packages/language_tool_python/server.py", line 46, in __init__ self._start_server_on_free_port() File "/env/local/lib/python3.7/site-packages/language_tool_python/server.py", line 183, in _start_server_on_free_port self._start_local_server() File "/env/local/lib/python3.7/site-packages/language_tool_python/server.py", line 193, in _start_local_server download_lt() File "/env/local/lib/python3.7/site-packages/language_tool_python/download_lt.py", line 144, in download_lt confirm_java_compatibility() File "/env/local/lib/python3.7/site-packages/language_tool_python/download_lt.py", line 75, in confirm_java_compatibility raise ModuleNotFoundError('No java install detected. Please install java to use language-tool-python.') ModuleNotFoundError: No java install detected. Please install java to use language-tool-python.

Can you please provide a solution to use LanguageTool from server less functions? How can we have java environment in Cloud Function along with Python 3.7?

BR.

@MCFreddie777
Copy link

Any progress on this?

@willnaoosmith
Copy link

Same here

@katkaypettitt
Copy link

I am also having this issue, except I have java 15.0.1 installed. Would be nice to see an update.

@WarleiAlves
Copy link

I suggest you try to install version 6 or 8 of the JDK. I've already figured out how to install with JDK 11, but after that the package doesn't work, throwing the following exception in Java:

language_check.Error: Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

I found that the error is caused by some changes in the java libraries after version 8.

@TejaswitaW
Copy link

I tried with 6,7,8 of the jdk, but still getting same error.

@d1sgr4c3
Copy link

d1sgr4c3 commented Feb 6, 2025

still same issue in 2025

  × Running setup.py install for language-check did not run successfully.
  │ exit code: 1
  ╰─> [4 lines of output]
      Could not parse Java version from """openjdk version "21.0.6" 2025-01-21
      OpenJDK Runtime Environment (build 21.0.6+7-Ubuntu-122.04.1)
      OpenJDK 64-Bit Server VM (build 21.0.6+7-Ubuntu-122.04.1, mixed mode, sharing)
      """.
      [end of output]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests