installing python packages without internet and using source code as .tar.gz and .whl

前端 未结 5 718
春和景丽
春和景丽 2020-11-28 18:58

we are trying to install couple of python packages without internet.

For ex : python-keystoneclient

For that we have the packages downloade

5条回答
  •  無奈伤痛
    2020-11-28 19:19

    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
    

提交回复
热议问题