“Phow untuk menginstal modul python di internet di Sercer” Kode Jawaban

Phow untuk menginstal modul python di internet di Sercer

On the machine where I have access to Internet:

mkdir keystone-deps
pip download python-keystoneclient -d "/home/user/keystone-deps"
tar cvfz keystone-deps.tgz keystone-deps
Then move the tar file to the destination machine that does not have Internet access and perform the following:

tar xvfz keystone-deps.tgz
cd keystone-deps
pip install python_keystoneclient-2.3.1-py2.py3-none-any.whl -f ./ --no-index
You may need to add --no-deps to the command as follows:

pip install python_keystoneclient-2.3.1-py2.py3-none-any.whl -f ./ --no-index --no-deps
Sachin

Phow untuk menginstal modul python di internet di Sercer

If you want to install a bunch of dependencies from, say a requirements.txt, you would do:

mkdir dependencies
pip download -r requirements.txt -d "./dependencies"
tar cvfz dependencies.tar.gz dependencies
And, once you transfer the dependencies.tar.gz to the machine which does not have internet you would do:

tar zxvf dependencies.tar.gz
cd dependencies
pip install * -f ./ --no-index
Sachin

Jawaban yang mirip dengan “Phow untuk menginstal modul python di internet di Sercer”

Pertanyaan yang mirip dengan “Phow untuk menginstal modul python di internet di Sercer”

Lebih banyak jawaban terkait untuk “Phow untuk menginstal modul python di internet di Sercer” di Python

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya