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

Windows 10 install error #104

Closed
thilakshiK opened this issue Jul 22, 2020 · 8 comments
Closed

Windows 10 install error #104

thilakshiK opened this issue Jul 22, 2020 · 8 comments

Comments

@thilakshiK
Copy link

I got the following error when I tried to install sacrebleu in windows 10. I have also installed Microsoft Visual C++ 14.0. I'd appreciate if anybody could help me with this.

I'm using,

  • Python 3.6

  • Anaconda3 v4.8.3

Error message :

(myenv) PS C:\Users\math2> pip install sacrebleu
Collecting sacrebleu
Using cached sacrebleu-1.4.12-py3-none-any.whl (54 kB)
Collecting mecab-python3==0.996.5
Using cached mecab-python3-0.996.5.tar.gz (65 kB)
Requirement already satisfied: portalocker in c:\users\math2\anaconda3\envs\myenv\lib\site-packages (from sacrebleu) (1.7.1)
Requirement already satisfied: pywin32!=226; platform_system == "Windows" in c:\users\math2\anaconda3\envs\myenv\lib\site-packages (from portalocker->sacrebleu) (228)
Building wheels for collected packages: mecab-python3
Building wheel for mecab-python3 (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\math2\Anaconda3\envs\myenv\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\math2\AppData\Local\Temp\pip-install-9vlm5lwy\mecab-python3\setup.py'"'"'; file='"'"'C:\Users\math2\AppData\Local\Temp\pip-install-9vlm5lwy\mecab-python3\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 'C:\Users\math2\AppData\Local\Temp\pip-wheel-tn46t4hy'
cwd: C:\Users\math2\AppData\Local\Temp\pip-install-9vlm5lwy\mecab-python3
Complete output (9 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\MeCab
copying src\MeCab_init_.py -> build\lib.win-amd64-3.6\MeCab
running build_ext
error: [WinError 2] The system cannot find the file specified

ERROR: Failed building wheel for mecab-python3
Running setup.py clean for mecab-python3
Failed to build mecab-python3
Installing collected packages: mecab-python3, sacrebleu
Running setup.py install for mecab-python3 ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\math2\Anaconda3\envs\myenv\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\math2\AppData\Local\Temp\pip-install-9vlm5lwy\mecab-python3\setup.py'"'"'; file='"'"'C:\Users\math2\AppData\Local\Temp\pip-install-9vlm5lwy\mecab-python3\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\math2\AppData\Local\Temp\pip-record-ep1wley9\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\math2\Anaconda3\envs\myenv\Include\mecab-python3'
cwd: C:\Users\math2\AppData\Local\Temp\pip-install-9vlm5lwy\mecab-python3
Complete output (9 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\MeCab
copying src\MeCab_init_.py -> build\lib.win-amd64-3.6\MeCab
running build_ext
error: [WinError 2] The system cannot find the file specified
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\math2\Anaconda3\envs\myenv\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\math2\AppData\Local\Temp\pip-install-9vlm5lwy\mecab-python3\setup.py'"'"'; file='"'"'C:\Users\math2\AppData\Local\Temp\pip-install-9vlm5lwy\mecab-python3\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\math2\AppData\Local\Temp\pip-record-ep1wley9\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\math2\Anaconda3\envs\myenv\Include\mecab-python3' Check the logs for full command output.

@ozancaglayan
Copy link
Collaborator

can you install mecab-python3 on its own i.e. what happens if you run pip install mecab-python3 ?

@ozancaglayan
Copy link
Collaborator

Ok this is related to #107

@thilakshiK
Copy link
Author

@ozancaglayan Thanks a lot

ozancaglayan pushed a commit that referenced this issue Jul 29, 2020
* Fix Japanese handling

This changes the Japanese tokenizer to use versions of mecab-python3 1.0
or greater. This means the package will work on Windows. (#104)

However, since the Japanese tokenizer pulls in heavy dependencies and
isn't necessary unless you're dealing with Japanese, I moved it to
optional dependencies. You can install sacrebleu with Japanese support
like below:

    pip install sacrebleu[ja]

That will install mecab-python3 and ipadic.

This also includes basic tests to check that the tokenization is as
exepcted for IPAdic.

* Make travis install the Japanese deps

* Remove old comments
@ozancaglayan
Copy link
Collaborator

I think we should do a new release @mjpost @martinpopel ASAP as dependency on mecab broke Windows installations for fairseq and OpenNMT at least.

@martinpopel
Copy link
Collaborator

I think only @mjpost can upload a new release to PyPI.

@mjpost
Copy link
Owner

mjpost commented Jul 30, 2020

If you two share your pypi IDs with me, I can grant you access. It would be good for me to not be the bottleneck here.

@ozancaglayan
Copy link
Collaborator

@thilakshiK can you try installing the new version using pip?

@thilakshiK
Copy link
Author

@ozancaglayan It's working 😀

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

No branches or pull requests

4 participants