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

Does not work on Windows with Python 3.7.2 #81

Closed
schlamar opened this issue Feb 1, 2019 · 7 comments
Closed

Does not work on Windows with Python 3.7.2 #81

schlamar opened this issue Feb 1, 2019 · 7 comments
Labels

Comments

@schlamar
Copy link

schlamar commented Feb 1, 2019

First try:

>pipx install tox --verbose
pipx (run_pipx_command:645): virtualenv location is C:\Users\$USER\.local\pipx\venvs\tox
pipx (_run:228): running c:\users\$USER\.local\pipx\venvs\pipx-app\scripts\python.exe -m venv C:\Users\$USER\.local\pipx\venvs\tox
pipx (_run:228): running C:\Users\$USER\.local\pipx\venvs\tox\Scripts\python.exe -m pip install --upgrade pip
Requirement already up-to-date: pip in c:\users\$USER\.local\pipx\venvs\pipx-app\lib\site-packages (19.0.1)
pipx (_run:228): running C:\Users\$USER\.local\pipx\venvs\tox\Scripts\python.exe -m pip install tox
Requirement already satisfied: tox in c:\users\$USER\.local\pipx\venvs\pipx-app\lib\site-packages (3.7.0)
Requirement already satisfied: setuptools>=30.0.0 in c:\users\$USER\.local\pipx\venvs\pipx-app\lib\site-packages (from tox) (40.6.2)
Requirement already satisfied: filelock<4,>=3.0.0 in c:\users\$USER\.local\pipx\venvs\pipx-app\lib\site-packages (from tox) (3.0.10)
Requirement already satisfied: toml>=0.9.4 in c:\users\$USER\.local\pipx\venvs\pipx-app\lib\site-packages (from tox) (0.10.0)
Requirement already satisfied: virtualenv>=1.11.2 in c:\users\$USER\.local\pipx\venvs\pipx-app\lib\site-packages (from tox) (16.3.0)
Requirement already satisfied: six<2,>=1.0.0 in c:\users\$USER\.local\pipx\venvs\pipx-app\lib\site-packages (from tox) (1.12.0)
Requirement already satisfied: py<2,>=1.4.17 in c:\users\$USER\.local\pipx\venvs\pipx-app\lib\site-packages (from tox) (1.7.0)
Requirement already satisfied: pluggy<1,>=0.3.0 in c:\users\$USER\.local\pipx\venvs\pipx-app\lib\site-packages (from tox) (0.8.1)
pipx (rmdir:238): removing directory C:\Users\$USER\.local\pipx\venvs\tox
No binaries associated with package tox.

This creates a venv based on a venv python.exe which doesn't seem to work correctly. I tried these commands manually and it didn't work, too. I'm not sure if this is a wrong usage of pipx or if this did work in <3.7.2. There was a change in Python which might be related:

bpo-34977: venv on Windows will now use a python.exe redirector rather than copying the actual binaries from the base environment.

If this did work before it should be reported upstream.

Second try:

>pipx install --python "C:\Program Files (x86)\Python37-32\python.exe" --verbose tox
pipx (run_pipx_command:645): virtualenv location is C:\Users\$USER\.local\pipx\venvs\tox
pipx (_run:228): running C:\Program Files (x86)\Python37-32\python.exe -m venv C:\Users\$USER\.local\pipx\venvs\tox
pipx (_run:228): running C:\Users\$USER\.local\pipx\venvs\tox\Scripts\python.exe -m pip install --upgrade pip
Requirement already up-to-date: pip in c:\users\$USER\.local\pipx\venvs\pipx-app\lib\site-packages (19.0.1)
pipx (_run:228): running C:\Users\$USER\.local\pipx\venvs\tox\Scripts\python.exe -m pip install tox
Requirement already satisfied: tox in c:\users\$USER\.local\pipx\venvs\pipx-app\lib\site-packages (3.7.0)
Requirement already satisfied: pluggy<1,>=0.3.0 in c:\users\$USER\.local\pipx\venvs\pipx-app\lib\site-packages (from tox) (0.8.1)
Requirement already satisfied: filelock<4,>=3.0.0 in c:\users\$USER\.local\pipx\venvs\pipx-app\lib\site-packages (from tox) (3.0.10)
Requirement already satisfied: six<2,>=1.0.0 in c:\users\$USER\.local\pipx\venvs\pipx-app\lib\site-packages (from tox) (1.12.0)
Requirement already satisfied: setuptools>=30.0.0 in c:\users\$USER\.local\pipx\venvs\pipx-app\lib\site-packages (from tox) (40.6.2)
Requirement already satisfied: py<2,>=1.4.17 in c:\users\$USER\.local\pipx\venvs\pipx-app\lib\site-packages (from tox) (1.7.0)
Requirement already satisfied: virtualenv>=1.11.2 in c:\users\$USER\.local\pipx\venvs\pipx-app\lib\site-packages (from tox) (16.3.0)
Requirement already satisfied: toml>=0.9.4 in c:\users\$USER\.local\pipx\venvs\pipx-app\lib\site-packages (from tox) (0.10.0)
pipx (rmdir:238): removing directory C:\Users\$USER\.local\pipx\venvs\tox
No binaries associated with package tox.

This did work when I run the commands manually, so there is probably something wrong with the invocation in pipx.

@schlamar
Copy link
Author

schlamar commented Feb 1, 2019

OK I guess my second try is a upstream bug, too. There is a

'__PYVENV_LAUNCHER__': 'c:\\users\\$USER\\.local\\pipx\\venvs\\pipx-app\\scripts\\python.exe'

environment variable which probably results to referencing the wrong venv.

@schlamar
Copy link
Author

schlamar commented Feb 1, 2019

@cs01
Copy link
Member

cs01 commented Feb 7, 2019

Great thanks for filing. Looks like they’re moving pretty quickly to fix it. I will leave this open. We can update it with a comment containing the python version that has the fix.

@schlamar
Copy link
Author

schlamar commented Feb 7, 2019

Maybe you want to consider giving the user a better error message instead of "No binaries associated with package X." when running under 3.7.2? The best would be erroring out before creating a venv.

This is already in the 3.7 branch , so it will be fixed in 3.7.3.

@cs01
Copy link
Member

cs01 commented Feb 8, 2019

Yeah I agree. Do you want to try and make a pull request?

@cs01
Copy link
Member

cs01 commented Dec 17, 2019

The error message has been improved in master. Has the original error been fixed upstream?

@cs01 cs01 added the windows label Dec 17, 2019
@schlamar
Copy link
Author

Yes, this was fixed in 3.7.3.

@cs01 cs01 closed this as completed Dec 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants