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

Issue with Windows 10 wheel -- DLL load failed while importing win32file #179

Closed
erip opened this issue Feb 6, 2022 · 2 comments
Closed

Comments

@erip
Copy link

erip commented Feb 6, 2022

I've forced an install of sacrebleu to ignore any installed versions:

(tmp) PS C:\Users\Elijah\Desktop\tmp> pip install --ignore-installed sacrebleu
Collecting sacrebleu
  Using cached sacrebleu-2.0.0-py3-none-any.whl (90 kB)
Collecting numpy>=1.17
  Using cached numpy-1.22.2-cp38-cp38-win_amd64.whl (14.7 MB)
Collecting regex
  Using cached regex-2022.1.18-cp38-cp38-win_amd64.whl (273 kB)
Collecting portalocker
  Using cached portalocker-2.3.2-py2.py3-none-any.whl (15 kB)
Collecting tabulate>=0.8.9
  Using cached tabulate-0.8.9-py3-none-any.whl (25 kB)
Collecting colorama
  Using cached colorama-0.4.4-py2.py3-none-any.whl (16 kB)
Collecting pywin32>=226
  Using cached pywin32-303-cp38-cp38-win_amd64.whl (9.3 MB)
Installing collected packages: pywin32, tabulate, regex, portalocker, numpy, colorama, sacrebleu
Successfully installed colorama-0.4.4 numpy-1.22.2 portalocker-2.3.2 pywin32-303 regex-2022.1.18 sacrebleu-2.0.0 tabulate-0.8.9

so the package is installed correctly, but when I try to use it, I get an error:

(tmp) PS C:\Users\Elijah\Desktop\tmp> sacrebleu -h
Traceback (most recent call last):
  File "C:\Users\Elijah\miniconda3\envs\tmp\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\Elijah\miniconda3\envs\tmp\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\Elijah\miniconda3\envs\tmp\Scripts\sacrebleu.exe\__main__.py", line 4, in <module>
  File "C:\Users\Elijah\miniconda3\envs\tmp\lib\site-packages\sacrebleu\__init__.py", line 21, in <module>
    from .utils import smart_open, SACREBLEU_DIR, download_test_set  # noqa: F401
  File "C:\Users\Elijah\miniconda3\envs\tmp\lib\site-packages\sacrebleu\utils.py", line 12, in <module>
    import portalocker
  File "C:\Users\Elijah\miniconda3\envs\tmp\lib\site-packages\portalocker\__init__.py", line 4, in <module>
    from . import portalocker
  File "C:\Users\Elijah\miniconda3\envs\tmp\lib\site-packages\portalocker\portalocker.py", line 11, in <module>
    import win32file
ImportError: DLL load failed while importing win32file: The specified module could not be found.

I've tried force reinstalling pywin32, but it seems like this is no good. Fortunately conda install -c conda-forge sacrebleu seems good so it seems like there's some issue with the built Windows wheel.

@ozancaglayan
Copy link
Collaborator

It seems that this is related to some environment (or unknown) issue related to Windows. I found a similar issue for azure-cli that remains unsolved except reinstalling things: Azure/azure-cli#17986

@ozancaglayan
Copy link
Collaborator

Clearly not related to sacreBLEU, an interplay with pywin32, python version, etc. mhammond/pywin32#1431

Closing for now. Thanks!

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

2 participants