pip3安装命令无法重复创建文件'/ tmp / pip-install-xxxxx / package'

每当我尝试安装软件包时,例如pip3 install PyQt5,该命令就会失败,并显示一条有关/tmp目录中缺少目录的消息

pip3 install PyQt5
Collecting PyQt5
  Downloading https://files.pythonhosted.org/packages/3a/fb/eb51731f2dc7c22d8e1a63ba88fb702727b324c6352183a32f27f73b8116/PyQt5-5.14.1.tar.gz (3.2MB)
    100% |████████████████████████████████| 3.2MB 19.3MB/s 
  Installing build dependencies ... done
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>",line 1,in <module>
      File "/usr/lib/python3.7/tokenize.py",line 447,in open
        buffer = _builtin_open(filename,'rb')
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-0shdy0kn/PyQt5/setup.py'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-0shdy0kn/PyQt5/

当我在/tmp目录中查看时,不存在pip-install-xxxxxxx目录,并且看起来该过程根本没有创建它们。

narcisol 回答:pip3安装命令无法重复创建文件'/ tmp / pip-install-xxxxx / package'

作为快速解决方案,您可以sudo apt-get install python3-pyqt5

但是为了您的问题。任何包装都会发生这种情况吗?

您可以尝试安装以下任何工具只是为了看看是否可行,这些只是简单的示例。

pip3 install numpy==1.18.1
pip3 install pandas==0.25.3
pip3 install pep8==1.7.1
pip3 install pika==1.1.0

一个原因可能是PyQt5python 2一起使用,因此可能仅与pip install PyQt5一起使用

本文链接:https://www.f2er.com/2758293.html

大家都在问