question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with using wrong pyrcc

See original GitHub issue

šŸ› Bug

I updated napari to post- #1229 and napari started failing when trying to build icons on Windows after importing napari: https://github.com/napari/napari/blob/96e9722419a5b0adddbc14fe12c69a7d769f8758/napari/resources/build_icons.py#L178

Cause

This may be a non-issue for others, but became an issue for me. Basically, each of these binaries were called: 'pyrcc5.bat', 'pyrcc5', 'pyside2-rcc'

and my vanilla python virtual environment didn’t have pyrcc5.bat, but my base anaconda install was on path (bottom of list), and was the only source of pyrcc5.bat. This then failed, because it was found, but didn’t have pyqt5-sip I believe. Rearranging so that pyrcc5 was tried first fixed the issue for me.

This is a weird bug because I happened to have an Anaconda install on my path that happened to have pyrcc5.bat, and is kind of my fault. I don’t know if it makes sense for you to rearrange the binaries to try, or ensure it’s coming from the same environment. At least this is an explanation for anyone else getting a similar error:

subprocess.CalledProcessError: Command '['pyrcc5.bat', '-o', 'XXX\\lib\\site-packages\\napari\\resources\\_qt_resources_0.3.1_pyqt5_5.14.0.py', 'XXX\\lib\\site-packages\\napari\\resources\\res.qrc']' returned non-zero exit status 1.

@tlambert03

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:23 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
ajitjohnsoncommented, Dec 1, 2020

@tlambert03 You were right, I think python 3.7 outside conda was causing the issue. Here is what I did to fix it,

  1. Uninstalled native python through the add/remove programs interface in windows
  2. removed the native version from PATH like so
  3. Deleted the entire python folder that was in the PATH- Mine was within C:\Users\ajn16\AppData\Roaming\Python
  4. Restarted the computer.

After that,

conda create --name napari_new python=3.7
conda activate napari_new
pip install napari pyqt5

python
>>> import napari

# loads napari without any warnings. YEYY!!

Thanks for figuring this out @tlambert03 and hope it is helpful for others who find this thread 😃

Best, Ajit.

1reaction
tlambert03commented, Aug 6, 2020

I see… if pip doesn’t see numpy>=1.10.0 from PyPI when it tries to install napari, it will likely overwrite whatever is already there. You might have better luck with conda, which is pretty good about compatibility with MKL. cheers

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error while using pyrcc5 - python - Stack Overflow
For anyone facing this issue in the future, here is how I solved it. find the following batch file : pyuic5.bat. Which is...
Read more >
Problem converting qrc file into py one by PyQt5 [duplicate]
When I execude the code from Windows commande, pyrcc4 is not recognized as internal or external command, executal program or command file. enterĀ ......
Read more >
PyQt v4 - Python Bindings for Qt v4 - FTP Directory Listing
pyrcc4 will now generate code for Python v3 when the new -py3 command ... Use this if configure.py is having problems to see...
Read more >
pyqt-distutils 0.2.1 - PyPI
files: list of file pairs made up of the source ui file and the destination package. pyrcc: the name of the pyrcc tool...
Read more >
ImportError: No module named resource_rc - Yasoob Khalid
pyrcc4 then compiles the resource file into Python which can easily be imported and used in Python. That solution solved my problem. So...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found