I made Virt2
virtual environment.
using $ python -m venv Virt2
.
I want to install my custom packages in " site-packages
" directory. However packages are installed in " dist-packages
" directory.
what should I do to install packages in my python virtual environment site-packages ??
my python version 3.6.2 (in /usr/local/bin)
You use sudo
and sudo
switches user to root
, ie you're completely outside of you virtual env. System pip3
outside of virtual env installs packages into a system directory which is dist-packages
.
Run pip install
inside you virtual env without sudo.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.