1

我使用的是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系统就是调出来的。我真的不知道为什么会出现这样的错误。

4

1 回答 1

0

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

choco upgrade python

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

apt update
apt upgrade python

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

于 2021-02-01T07:58:47.000 回答