I'm having an issue where running pip freeze
while in a virtual env on an Amazon EC2 instance does not show flask
. However, if I run it outside of the virtual environment it installs just fine with the --user
flag.
[ec2-user@ip-34-235-217-226 html]$ virtualenv venv
New python executable in /var/www/html/venv/bin/python2.7
Also creating executable in /var/www/html/venv/bin/python
Installing setuptools, pip, wheel...done.
[ec2-user@ip-34-235-217-226 html]$ source venv/bin/activate
(venv) [ec2-user@ip-34-235-217-226 html]$ pip install flask
Collecting flask
Using cached https://files.pythonhosted.org/packages/90/72/b5ed853418364d8e7006550dbdb2cb9ac3e33ce3c9145acc7898fca8c0b6/Flask-1.0.1-py2.py3-none-any.whl
Requirement already satisfied: Werkzeug>=0.14 in ./venv/lib/python2.7/dist-packages (from flask) (0.14.1)
Requirement already satisfied: click>=5.1 in ./venv/lib/python2.7/dist-packages (from flask) (6.7)
Requirement already satisfied: Jinja2>=2.10 in ./venv/lib/python2.7/dist-packages (from flask) (2.10)
Requirement already satisfied: itsdangerous>=0.24 in ./venv/lib/python2.7/dist-packages (from flask) (0.24)
Collecting MarkupSafe>=0.23 (from Jinja2>=2.10->flask)
Installing collected packages: flask, MarkupSafe
Successfully installed MarkupSafe-1.0 flask-1.0.1
But then I run pip freeze
and flask is not in the list
(venv) [ec2-user@ip-34-235-217-226 html]$ pip freeze
click==6.7
itsdangerous==0.24
Jinja2==2.10
Werkzeug==0.14.1
Now the crazy part is if I ran pip install flask --user
and pip freeze
outside of the virtual environment, it works just fine.
Any suggestions?