1 year ago
#73201
Pritalgo
Python venv module not creating clean environment
I created a virtual environment using venv module of python.
python -m venv myenv
After activating environment using source myenv/bin/activate
, I am getting systemwide packages already there in the myenv
. I am getting strange result as:
(myenv) $ pip list
Package Version
------------- -------
pip 20.0.2
pkg-resources 0.0.0
setuptools 44.0.0
and when I do
(myenv) $ python -m pip list
#...Getting long list of packages present in the systemwide python packages
I failed to understand this strange result
System details: OS: Ubuntu 20.04 Python: 3.8.10
Edit: Here is the location of pip and python packages
(myenv) $ which pip
/home/user/myenv/bin/pip
(myenv) $ which python
/home/user/myenv/bin/python
python
python-venv
0 Answers
Your Answer