Skip to content

[Solved][Python] FileNotFoundError: [Errno 2] No such file or directory: ‘/tmp/pip-build-8lcjii2e/PyQt5/setup.py’

Today when I configuring a new environment on new device (use pip3 install PyQt5), I got the following error message:

FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-build-8lcjii2e/PyQt5/setup.py'


I feel confused. Why did pip command cannot find the file? I think the problem is pip command or PyQt5.


Solution

I think update pip command is better than downgrade PyQt5 version.

pip3 install --upgrade pip
pip3 -V


Output:

pip 21.1.2 from /home/clay/.local/lib/python3.6/site-packages/pip (python 3.6)


The try to install PyQt5 again, this time it was successful.

Note: If you encountered error message FileNotFoundError with open() function, you can refer this article: [Solved][Python] FileNotFoundError: [Errno 2] No such file or directory: ‘xxx.txt’


References


Read More

Leave a Reply