pip install on Windows gives permission errors accessing a temp folder through an Admin console
See original GitHub issue🐛 Bug
pip install [-U [--force-reinstall]] fairseq
currently gives PermissionError: [WinError 5] Access is denied: 'fairseq\\examples'
. I have 0.9
installed, and trying to install 0.10
.
To Reproduce
Steps to reproduce the behavior (always include the command you ran):
- Open an admin console.
- Run cmd
pip install -U fairseq
- See error.
fairseq/examples
is under:
cwd: $HOME\AppData\Local\Temp\pip-install-18nls8px\fairseq
Stack trace: <detail>
ERROR: Command errored out with exit status 1:
command: '$HOME\AppData\Local\Continuum\anaconda3\envs\dev\python.exe' '$HOME\AppData\Local\Continuum\anaconda3\envs\dev\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel '$HOME\AppData\Local\Temp\tmpprijkq_f'
cwd: $HOME\AppData\Local\Temp\pip-install-18nls8px\fairseq
Complete output (31 lines):
Traceback (most recent call last):
File "setup.py", line 214, in <module>
do_setup(package_data)
File "setup.py", line 191, in do_setup
zip_safe=False,
File "$HOME\AppData\Local\Temp\pip-build-env-yuwvot27\overlay\Lib\site-packages\setuptools\__init__.py", line 152, in setup
_install_setup_requires(attrs)
File "$HOME\AppData\Local\Temp\pip-build-env-yuwvot27\overlay\Lib\site-packages\setuptools\__init__.py", line 147, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "$HOME\AppData\Local\Temp\pip-build-env-yuwvot27\overlay\Lib\site-packages\setuptools\build_meta.py", line 60, in fetch_build_eggs
raise SetupRequirementsError(specifier_list)
setuptools.build_meta.SetupRequirementsError: ['cython', 'numpy', 'setuptools>=18.0']
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "$HOME\AppData\Local\Continuum\anaconda3\envs\dev\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 280, in <module>
main()
File "$HOME\AppData\Local\Continuum\anaconda3\envs\dev\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "$HOME\AppData\Local\Continuum\anaconda3\envs\dev\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 114, in get_requires_for_build_wheel
return hook(config_settings)
File "$HOME\AppData\Local\Temp\pip-build-env-yuwvot27\overlay\Lib\site-packages\setuptools\build_meta.py", line 150, in get_requires_for_build_wheel
config_settings, requirements=['wheel'])
File "$HOME\AppData\Local\Temp\pip-build-env-yuwvot27\overlay\Lib\site-packages\setuptools\build_meta.py", line 130, in _get_build_requires
self.run_setup()
File "$HOME\AppData\Local\Temp\pip-build-env-yuwvot27\overlay\Lib\site-packages\setuptools\build_meta.py", line 145, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 217, in <module>
os.unlink(fairseq_examples)
PermissionError: [WinError 5] Access is denied: 'fairseq\\examples'
----------------------------------------
ERROR: Command errored out with exit status 1: '$HOME\AppData\Local\Continuum\anaconda3\envs\dev\python.exe' '$HOME\AppData\Local\Continuum\anaconda3\envs\dev\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel '$HOME\AppData\Local\Temp\tmpprijkq_f' Check the logs for full command output.
</detail>
Log under $HOME\AppData\Local\Temp\tmpprijkq_f
are inaccessible as the temp folder is auto deleted.
Code sample
Expected behavior
Updates normally.
Environment
- fairseq Version (e.g., 1.0 or master): 0.9.0
- PyTorch Version (e.g., 1.0) 1.7
- OS (e.g., Linux): Windows 10
- How you installed fairseq (
pip
, source): pip - Build command you used (if compiling from source): N/A
- Python version: 3.7.7
- CUDA/cuDNN version: N/A
- GPU models and configuration: N/A
- Any other relevant information: N/A
Additional context
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:18 (2 by maintainers)
Top Results From Across the Web
pip install on Windows gives permission errors accessing a ...
Open an admin console. Run cmd pip install -U fairseq; See error. fairseq/examples is under: cwd: $HOME ...
Read more >pip install access denied on Windows - python - Stack Overflow
For Windows, in Command Prompt (Admin) try to run pip install using the Python executable: ... Try to give permission to full control...
Read more >How to fix - Error 5: Access is Denied in Windows 10
Go to the Security tab and click Advanced. Check the box at the bottom of this window. It is labeled "Replace all child...
Read more >Permission to write to TEMP folder and Windows system folders
Windows has a TEMP folder in the Windows folder that is used by programs to store temporary files. Windows creates this folder if...
Read more >pip freeze - pip documentation v22.3.1
Fixing “Permission denied:” errors# · Install the command for yourself (e.g. in your home directory). · Ask the system admin to allow this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi everybody !!
This problem has solved. Try to run this
pip install -v --no-cache-dir fairseq
Thanks
Using symlinks is generally not a cross-platform solution. I normally comment out the symlink lines in the
setup.py
@munael @fspanda.