I learned to install a virtual environment of python.
It seems I am not quite familiar some basic pip common sense.
That is,
In the virtualenv,
virtualenv test
then I have a virtual environment which name is test.
then I activated it by
source ./test/bin/activate
Then I enter the virtual environment
firstly I run pip list to check the packages
pip list
then I got 'pip' and 'setup tools'
then I install 'sqlalchemy'
pip install sqlalchemy
I got the information 'successfully installed sqlachemy' but when I check the installed packages by
pip list
I still got only 'pip' and 'setuptools' without 'sqlalchemy'.
I am wondering why this happened.
Is the 'sqlalchemy' not one of the python packages?
And I have checked the './test/lib64/python2.7/dist-packages/'
I saw the 'sqlalchemy' folder right under that directory.
Is there anybody tell me why?
Thanks.
by the way, I check the 'sys.path' variable, I found that the value is equal to
/home/worker/pyproject/testenv/local/lib64/python2.7/site-packages
/home/worker/pyproject/testenv/local/lib/python2.7/site-packages
/home/worker/pyproject/testenv/lib64/python2.7
/home/worker/pyproject/testenv/lib/python2.7
/home/worker/pyproject/testenv/lib64/python2.7/site-packages
/home/worker/pyproject/testenv/lib/python2.7/site-packages
/home/worker/pyproject/testenv/lib64/python2.7/lib-dynload
/home/worker/pyproject/testenv/local/lib/python2.7/dist-packages
/home/worker/pyproject/testenv/local/lib/python2.7/dist-packages
/home/worker/pyproject/testenv/lib/python2.7/dist-packages
/usr/lib64/python2.7
/usr/lib/python2.7
But actually, the 'sqlalchemy' is installed in the directory /home/worker/pyproject/testenv/lib64/python2.7/dist-packages/
Why 'sys.path' does not contain this
/home/worker/pyproject/testenv/lib64/python2.7/dist-packages/