Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip freeze not showing packages

Tags:

python

pip

For example if after installing Tornado with pip like this:

pip install tornado
Collecting tornado
...
Successfully installed backports-abc certifi singledispatch six tornado

pip freeze doesn't return tornado package in list, it just shows:

PyMySQL==0.7.2

also when I run easy_install it returns:

error: bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from.  The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /lib/python2.7/site-packages/

and your PYTHONPATH environment variable currently contains:

    ''

What is going wrong?

like image 616
maxisme Avatar asked Jul 28 '16 13:07

maxisme


1 Answers

When using virtualenvwrapper or another virtual environment (which is probably not your case but is how I arrived at this question), you may have installed things using sudo which will install them for your entire system. (See here)

Therefore, pip freeze actually is working, you just haven't actually installed anything with that pip.

like image 168
Pro Q Avatar answered Sep 18 '22 23:09

Pro Q