pip下安装python包

1. 先试一下pip install + 自己所需要安装的包

例如: C:\Users\Administrator\Desktop>pip install mlpy

如果报错类似:Command "d:\python3.7.1\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-j8s6pc_u\\mlpy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\ADMINI~1\AppData\Local\Temp\pip-record-eg1yy3q6\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-j8s6pc_u\mlpy\

2. 那就试一下手动安装吧【建议一下Git bash在当前位置打开命令行】

2.1 访问https://www.lfd.uci.edu/~gohlke/pythonlibs/ 

2.2 ctrl+F找到自己需要的包,cp后面是python版本,win后面显示64位还是32微系统,选适合自己的,不然会失败

2.3 在下载文件处打开命令窗口

Administrator@PC-20180927KSQG MINGW64 /d/Downloads
$ pip install mlpy-3.5.0-cp37-cp37m-win_amd64.whl

进行安装。

3 安装成功。

如果安装失败,建议重装python。

作者本人之前由于系统重装,导致python能运行,但安装各种包都失败了,重装python后一切安装均正常。

猜你喜欢

转载自blog.csdn.net/qq_40801709/article/details/85138457
今日推荐