Reputation: 5212
I'm using pyenv to manage virtualenvs.
I've just create a fresh new virtualenv and activate it using
pyenv virtualenv 3.11.2 my-venv
pyenv activate my-venv
But when I execute pip freeze
I got a list of a lot of packages installed instead of the desired empty response.
I checked:
$ pyenv which python
/home/miguel/.pyenv/versions/my-venv/bin/python
$ python --version
Python 3.9.13
$ pyenv deactivate
/home/miguel/anaconda3/bin/python
$ pyenv which python
/home/miguel/anaconda3/bin/python
I've done this many times in the past, but I'm not sure what is happening now. Do you have any clues?
Upvotes: 0
Views: 192
Reputation: 5212
In case anyone has the same problem.
In my case, everything got solved when I uninstalled anaconda. When I set up my PC I'm not sure if I installed conda or pyenv first, but I forgot I had conda installed.
To uninstall conda I followed the official instructions:
conda install anaconda-clean
anaconda-clean --yes
It takes an instant and there is no need to reopen the shell
Upvotes: 0