简体   繁体   中英

Unable to install library in virtual environment

I'm not able to install any library in virtual environment. It gives me the following error:

venv) D:\python projects>pip install pandas
Cannot open D:\python projects\venv\Scripts\pip-script.py

However if i get out of venv and try to install it globally it gets finished without any error.

but I don't know the reason of the error. Another question is that if i have to upgrade the pip version, do i have to upgrade it separately first globally then in my venv? Also Is there any way to use globally installed library in venv?

Fixed this by rebuilding my venv, a bit destructive but you can pip freeze > for the packages your using before hand then pip install -r to restore them to your new venv

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM