在使用 pip 安装软件时,报错如下

$ pip install numpy
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 290, in run
    with self._build_session(options) as session:
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 69, in _build_session
    if options.cache_dir else None
  File "/usr/lib/python3.6/posixpath.py", line 80, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not int

解决方法是升级一下 pip 版本,并重新安装即可

$ curl https://bootstrap.pypa.io/get-pip.py | python -
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1892k  100 1892k    0     0  1958k      0 --:--:-- --:--:-- --:--:-- 1956k
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/, https://pypi.ngc.nvidia.com
Collecting pip
  Downloading http://mirrors.aliyun.com/pypi/packages/cd/82/04e9aaf603fdbaecb4323b9e723f13c92c245f6ab2902195c53987848c78/pip-21.1.2-py3-none-any.whl (1.5 MB)
     |████████████████████████████████| 1.5 MB 407 kB/s 
Installing collected packages: pip
Successfully installed pip-21.1.2

TypeError: expected str, bytes or os.PathLike object, not int(解决方法)相关推荐

  1. pip安装库包遇到错误:TypeError: expected str, bytes or os.PathLike object, not int 的解决方法

    1 问题描述 1.在安装python3的库包时候,遇到和os模块相关的错误:TypeError: expected str, bytes or os.PathLike object, not int, ...

  2. 解决HuggingFace加载预训练模型时报错TypeError: expected str, bytes or os.PathLike object, not NoneType

    完整报错: TypeError: expected str, bytes or os.PathLike object, not NoneType 解决方法 检查下载的组件: 步骤1:完整的下载组件,包 ...

  3. TypeError: expected str, bytes or os.PathLike object, not module

    TypeError: expected str, bytes or os.PathLike object, not module 目录 TypeError: expected str, bytes o ...

  4. PyQt:成功解决Exception quot;unhandled TypeErrorquot; expected str, bytes or os.PathLike object, no

    PyQt:成功解决Exception "unhandled TypeError" expected str, bytes or os.PathLike object, no 目录 ...

  5. Django 遇到的错误:expected str, bytes or os.PathLike object, not _io.TextIOWrapper

    1.由于在开发一个导出pdf的功能,在之前已经写过一篇所遇到的错误记录文档,文章链接如下:https://blog.csdn.net/u012561176/article/details/836552 ...

  6. Pyinstaller封装exe-TypeError: expected str, bytes or os.PathLike object, not NoneType

    在项目根目录下按照下面路径打开, \venv\Lib\site-packages\PyInstaller\depend\bindepend.py 搜索 Applies only to non Wind ...

  7. HTTP Status 500 - Could not write content: Object is null 解决方法

    HTTP Status 500 - Could not write content: Object is null 解决方法 参考文章: (1)HTTP Status 500 - Could not ...

  8. linux qemu 报错 Unable to reserve 0xfffff000 bytes of virtual address space at 0x1000 解决方法

    目录 错误现象 可能原因 解决过程 解决方法 错误现象 使用 qemu-i686 运行 i686平台文件 报错 qemu-i686: Unable to reserve 0xfffff000 byte ...

  9. 000210什么意思 error_黑莓系统错误代码BlackBerry 10 OS Error Codes释义及解决方法

    黑莓手机因系统问题无法正常开机时,系统会在屏幕上显示出系统错误代码,这些代码代表不同的含义,告诉我们当前黑莓系统出现了什么问题.了解错误代码的含义,我们就可以对应的来解决出现的问题. Blackber ...

最新文章

  1. mfs分布式存储+master端高可用
  2. leetcode 101. 对称二叉树 递归解法
  3. Android开发之广播
  4. 美国算法交易的影响和启示
  5. iOS 给测试人员测试手机APP的四种方法:真机运行(略),打ipa包,(testFlighe)邮件,蒲公英(一)打ipa包
  6. python turtle原点位置_python中turtle库中setworldcoordinates(坐标系的移动)
  7. 史上最全三维建模软件汇总
  8. FPGA-VGA驱动
  9. 161张Menhera酱表情包 无水印汉化版
  10. 中文分词之维特比算法详解
  11. 我的爱好作文玩计算机800,我的爱好作文800字
  12. 【操作系统】操作系统的发展历程——手工阶段、批处理阶段、分时操作系统、实时操作系统
  13. matlab 五数总括,Matlab 数据类型  五、表
  14. matlab求隐函数二阶导,求隐函数二阶导数.ppt
  15. [Codevs] 一塔湖图
  16. 云客Drupal源码分析之配置系统Configuration(一)
  17. MarkDwon功能介绍
  18. 技多不压身,史上最全IT学习视频高清全集
  19. 如何创建workspace_步骤
  20. UE4 Nav导航路线选择设置

热门文章

  1. 计算机还原桌面后黑屏,图文教您win7系统开机进入桌面后显示黑屏的恢复办法...
  2. 织梦上一篇下一篇没有了改为英文
  3. jQuery如何通过点击按钮实现图片的切换,和超链接地址的跳转?
  4. 基于PLC的工业晾晒架系统
  5. C/C++实现桥牌发牌程序
  6. Markdown代码块语言类型识别
  7. 中睿职称计算机考试模块,2012年衡阳市中睿典职称计算机Windows模块操作试题及答案.doc...
  8. 用multipart/form-data提交表单文件数据获取不了解决办法
  9. mysql从零基础到基础熟练
  10. 不定方程求解(C语言)