This time, I have a venv environment for other purposes, but some Python libraries need to be compiled by gcc ... Can not download directly, and this environment can not be networked.
I'll copy every library that needs to be compiled. Silly. Directly specify the library directory for the virtual venv how nice.
create a. pth file
This is My.pth's file.
where is this file?
Ubuntu and CentOS are different.
CentOS in /usr/lib/python2.7/site-packages/
ubuntu in/usr/local/lib/python2.7/dist-packages
This is the directory I want to add, written in the. pth file.
into Python interaction
Import SYS
Sys.path
You can see this directory.
Many need to compile ah, what a mess of the library can be used directly.
and how to specify a source download.
Designated watercress Source
Pip Install pexpect==4.3.0-i http://pypi.douban.com/simple--trusted-host pypi.douban.com