Python 官方文档:入门教程 => 点击学习
1.安装pip工具[root@tonGC-yum162 ~]# wget https://files.pythonhosted.org/packages/d3/3e/1d74cdcb393b68ab9ee18d78c11ae6df84470
1.安装pip工具
[root@tonGC-yum162 ~]# wget https://files.pythonhosted.org/packages/d3/3e/1d74cdcb393b68ab9ee18d78c11ae6df8447099f55fe86ee842f9c5b166c/setuptools-40.0.0.zip
[root@tongc-yum162 ~]# cd setuptools-40.0.0
[root@tongc-yum162 setuptools-40.0.0]# Python setup.py install
[root@tongc-yum162 ~]# wget Https://files.pythonhosted.org/packages/ae/e8/2340d46ecadb1692a1e455f13f75e596d4eab3D11a57446f08259dee8f02/pip-10.0.1.tar.gz
[root@tongc-yum162 ~]# tar xvf pip-10.0.1.tar.gz
[root@tongc-yum162 ~]# cd pip-10.0.1
[root@tongc-yum162 pip-10.0.1]# python setup.py install
2.pip源配置
[root@tongc-yum162 pip-10.0.1]# mkdir -p /var/www/html/python
[root@tongc-yum162 pip-10.0.1]# pip install pip2pi
3.配置网络源(下载网上的python模块)
[root@tongc-yum162 ~]# vim ~/.pip/pip.conf
[global]
index-url = http://pypi.douban.com/simple/
[install]
trusted-host = pypi.douban.com
[root@tongc-yum162 ~]#
4.下载单个模块
[root@tongc-yum162 ~]# pip2tgz /var/www/html/python hdfs
5.模块批量同步
[root@tongc-yum162 ~]# pip2tgz /var/www/html/python -r 1.txt
--结束END--
本文标题: 搭建python本地源
本文链接: https://lsjlt.com/news/189281.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0