Error installing language-check using pip install
Question:
i am having an error installing language-check when I use pip. My python version is 3.9.5.
i have tried putting these commands into powershell as well as a few more and they have all given me the same error. I am not sure how to proceed
pip install language-check
pip install language_check
pip install --upgrade language-check
pip install --upgrade language-check
Error that I got
PS D:Python> pip install --upgrade language-check
Collecting language-check
Using cached language-check-1.1.tar.gz (33 kB)
Building wheels for collected packages: language-check
Building wheel for language-check (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'd:pythonpython.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\rodge\AppData\Local\Temp\pip-install-q4dwn2qj\language-check_ee739d071d0c47e9b1b2023e1ac3ecda\setup.py'"'"'; __file__='"'"'C:\Users\rodge\AppData\Local\Temp\pip-install-q4dwn2qj\language-check_ee739d071d0c47e9b1b2023e1ac3ecda\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:UsersrodgeAppDataLocalTemppip-wheel-t0bpvet6'
cwd: C:UsersrodgeAppDataLocalTemppip-install-q4dwn2qjlanguage-check_ee739d071d0c47e9b1b2023e1ac3ecda
Complete output (4 lines):
Could not parse Java version from """openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.8+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.8+10, mixed mode)
""".
----------------------------------------
ERROR: 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
ERROR: Command errored out with exit status 1:
command: 'd:pythonpython.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\rodge\AppData\Local\Temp\pip-install-q4dwn2qj\language-check_ee739d071d0c47e9b1b2023e1ac3ecda\setup.py'"'"'; __file__='"'"'C:\Users\rodge\AppData\Local\Temp\pip-install-q4dwn2qj\language-check_ee739d071d0c47e9b1b2023e1ac3ecda\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersrodgeAppDataLocalTemppip-record-52viif_0install-record.txt' --single-version-externally-managed --compile --install-headers 'd:pythonIncludelanguage-check'
cwd: C:UsersrodgeAppDataLocalTemppip-install-q4dwn2qjlanguage-check_ee739d071d0c47e9b1b2023e1ac3ecda
Complete output (4 lines):
Could not parse Java version from """openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.8+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.8+10, mixed mode)
""".
----------------------------------------
ERROR: Command errored out with exit status 1: 'd:pythonpython.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\rodge\AppData\Local\Temp\pip-install-q4dwn2qj\language-check_ee739d071d0c47e9b1b2023e1ac3ecda\setup.py'"'"'; __file__='"'"'C:\Users\rodge\AppData\Local\Temp\pip-install-q4dwn2qj\language-check_ee739d071d0c47e9b1b2023e1ac3ecda\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersrodgeAppDataLocalTemppip-record-52viif_0install-record.txt' --single-version-externally-managed --compile --install-headers 'd:pythonIncludelanguage-check' Check the logs for full command output.
Answers:
This seems like an old known bug. The package seems to be abandoned, last commit was on Feb 16, 2019.
The package was forked, updated and published under the name language-tool-python
: https://pypi.org/project/language-tool-python/
Try
pip install language-tool-python
As of right now this is a known and open issue on the language-check
git repo. It’s caused by the wrong regex for the Java version, and is caused by JDK version >= 8
To fix this you can either try to use the forked project as @phd mentioned or
You can uninstall JDK 11 and install JDK 6 instead.
Thank you so much @phd !!
This command worked for me on Spyder application:
!pip install language-tool-python
Output:
Installing collected packages: language-tool-python
Successfully installed language-tool-python-2.7.1
i am having an error installing language-check when I use pip. My python version is 3.9.5.
i have tried putting these commands into powershell as well as a few more and they have all given me the same error. I am not sure how to proceed
pip install language-check
pip install language_check
pip install --upgrade language-check
pip install --upgrade language-check
Error that I got
PS D:Python> pip install --upgrade language-check
Collecting language-check
Using cached language-check-1.1.tar.gz (33 kB)
Building wheels for collected packages: language-check
Building wheel for language-check (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'd:pythonpython.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\rodge\AppData\Local\Temp\pip-install-q4dwn2qj\language-check_ee739d071d0c47e9b1b2023e1ac3ecda\setup.py'"'"'; __file__='"'"'C:\Users\rodge\AppData\Local\Temp\pip-install-q4dwn2qj\language-check_ee739d071d0c47e9b1b2023e1ac3ecda\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:UsersrodgeAppDataLocalTemppip-wheel-t0bpvet6'
cwd: C:UsersrodgeAppDataLocalTemppip-install-q4dwn2qjlanguage-check_ee739d071d0c47e9b1b2023e1ac3ecda
Complete output (4 lines):
Could not parse Java version from """openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.8+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.8+10, mixed mode)
""".
----------------------------------------
ERROR: 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
ERROR: Command errored out with exit status 1:
command: 'd:pythonpython.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\rodge\AppData\Local\Temp\pip-install-q4dwn2qj\language-check_ee739d071d0c47e9b1b2023e1ac3ecda\setup.py'"'"'; __file__='"'"'C:\Users\rodge\AppData\Local\Temp\pip-install-q4dwn2qj\language-check_ee739d071d0c47e9b1b2023e1ac3ecda\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersrodgeAppDataLocalTemppip-record-52viif_0install-record.txt' --single-version-externally-managed --compile --install-headers 'd:pythonIncludelanguage-check'
cwd: C:UsersrodgeAppDataLocalTemppip-install-q4dwn2qjlanguage-check_ee739d071d0c47e9b1b2023e1ac3ecda
Complete output (4 lines):
Could not parse Java version from """openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.8+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.8+10, mixed mode)
""".
----------------------------------------
ERROR: Command errored out with exit status 1: 'd:pythonpython.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\rodge\AppData\Local\Temp\pip-install-q4dwn2qj\language-check_ee739d071d0c47e9b1b2023e1ac3ecda\setup.py'"'"'; __file__='"'"'C:\Users\rodge\AppData\Local\Temp\pip-install-q4dwn2qj\language-check_ee739d071d0c47e9b1b2023e1ac3ecda\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersrodgeAppDataLocalTemppip-record-52viif_0install-record.txt' --single-version-externally-managed --compile --install-headers 'd:pythonIncludelanguage-check' Check the logs for full command output.
This seems like an old known bug. The package seems to be abandoned, last commit was on Feb 16, 2019.
The package was forked, updated and published under the name language-tool-python
: https://pypi.org/project/language-tool-python/
Try
pip install language-tool-python
As of right now this is a known and open issue on the language-check
git repo. It’s caused by the wrong regex for the Java version, and is caused by JDK version >= 8
To fix this you can either try to use the forked project as @phd mentioned or
You can uninstall JDK 11 and install JDK 6 instead.
Thank you so much @phd !!
This command worked for me on Spyder application:
!pip install language-tool-python
Output:
Installing collected packages: language-tool-python
Successfully installed language-tool-python-2.7.1