-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Failing to install activate script in Windows Server 2008 #564
Comments
Could you edit your post and put three backticks on new lines above and below the console output, so it formats nicely to read? e.g. it would look like this while editing it:
https://help.github.com/articles/github-flavored-markdown#fenced-code-blocks |
It looks like someone got to it before me, but thanks for the heads up. I'll make sure I do that next time. |
Hmm... how complicated is the python install history on this server? That traceback is a little mangled so it's hard to see where it went wrong. Seems to be complaining that I assume you should have no permissions problems, running everything under Administrator. If you're not too invested in the current install, I would suggest uninstalling Python3.3, making sure the [After,] If you run the script under If you hadn't figured out already, reinstalling pip should be as simple as downloading get-pip.py and running it. From my perspective, it would be nice to confirm that this was indeed a cleanroom failure of virtualenv on a Windows (Server '08) system. I've seen a great many bugs from multiple installs / unclean uninstalls breaking things in the past. |
The host is a brand new virtual machine, and I installed python on it that day. I also have access to a freshly installed Windows 7 machine, and tried your steps outlined above to the same error as before. |
Running Windows 8.1 x64
So can confirm it seems to be an error.
Mysterious to me so far. |
Where's that "Downloa...2" coming from? Something seems to be abbreviating things here. As far as I know neither pip nor virtualenv would do that... |
@pfmoore you on IRC? Virtualenv abbreviates lines over 45 chars long in the output.
I will note that the wheel uploaded to PyPI has two pips in it - 1.5.1 and 1.5.2. That is very strange. Even after removing the 1.5.1 wheel though, I now get the same error as @pancho-villa ATM I can't reproduce getting the error
Which is what I initially got;
|
@Ivoz nope, sorry not on IRC. I'd forgotten there was that abbreviation going on. Just wondering if it was some strange Windows shortname thing. I can't reproduce the problem here (Python 3.3, Windows 7 64-bit, virtualenv 1.11.2) so I don't really have much else I can say, sorry. One thing that's given me very odd results before now, you're not running from a directory that has a "pip" subdirectory present, are you? |
Aha, yes I was. Funnily enough, pip creates a Am now back to |
This is probably windows specific path shenanigans... anyway, normally in
(yes, this is debug by print) If I amend However I can't also achieve the same trick by modifying |
Hmm. It just occurred to me that I never run an installed virtualenv script - I run an uninstalled virtualenv. So maybe there's a logic problem there. While you're doing debug-by-print, would you amend BTW, I've just joined IRC if you want to carry this on there. |
Because [Windows is awesome][windowz]! [windowz]: pypa#564
I installed virtualenv on another Windows 7 x64 machine about a month ago and didn't have this issue. That version is 1.10.1, so I tried installing that on my problem machine, and it worked! Some regression must've been introduced between 1.10.1 and the current build. |
See #567 for an updated PR that loses an unnecessary pair of double quotes that triggers odd behaviour from subprocess.py (see list2cmdline in subprocess.py for the rules, they are pretty arcane). Essentially it looks like having double quotes triggers the addition of backslashes that are what was causing oddities... There may be a bug in subprocess.py here, but I'm blowed if I can describe it well enough to report it! |
Looks like this might be a Python 3.3.4 bug - see http://bugs.python.org/issue20621 |
OK. I have reviewed the details of this issue. It seems to me that all of the reported issues can be explained by the bug reported in http://bugs.python.org/issue20621 - every reported traceback is some variation of being unable to find the correct pip module from the wheel on sys.path. The suggested fix in #566 bears no relation to the import issue, and almost certainly does not fix the issue, unfortunately. |
For now, I'd recommend downgrading to Python 3.3.3. I've asked on python-dev about what the best way forward is likely to be, I'll report back here when I have news. |
There will be a 3.3.5 as soon as a fix is available. As there's no viable workaround here, I think I'm just going to have to declare virtualenv broken on 3.3.4. I'll add a test and error into the code so that people get a clean message rather than an obscure bug. |
I'm going to merge PR #568 to address this. On Python 3.3.4, virtualenv will display an error message and work as if you'd specified I'm going to pick up the various quoting suggestions and simplifications of the pip-calling code in a separate PR. But it'll affect the same code as #568, so I'll wait till that one has landed before submitting it. |
OK, change of plan. I'm closing this, as the issue is a Python bug, not a virtualenv bug. Users can downgrade to Python 3.3.3, wait a week or so for Python 3.3.5, or use |
I have installed Python 3.3.4, then installed pip, then ran pip3.3.exe install virtualenv. When I run C:\Python33\Scripts\virtualenv testfoo it doesn't create a testfoo\Scripts\activate.bat or deacativate.bat files
Here's the stacktrace after running the virtualenv command:
And here's the directory listing of the newly created environment:
The text was updated successfully, but these errors were encountered: