User Tools

Site Tools


python

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
python [2019/11/26 11:59]
jordan
python [2023/03/08 16:09] (current)
xujianglong ↷ Page moved from 内部资料:python to python
Line 1: Line 1:
 人生苦短,我用Python 人生苦短,我用Python
-` 
-# 新手入门 
  
-# Python爬虫+====== 新手入门 ======
  
-[Python爬虫的工具列表](http://python.jobbole.com/82633/)+[[https://www.liaoxuefeng.com/wiki/1016959663602400|廖雪峰Python教程]]
  
-Python Web+====== Python爬虫 ======
  
-Python与深度学习+[[http://python.jobbole.com/82633/|Python爬虫的工具列表]]
  
-Python编码规范+====== Python Web ======
  
-参考[Google Style Guide -- Python](https://google.github.io/styleguide/pyguide.html)+====== Python与深度学习 ======
  
-# pip使用国内源提升下载速度 +====== Python编码规范 ======
-参考[ +
-更改pip源至国内镜像,显著提升下载速度](https://blog.csdn.net/lambert310/article/details/52412059)+
  
-linux下,修改 ~/.pip/pip.conf (没有就创建一个), 修改 index-url至tuna,内容如下:+参考[[https://google.github.io/styleguide/pyguide.html|Google Style Guide -Python]]
  
-``` +====== pip使用国内源提升下载速度 ====== 
- [global] + 
- index-url = https://pypi.tuna.tsinghua.edu.cn/simple +===== 20210213更新 ===== 
-```+ 
 +<code bash> 
 +# 临时使用 
 +pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package 
 +# 设为默认 
 +# pip版本10.0以上 
 +# 如果pip升级太慢,使用pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U升级pip 
 +pip install pip -U 
 +pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple 
 + 
 +</code> 
 + 
 +参考[[https://blog.csdn.net/lambert310/article/details/52412059|更改pip源至国内镜像,显著提升下载速度]] 
 + 
 +linux下,修改 ~/.pip/pip.conf (没有就创建一个), 修改 index-url至tuna,内容如下: 
 +<code> 
 + 
 + [global] 
 + index-url = https://pypi.tuna.tsinghua.edu.cn/simple 
 + 
 +</code> 
 + 
 +windows下,直接在user目录中创建一个pip目录,如:C:,新建文件pip.ini,内容如下 
 + 
 +<code> 
 + [global] 
 + index-url = https://pypi.tuna.tsinghua.edu.cn/simple 
 + 
 +</code> 
 + 
 +====== 私有源构建 ====== 
 + 
 +参照:[[https://zhuanlan.zhihu.com/p/370106440|公司内网搭建Python pip 镜像站]] 
 + 
 +pipenv中添加url安装私有源的包:[[https://docs.pipenv.org/advanced/#generating-a-requirements-txt|Advanced Usage of Pipenv]] 
 + 
 +尝试将公司项目中用到的包放到私有源中,遇到的问题是安装等了很久都没有任何进展,可能是引用了三方库,三方库没有包含在私有源中,导致私有源下载包等很久都没有反应。等有时间的时候再尝试将三方库也放到私有源中试试(这个过程有点儿耗时,貌似还不如直接用whl文件安装)
  
-windows下,直接在user目录中创建一个pip目录,如:C:\Users\xx\pip,新建文件pip.ini,内容如下 
  
-``` 
- [global] 
- index-url = https://pypi.tuna.tsinghua.edu.cn/simple 
-``` 
python.1574740761.txt.gz · Last modified: 2021/02/10 21:29 (external edit)