在没有网络的ubuntu中离线安装python包:

 

一般包的安装方法:

  1. 下载对应的tar.gz文件(以numpy-9.2.tar.gz为例子)
  2. tar –zxvf numpy-1.9.tar.gz
  3. cd numpy-1.9.2
  4. python setup.py install

 

但是有时也会遇见一些包不行的情况,比如jupyter-client

此时将第四步换成

python  setup.py install --single-version-externally-managed --root=/

 

还不行的话就下载whl文件(比如jsonschema)

pip install jsonschema-3.2.0-py2.py3-none-any.whl -f ./ --no-index --no-deps

 

猜你喜欢

转载自blog.csdn.net/qq_36321330/article/details/114364288
今日推荐