Reputation: 739
I have a simple project in Pycharm that I am working to load up on a VPS. I would like to utilize pip freeze to build a requirements.txt file and install required packages on the VPS.
Unfortunately, when i activate the venv associated with my project, the output of pip freeze appears to be all of the packages in my default python3 installation, and not my project.
I uploaded a screenshot showing Python Interpreter settings and terminal pip freeze output.
In this case, the venv should only contain pip, selenium, setuptools, urllib3. However, no matter how I try to activate the venv (Pycharm terminal, os x terminal) and deactivate, the output of pip freeze is always the long list of packages that seems to be what I have installed to the normal Python3 environment.
I'm wondering if Pycharm is somehow "overmanaging" my packages or if I;m just going wrong somewhere.
Thank you!
Upvotes: 2
Views: 1666
Reputation: 739
Seems my pip was still the global pip such that when I ran which pip
I got /usr/local/bin/pip3
. By using the venv pip I was able to get the packages for that project only.
path/to/venv/bin/pip3 freeze
also the following worked.
python3 -m pip freeze
Upvotes: 4