-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
hundreds of processes spawned #1380
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
Comments
I tried to install python, pip and virtualenv for the first time today and faced the same problem. I've fixed it by commenting 3 lines in The lines i commented are 783-785: |
@AndrYast after activating the environment are you still on 3.7.4? This definitely seems to be an issue specifically with 3.7.4, which was released yesterday (7/8/19). |
@thingselliotprograms yes, running |
Experiencing same issue with pipenv hanging since upgrading python yesterday to 3.7.4. Underlying issue related to virtualenv. Downgraded python to 3.7.3 for now. |
Ack virtualenv latest is broken because python/cpython#14428 always sets |
I'm getting the same issue with 3.7.4. I'm using |
I'm experiencing this exact issue, too, with 3.7.4. Rolling thunder of python.exe processes exhausts memory and virtualenv creation ultimately fails. The issue did not exist with 3.7.2. |
Maintainer here. As I said above the contract for some internal variable of CPython changed, and this causes now infinite loop on process creation for both python 3.7 and 3.8. |
No idea whether this is a good idea, but I was able to create a virtual environment with this quick hack. # virtualenv.py:783
if hasattr(sys, "_base_executable") and sys.version_info < (3, 7, 4):
return sys._base_executable Judging by the comments above that line, looks like you had some fun in an earlier version. |
Maybe there needs to be an additional check that Maybe @zooba could comment or offer suggestions here. We're using undocumented internals, so ultimately the issue is up to us to address, but I don't know of a supported way to get the information we need, so I don't see a solution that won't be subject to potential breakage every time we get a new release of Python :-( Ultimately, #1377 is probably the only reliable solution here. |
I think as long as we add that check we'll be fine. |
Travis CI jobs running Windows and attempting to create a virtualenv also fail. Travis CI recently moved to 3.7.4. 😞 https://travis-ci.community/t/infinite-loop-of-virtualenv-windows/4139 Possibly helpful information from the Travis builds:
|
Won't doing that reintroduce (on 3.7.4) the issues the base_executable check was intended to fix? Admittedly those issues were far less serious, so it's likely still worth doing, but I don't think it's a full solution. |
I don't think it causes regression, does it? |
I haven't tested one way or another (and won't have time to, sorry). |
What's the conclusion here, is a fix release possible for virtualenv? |
Yes it is if anyone makes a PR with the fix 😊 |
Do you have a test for the regression you mentioned? |
I think we do. |
The relevant test (added in #1345) is |
Thanks for the quick fixes all around folks, I believe comparing I am curious what caused the issue in the first place though. |
You need to get the system python to create a virtual environment. Trying to create a virtual environment with either a venv or virtualenv package will not work. Previously |
Python 3.7.4
|
#1383 created. I would strongly recommend some manual testing before merging. I don't have 3.7.4 installed so I haven't tested the change at all, and I don't know what minor version of 3.7 CI is currently running. Maybe some of the people reporting the issue here could test the change and confirm it fixes their issue and doesn't introduce any other breakage? |
It works with Python 3.7.4 on Travis CI! I see no new issues. This is the Travis config I used for the test (relevant portion): - stage: test
os: windows
language: shell
env: PATH=/c/Python37:/c/Python37/Scripts:$PATH
before_install:
- choco install python
# python -m pip install virtualenv
- pip install git+https://github.com/pypa/virtualenv
- virtualenv $HOME/venv
- source $HOME/venv/Scripts/activate The results (relevant parts):
|
Excellent, thanks for confirming
I hadn't realised Travis provided Windows environments now, that's interesting :-) |
@pfmoore They emphasize that Windows is "early access" and has issues (significantly you can't use secrets). |
Yea, Windows support was rolled out just before #travisAlums stuff happened IIRC (the new parent company drastically shrunk Travis's team) |
I have this code(in file virtualenv.py) to fix it: |
Fix should be released via https://pypi.org/project/virtualenv/16.6.2/ |
Just tested and it is indeed fixed. Thank you very much for the quick and good responses. |
After installing python 3.7.4 64 bit, i attempted to start a virtual environment in a folder. However, about a thousand python processes were started and the virtual environment did not get completed.
OS: Windows 10 Home
Code run in Cygwin 64 bit
Failing code:
pip list
The text was updated successfully, but these errors were encountered: