Closed readytheory closed 4 years ago
An ugly workaround: when "pip.exe" is created in the environment's "Scripts" directory, it gets the lowercse "s" for scripts. I was able to edit pip.exe with a text editor and change "scripts" to "Scripts", then pip worked.... though with a warning about outdated wrapper.
Also, while trying to uninsall pip, I found if I don't get Lib\site-packages in PYTHONPATH, shouldn't that get set?
PS C:\Users\pa2> New-VirtualEnv nerveux
Creating virtual env...
. : The term 'C:\py\venvs\nerveux\Scripts\activate.ps1' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
and try again.
At C:\Users\pa2\Documents\WindowsPowerShell\Modules\VirtualEnvWrapper.psm1:105 char:7
+ . $ActivatepPath
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\py\venvs\nerveux\Scripts\activate.ps1:String) [], CommandNotFoundExc
eption
+ FullyQualifiedErrorId : CommandNotFoundException
SUCCESS: nerveux virtual environment was created and your're in.
PS C:\Users\pa2> workon nerveux
(nerveux) PS C:\Users\pa2> echo $env:PYTHONPATH
(nerveux) PS C:\Users\pa2>
HI @readytheory
I have some time today I will investigate.
Regards
I think this can be closed. The problem was something in the directory I used for virtual environments. I changed WORKON_HOME to point to a new, empty directory, and the problem stopped. Someday, I'll look into the old one and see if I can recreate and figure the source.
[Update: the problem I describe here was caused by something corrupt in the directory where I made envorenments. I chaged WORKON_HOME to point to a new, empty, directory and the problem went away]
I was having problems with environments created by "python -m venv" not giving me a working pip, and found virtualenvwrapper-powershell and it worked for me. Sometime last week I had this update from microsoft to Windows 10:
https://support.microsoft.com/en-us/help/4551762/windows-10-update-kb4551762
Could be a coincence, but now old woes are back and show in virtualenvwrapper also:
I believe problem is that "activate.ps1" and not "Activate.ps1" -- I will try creating symlinks but have been down similar road before with '-m venv' and some other manager. There seems to be something very sensitive about my home pc, have had similar problems with 3.6, 3.7 and 3.8, started whole new user accounts to try to fix.