Python Forum
Pip not looking in venv
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pip not looking in venv
#1
Hi having trouble with pip not looking inside my activated virtual environment. This was working before and I don't know what changed it but would really appreciate some help in fixing it:

(venv) c:\Projects\Mindset\Android\venv>pip -V
pip 19.2.3 from c:\users\user\appdata\local\programs\python\python37\lib\site-packages\pip (python 3.7)

Running my code in VScode works fine, using the appropriate venv, but when I try through the command prompt it ignores the venv.

Thank you
Reply
#2
Try upgrade pip and give a name to environment i never call it just venv.
Example.
# Upgrade
C:\code
λ python -m pip install --upgrade pip
Collecting pip .....
Successfully installed pip-19.3.1

# Test before
C:\code
λ pip -V
pip 19.3.1 from c:\python37\lib\site-packages\pip (python 3.7)

# Make environment 
C:\code
λ python -m venv forum_env

# Cd in
C:\code
λ cd forum_env\

# Activate
C:\code\forum_env
λ C:\code\forum_env\Scripts\activate

# Test pip,correct here point to environment folder
(forum_env) C:\code\forum_env
λ pip -V
pip 18.1 from c:\code\forum_env\lib\site-packages\pip (python 3.7)

(forum_env) C:\code\forum_env
I use cmder here,a option that's a lot better that cmd/PowerShell.
The command's i use is just same in cmd.
Reply
#3
Thank you, i recreated the venv and used a more explicit name, it's working now.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020