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

前端 未结 5 747
春和景丽
春和景丽 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:11

    This is how I handle this case:

    On the machine where I have access to Internet:

    mkdir keystone-deps
    pip download python-keystoneclient -d "/home/aviuser/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
    

提交回复
热议问题