question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pip-installed Poetry encountering EnvironmentError "Permission denied" on Windows when upgrading cffi

See original GitHub issue
  • I am on the latest Poetry version.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

  • OS version and name: Windows 10

  • Poetry version: 1.0.10

Issue

I’ve just encountered this problem while running poetry update, which upgraded the cffi package. Using pip 20.2.3 on python 3.9b5 on Windows 10, while using poetry 1.0.10.

PS C:\pas\projects\xxxx\ci> .\venv-windows\Scripts\python.exe -m poetry update
Skipping virtualenv creation, as specified in config file.
Updating dependencies
Resolving dependencies...

Writing lock file


Package operations: 0 installs, 5 updates, 0 removals

  - Updating attrs (19.3.0 -> 20.2.0)
  - Updating cffi (1.14.0 -> 1.14.2)

[EnvCommandError]
Command ['C:\\pas\\projects\\xxxx\\ci\\venv-windows\\Scripts\\python.exe', '-m', 'pip', 'install', '--no-deps', '-U', 'cffi==1.14.2'] errored with the following return code 1, and output:
Collecting cffi==1.14.2
  Downloading cffi-1.14.2.tar.gz (470 kB)
Using legacy 'setup.py install' for cffi, since package 'wheel' is not installed.
Installing collected packages: cffi
  Attempting uninstall: cffi
    Found existing installation: cffi 1.14.0
    Uninstalling cffi-1.14.0:
      Successfully uninstalled cffi-1.14.0
    Running setup.py install for cffi: started
    Running setup.py install for cffi: finished with status 'done'
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Permission denied: 'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-uninstall-8rjju1cu\\_cffi_backend.cp39-win_amd64.pyd'

Of course it’s not the best practice to install poetry via pip. Maybe providing a command line argument to ignore these errors might be worth it?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:19 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
jeremadcommented, Sep 24, 2020

Exact same issue with poetry, cffi and windows, I try to create a minimum reproduction

2reactions
Toxecommented, Dec 4, 2020

@sinoroc

Are you sure the issue is reproducible in a fresh environment?

Yes, 100% sure. Actually the above log was from a fresh environment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pip install access denied on Windows - python - Stack Overflow
For Windows, in Command Prompt (Admin) try to run pip install using the Python executable: python -m pip install mitmproxy. This should work,...
Read more >
pip uninstall permission denied - You.com | The Search ...
I've just encountered this problem while running poetry update, which upgraded the cffi package. Using pip 20.2.3 on python 3.9b5 on Windows 10,...
Read more >
coomand to update git Code Example - Code Grepper
For windows use git update-git-for-windows # else I guess? git update. ... packages due to an EnvironmentError: [WinError 5] Access is denied: 'd:\\geeklone ......
Read more >
mirrors.dotsrc.org/opensuse/tumbleweed/repo/oss/Ch...
As we already tar'ed the content up, we can simply change the permissions of winsupport's content to allow proper erasing. ++++ libtracecmd: -...
Read more >
ChangeLog - ftp
(#4669, @Prinzhorn) - Fix a permission error affecting the Docker images. ... #2550 ++++ python-cleo: - Update to 2.0.1 - Relax poetry-core requirement...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found