Reputation:
As the root user I see:
root@5d6f29f1d4e9:/usr/local/lib/python2.7# ls -a
. .. dist-packages site-packages
root@5d6f29f1d4e9:/usr/local/lib/python3.6# ls -a
. .. dist-packages
and when I run this:
find / -type d -name 'site-packages'
the only result is:
/usr/local/lib/python2.7/site-packages
does anyone know why I wouldn't see site-packages in 3.6?
I installed python3 with:
apt install -y build-essential libssl-dev libffi-dev python3-dev
apt install -y python3-pip
and then installed a bunch of python package using:
pip3 install gunicorn
pip3 install wheel
...etc...
maybe I didn't install python3 well?
Upvotes: 10
Views: 585
Reputation: 910
If your goal is to find where the python is installing your packages, then read on.
python3
.import gunicorn
sys.path
import sys
and then print(sys.path)
That should give you a list of folders not more than 10. Just navigate through the folders and you will find the path where packages are installed by default.OR
Simply run python3 -m site
Upvotes: 1
Reputation: 1627
It seems to be Debian feature with dist-packages instead of site-packages.
You can check the path for your pip3 installed packages: python3 -c "import wheel;print(wheel.__file__)"
Upvotes: 1