python pip安装包使用PyPI国内源

python3安装的包

用国内资源如下:
阿里云 http://mirrors.aliyun.com/pypi/simple/

中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

豆瓣(douban) http://pypi.douban.com/simple/

清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/

中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/

from Crypto.Cipher import AES报错

python 在 Windows下使用AES时要安装的是pycryptodome 模块  
pip install pycryptodome -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

python 在 Linux下使用AES时要安装的是pycrypto模块   
pip install pycrypto -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

pip install requests==2.25.1 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

pip install scikit-image -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
pip install Pillow -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install lxml -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install js2py -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install flask -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install tornado -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install pyppeteer -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

pip install selenium -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install retrying -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install oss2 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install pymysql==0.9.3 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install pywin32==223 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

pip install pywin32-ctypes==0.2.0 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install fonttools==4.2.0 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install demjson==2.2.4 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install pymongo -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

pip install muggle_ocr -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install muggle_ocr -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com  阿里云

pip install colorlog -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install pyDes -i http://pypi.douban.com/simple --trusted-host pypi.douban.com


以上安装包错误解决方法如下命令

pip install PyExecJS  -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

注意一定要先装redis依赖,因为不管选择哪个版本的redis-py-cluster,它都会自动安装最新的redis依赖版本

本人安装2.10.6版本
pip install redis==
pip install redis==2.10.6

本人安装1.3.6版本
pip install redis-py-cluster ==
pip install redis-py-cluster==1.3.6

redis 和 redis-py-cluster版本一定要对应,不然会连接报错

pip install redis==2.10.6 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install redis-py-cluster==1.3.6 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

安装百度AIP方法,识别图片
from aip import AipImageClassify

pip install baidu-aip -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

pip install frida -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install frida-tools -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

pip install frida==12.11.16 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install frida-tools==9.0.1 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

安装拦截工具包mitmproxy

pip install mitmproxy -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install mitmproxy==5.0.0 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
from gmssl import sm2, func
from gmssl.sm4 import CryptSM4, SM4_ENCRYPT, SM4_DECRYPT
pip install gmssl
pip install gevent

No module named 'gevent'
Traceback (most recent call last):
File "D:/Yuanshiwork/app/run_app.py", line 4, in
from gevent import monkey;monkey.patch_all()
ModuleNotFoundError: No module named 'gevent'

pip install pycryptodomex

Traceback (most recent call last):
File "D:/1.0.4/app/models/fei_dai.py", line 31, in
from Cryptodome.PublicKey import RSA
ModuleNotFoundError: No module named 'Cryptodome'

Scrapy 框架安装
pip install scrapy==1.5.1 -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com


如果导 PIL 包 报错
from PIL import Image
ModuleNotFoundError: No module named 'PIL'

pip install pillow -image -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
pip 升级
python -m pip install --upgrade pip -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
python 版本3.8.5
pip install lxml 
python 版本3.8.5
pip install matplotlib==3.5.2 -i http://mirrors.aliyun.com/pypi/simple/

No module named “Crypto” 解决方案

python 版本3.8.5

pip uninstall crypto pycryptodome
pip install pycryptodome

posted @ 2020-06-16 11:39  莫贞俊晗  阅读(1305)  评论(0编辑  收藏  举报