Stop pip installs dependencies already installed with apt-get

How can I make sure that packages installed with help pipdo not install dependencies already installed with help apt-get?

For example, on Ubuntu you can install the Numpy package with apt-get install python-numpy. Which is installed on:

usr/local/lib/python2.7/dist-packages 

I noticed that when I install a package that requires numpy using pip, for example, pip install scipyinstead of skipping the numpy dependency, it installs again in another place.

/usr/lib/python2.7/dist-packages

What needs to be done is to skip any python packages installed globally, right?

+4
source share
1 answer

.

virtualenv, . , --system-site-packages.

virtualenv -p /usr/bin/python --system-site-packages py27
source py27/bin/activate

. /usr/bin/python -m pip list python -m pip list.

. question


() , pypi. , , .

+3

Source: https://habr.com/ru/post/1613005/


All Articles