简体   繁体   中英

pip not pointing to virtual enviroment, in virtual enviroment

I'm using vscode on windows.

have a look here:

(ETLAppEnv_3_7) PS C:\Users\jmarshall\source\repos\MediaDesignGroup\ETLApp_Dev> pip show pandas
Name: pandas
Version: 1.0.1
Summary: Powerful data structures for data analysis, time series, and statistics
Home-page: https://pandas.pydata.org
Author: None
Author-email: None
License: BSD
Location: c:\users\jmarshall\appdata\local\programs\python\python37\lib\site-packages
Requires: pytz, numpy, python-dateutil
Required-by:

even though I'm in my virtual environment here:

(ETLAppEnv_3_7) PS C:\Users\jmarshall\source\repos\MediaDesignGroup\ETLApp_Dev> pip show pandas

pip is working out of the base install of python here:

Location: c:\users\jmarshall\appdata\local\programs\python\python37\lib\site-packages

How do I get pip to point to the packages in my virtual environment???

Possible Duplicate of pip installing in global-site packages instead of virtualenv

According to that post, the VIRTUAL_ENV path within your venv's activate script might be incorrect.

In my personal experience, I had the globally-install packages option selected when I created a venv in PyCharm which resulted in your same issue.

Debug tip: pip list --local will give you all the packages installed in you venv. Might want to double check it isn't installed in the venv.

You can watch which pip you use with the command which pip to make sure you use the one in your environment.

Maybe you have renamed or moved your environment? This would have had the consequence of modifying the path.

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