pip3 installation commands repeated failure to create file #39;/tmp/pip-install-xxxxx/package#39;(pip3安装命令重复创建文件/tmp/pip-install-xxxxx/package失败)
问题描述
每当我尝试安装软件包时,例如 pip3 install PyQt5
,该命令都会失败,并显示有关 /tmp
目录中缺少目录的消息
Whenever I try to install a package, for example pip3 install PyQt5
the command fails with a message about a missing directory in the /tmp
directory
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
目录,并且看起来进程根本没有创建它们.
When I look in the /tmp
directory no pip-install-xxxxxxx
directories exist and it looks like the process doesn't create them at all.
推荐答案
作为快速修复,您可以 sudo apt-get install python3-pyqt5
As a quick fix you can sudo apt-get install python3-pyqt5
但是为了你的问题.任何包裹都会发生这种情况吗?
But for the sake of your question. Does this happen with any package?
您可以尝试安装以下任何一个来看看它是否有效,这些只是简单的示例.
Can you try installing any of the following just to see if it works, these are just quick examples.
pip3 install numpy==1.18.1
pip3 install pandas==0.25.3
pip3 install pep8==1.7.1
pip3 install pika==1.1.0
一个原因可能是 PyQt5
将与 python 2
一起使用,因此可能仅适用于 pip install PyQt5
One reason could be that PyQt5
is to be used with python 2
and hence might only work with pip install PyQt5
这篇关于pip3安装命令重复创建文件'/tmp/pip-install-xxxxx/package'失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:pip3安装命令重复创建文件'/tmp/pip-install-xxxxx/package'失败
基础教程推荐
- Dask.array.套用_沿_轴:由于额外的元素([1]),使用dask.array的每一行作为另一个函数的输入失败 2022-01-01
- Python kivy 入口点 inflateRest2 无法定位 libpng16-16.dll 2022-01-01
- 如何在海运重新绘制中自定义标题和y标签 2022-01-01
- 筛选NumPy数组 2022-01-01
- 何时使用 os.name、sys.platform 或 platform.system? 2022-01-01
- 线程时出现 msgbox 错误,GUI 块 2022-01-01
- 如何让 python 脚本监听来自另一个脚本的输入 2022-01-01
- 用于分类数据的跳跃记号标签 2022-01-01
- 在 Python 中,如果我在一个“with"中返回.块,文件还会关闭吗? 2022-01-01
- 使用PyInstaller后在Windows中打开可执行文件时出错 2022-01-01