基础

常用命令

更新pip版本:python -m pip install --upgrade pip

同时安装多个包:pip install TensorFlow pygame ipython

列出过期的包:pip list --outdated

更新:pip install --upgrade 包名

pip-review

pip-review is a convenience wrapper around pip. It can list available updates by deferring to pip list --outdated. It can also automatically or interactively install available updates for you by deferring to pip install.

查看可更新 pip-review

自动批量升级 pip-review --auto

以交互方式运行,对每个包进行升级 pip-review --interactive

错误及解决

install

关于python安装库,可先查看官方教程:https://packaging.python.org/tutorials/installing-packages/

马大哈aip

pip install aip 报错【Windows,python3.6】

ERROR: Could not find a version that satisfies the requirement aip (from versions: none)
ERROR: No matching distribution found for aip

【解决】【pip install baidu-aip】

老大难aubio

pip intall aubio 报错 【Windows 10,python3.7.6】

Installing collected packages: numpy, aubio
Running setup.py install for aubio ... error

加上清华镜像,下载安装numpy无误,下载aubio无误,安装aubio继续报错

Installing collected packages: aubio
Running setup.py install for aubio ... error

出现ERROR具体处有:

ERROR: Command errored out with exit status 1:
…一串之后…
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd3 in position 0: invalid continuation byte

查看过期包,发现setuptools过期,用pip install --upgrade setuptools更新完,重新安装aubio,报错依旧。

参考CSDN博客,在https://pypi.org/project/aubio/0.4.3a2/#files下载aubio-0.4.3a2-cp35-cp35m-win_amd64.whl,然后进入对应文件夹,用pip install aubio-0.4.3a2-cp35-cp35m-win_amd64.whl,报错:

ERROR: aubio-0.4.3a2-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.

参考CSDN博客,直接将whl名称改为aubio-0.4.3a2-cp35-none-win_amd64.whl,仍然报错:

ERROR: aubio-0.4.3a2-cp35-none-win_amd64.whl is not a supported wheel on this platform.

安装wheel模块后,参考cnblogs博客,查询当前pip支持的文件版本号如下:

sys.version_info < (3, 8))) \
[('cp37', 'cp37m', 'win_amd64'), ('cp37', 'none', 'win_amd64'), ('cp37', 'none', 'any'), ('cp3', 'none', 'any'), ('cp36', 'none', 'any'), ('cp35', 'none', 'any'), ('cp34', 'none', 'any'), ('cp33', 'none', 'any'), ('cp32', 'none', 'any'), ('cp31', 'none', 'any'), ('cp30', 'none', 'any'), ('py3', 'none', 'win_amd64'), ('py37', 'none', 'any'), ('py3', 'none', 'any'), ('py36', 'none', 'any'), ('py35', 'none', 'any'), ('py34', 'none', 'any'), ('py33', 'none', 'any'), ('py32', 'none', 'any'), ('py31', 'none', 'any'), ('py30', 'none', 'any')]

重新pip安装,报错依旧。突发奇想,将上述whl名称改为aubio-0.4.3a2-cp37-cp37m-win_amd64.whl,然后pip安装,成功!但是import失败,说明版本不匹配还是不行??

但是因为下载的实际为cp35版本的,不知道会不会有隐患。所以有unsintall了上述whl,又下载了最新版的aubio-0.4.9源码,python setup.py install 安装,然后报错:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd3 in position 0: invalid continuation byte

以为是编码的问题,修改HPCP,重复上述安装,报错:

...\python\python37\scripts\aubio-0.4.9\python\ext\aubio-types.h(5): fatal error C1083: 无法打开包括文件: “aubio-generated.h”: No such file or directory
error: command 'F:\\zhaoqin\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.13.26128\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

崩溃之后,找到两个貌似有用的链接https://blog.csdn.net/lying_byr/article/details/92802719https://stackoverflow.com/questions/40018405/cannot-open-include-file-io-h-no-such-file-or-directory/50210015#50210015

在VS2017上重新下载了相关组件。添加了两个环境变量:……\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x64  和 ……2017\Community\Common7\IDE  ,报错信息不变。

【目前,删除了VS2017,暂不安装aubio】

参考

1、关于pip工具的一些用法

2、待看待尝试:https://blog.csdn.net/ViMan1204/article/details/89715375

最新文章

  1. Excel取消超级链接
  2. Kinect外包团队(长年承接微软Kinect体感项目外包,有大型Kinect案例)
  3. NET 强签名
  4. LeetCode题解-----Majority Element II 摩尔投票法
  5. POJ-3187 Backward Digit Sums (暴力枚举)
  6. 浏览器中输入URL到返回页面的全过程
  7. [React Testing] Redux Reducers
  8. FJ省队集训DAY2 T2
  9. 借助Net-Speeder对服务器进行优化
  10. VlanTrunk
  11. android开发1:安卓开发环境搭建(eclipse+jdk+sdk)
  12. Android数据库--Sqlcipher的使用(二)
  13. word转pdf swf 在线预览
  14. redux三个基本原则
  15. json和xml封装数据、数据缓存到文件中
  16. UVA 11324 The Largest Clique(强连通分量+缩点DAG的DP)
  17. Maven - 本地仓库(.m2) vs. 远程仓库(联网)
  18. ES6---箭头函数()=&gt;{} 与function的区别(转载)
  19. CSS清除浮动的方法及优缺点
  20. IETF和W3C的区别

热门文章

  1. 【FFMPEG】ffmpeg 中添加264支持
  2. Navicate 许可证
  3. mysql根据时间统计数据语句
  4. Fourier serie
  5. [转帖]ECC公钥格式详解
  6. 小菜鸟之shell
  7. 并发一:Java内存模型和Volatile
  8. Spark Scala当中reduce的用法和例子
  9. LeetCode-第 166 场周赛
  10. X86驱动:挂接SSDT内核钩子