【问题标题】:ERROR: Could not install packages due to an OSError: [[Errno 22] Invalid argument: '/tmp/pip-req-build]错误:由于 OSError 无法安装软件包:[[Errno 22] 无效参数:'/tmp/pip-req-build]
【发布时间】:2021-05-03 22:34:12
【问题描述】:

我用的是Win10自带的linux系统,输入pip install -U .然后就报了一个很严重的错误:

ERROR: Could not install packages due to an OSError: [('/mnt/f/MyDownloads/Download/cactus-bin-v1.2.3/.git/branches', '/tmp/pip-req-build-luuzar9x/.git/branches', "[Errno 22] Invalid argument: '/tmp/pip-req-build-luuzar9x/.git/branches'"), ('/mnt/f/MyDownloads/Download/cactus-bin-v1.2.3/.git/hooks', '/tmp/pip-req-build-luuzar9x/.git/hooks', "[Errno 22] Invalid argument: '/tmp/pip-req-build-luuzar9x/.git/hooks'"), ('/mnt/f/MyDownloads/Download/cactus-bin-v1.2.3/.git/info', '/tmp/pip-req-build-luuzar9x/.git/info', "[Errno 22] Invalid argument: '/tmp/pip-req-build-luuzar9x/.git/info'"), ('/mnt/f/MyDownloads/Download/cactus-bin-v1.2.3/.git/logs/refs/heads', '/tmp/pip-req-build-luuzar9x/.git/logs/refs/heads', "[Errno 22] Invalid argument: '/tmp/pip-req-build-luuzar9x/.git/logs/refs/heads'"), ('/mnt/f/MyDownloads/Download/cactus-bin-v1.2.3/.git/logs/refs/remotes/origin', '/tmp/pip-req-build-luuzar9x/.git/logs/refs/remotes/origin', "[Errno 22] Invalid argument: '/tmp/pip-req-build-luuzar9x/.git/logs/refs/remotes/origin'"), ('/mnt/f/MyDownloads/Download/cactus-bin-v1.2.3/.git/logs/refs/remotes', '/tmp/pip-req-build-luuzar9x/.git/logs/refs/remotes', "[Errno 22] Invalid argument: '/tmp/pip-req-build-luuzar9x/.git/logs/refs/remotes'"), ('/mnt/f/MyDownloads/Download/cactus-bin-v1.2.3/.git/logs/refs', '/tmp/pip-req-build-luuzar9x/.git/logs/refs', "[Errno 22] Invalid argument: '/tmp/pip-req-build-luuzar9x/.git/logs/refs'"), ('/mnt/f/MyDownloads/Download/cactus-bin-v1.2.3/.git/logs', '/tmp/pip-req-build-luuzar9x/.git/logs', "[Errno 22] Invalid argument: '/tmp/pip-req-build-luuzar9x/.git/logs'"), 

我用的是python3.6,内置的linux系统就是调出来的。我真的不知道为什么会出现这样的错误。

【问题讨论】:

    标签: python linux pip cactus


    【解决方案1】:

    您是否尝试过升级您的 python 版本?您可以在 Windows 中从添加/删除程序中执行此操作,或者如果您有巧克力:从您的 powershell(以管理员身份打开)只需运行:

    choco upgrade python
    

    在 linux 中,您可以通过运行来执行此操作(取决于您的发行版,您可能需要使用 yumdnf 而不是 apt) :

    apt update
    apt upgrade python
    

    如果您不是 root(管理员),您可能需要在命令前添加 sudo。 我希望这能解决您的问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-27
      • 1970-01-01
      • 2021-09-06
      • 2019-06-07
      • 2018-10-05
      相关资源
      最近更新 更多