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

pip-sync broken on Windows #722

Closed
miuliano opened this issue Jan 25, 2019 · 2 comments
Closed

pip-sync broken on Windows #722

miuliano opened this issue Jan 25, 2019 · 2 comments
Labels
bug Something is not working

Comments

@miuliano
Copy link

Calling pip-sync on Windows returns:

Could not open requirements file: [Errno 13] Permission denied: 'c:\\users\\<username>\\appdata\\local\\temp\\tmpe9jswo'

This was introduced in 3.3.1 by the change to using tempfile.NamedTemporaryFile in sync.py to create the requirements file before passing it to pip install via subprocess.check_call. This is caused by Windows requiring reopened temporary files to be opened with the O_TEMPORARY flag. For context see https://stackoverflow.com/a/15235559.

Environment Versions
  1. OS Type: Windows 10
  2. Python version: Python 2.7.12
  3. pip version: pip 9.0.3
  4. pip-tools version: pip-compile, version 3.3.1
Steps to replicate
  1. pip-sync -r <requirements_file>
Expected result

Command should complete successfully.

Actual result
Could not open requirements file: [Errno 13] Permission denied: 'c:\\users\\<username>\\appdata\\local\\temp\\tmpe9jswo'
@miuliano miuliano changed the title pip-sync broken on Windows 10 pip-sync broken on Windows Jan 25, 2019
@davidovich
Copy link
Contributor

Yes, this is exactly why we do it by leaving the file around in pip-compile.

@atugushev atugushev added the bug Something is not working label Jan 25, 2019
@atugushev
Copy link
Member

Hello @miuliano, thanks for the report, i'll try to fix it ASAP.

Thank you @davidovich for the info! It should have been done the same as in compile.

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

No branches or pull requests

4 participants