Using virtualenv with --python and a 32 bit Python breaks on Windows #774
Comments
Ivoz
added a commit
to Ivoz/virtualenv
that referenced
this issue
Oct 2, 2015
This is needed to particularly when a new interpreter is used, via -p/--python. Re-execing the same `virtualenv.py` will generally lead to its path being added to the start of sys.path (as usual). And usually its path will be the site-packages of the previous interpreter. This will lead to issues if older backported packages are present in the old environment (which will then get preference being imported). Should fix pypa#779, pypa#774, pypa#763
@The-Compiler would appreciate if you could check if the above commit solves the issue https://github.com/Ivoz/virtualenv/archive/early-syspath-removal.zip |
It doesn't, unfortunately. |
Ivoz
added a commit
to Ivoz/virtualenv
that referenced
this issue
Oct 2, 2015
This is needed to particularly when a new interpreter is used, via -p/--python. Re-execing the same `virtualenv.py` will generally lead to its path being added to the start of sys.path (as usual). And usually its path will be the site-packages of the previous interpreter. This will lead to issues if older backported packages are present in the old environment (which will then get preference being imported). Should fix pypa#779, pypa#774, pypa#763
Ivoz
added a commit
to Ivoz/virtualenv
that referenced
this issue
Oct 17, 2015
This is needed particularly when a new interpreter is used, via -p/--python. Re-execing the same `virtualenv.py` will generally lead to its path being added to the start of sys.path (as usual). And usually its path will be the site-packages of the previous interpreter. This will lead to issues if older backported packages are present in the old environment (which will then get preference being imported). Should fix pypa#779, pypa#774, pypa#763
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Just add a comment if you want to keep it open. Thank you for your contributions. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When trying to use virtualenv started with a 64bit python and passing
--python=/path/to/32bit/python
, this breaks on Windows:I investigated a bit and it seems this happens when using
subprocess
withenv=...
to start python in general - I opened Issue 24493 in Python's tracker because of that.However I think virtualenv should work around this issue if possible. What do you think about not using
env=
and not settingVIRTUALENV_INTERPRETER_RUNNING
, and instead adding a hidden argument which is passed when re-executing?I also thought about removing the
--python
argument from the commandline, but that seems brittle, as e.g.--python=...
or--python ...
or-p ...
could be passed.If that sounds like an acceptable workaround, I can open a PR with the change.
The text was updated successfully, but these errors were encountered: