Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pyqt not found when installing from Conda/Anaconda #267

Open
guyADL opened this issue Feb 27, 2025 · 1 comment
Open

Pyqt not found when installing from Conda/Anaconda #267

guyADL opened this issue Feb 27, 2025 · 1 comment

Comments

@guyADL
Copy link

guyADL commented Feb 27, 2025

Hello, I just had to start with a fresh install of Anaconda and I found that Pyfda failed with the Pyqt not found issue. However I found an easy work around.

The method that failed was-
Created Pyfda environment using Anaconda Navigator Gui. This forces you to choose a version of python to preinstall and defaults to 3.12.9
Then I used the command line as per your readme-
conda install --channel=conda-forge pyfda

Pyfdax won't run.

Traceback (most recent call last):
File "C:\ProgramData\anaconda3\envs\pyfda_bad\Scripts\pyfdax-script.py", line 5, in
from pyfda.pyfdax import main
File "C:\ProgramData\anaconda3\envs\pyfda_bad\Lib\site-packages\pyfda\pyfdax.py", line 23, in
import pyfda.pyfda_rc as rc
File "C:\ProgramData\anaconda3\envs\pyfda_bad\Lib\site-packages\pyfda\pyfda_rc.py", line 19, in
from pyfda import qrc_resources # contains all icons
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\anaconda3\envs\pyfda_bad\Lib\site-packages\pyfda\qrc_resources.py", line 9, in
from PyQt5 import QtCore
ModuleNotFoundError: No module named 'PyQt5'

conda list qt
gives the following

Name Version Build Channel
pyqt 6.7.1 py312h5da7b33_0
pyqt6-sip 13.9.1 py312h827c3e9_0
qtbase 6.7.2 h0804d20_1
qtdeclarative 6.7.2 h5da7b33_0
qtsvg 6.7.2 hf2fb9eb_0
qttools 6.7.2 h0de5f00_0
qtwebchannel 6.7.2 h5da7b33_0
qtwebsockets 6.7.2 h5da7b33_0

If however the pyfda environment is created from a terminal window using the command line interface then everything is okay-

conda create --name pyfda
conda install --channel=conda-forge pyfda

At this stage pyfdax runs fine.

For information the following libraries are present when the environment is created like this

Name Version Build Channel
pyqt 5.15.10 py313h5da7b33_1
pyqt5-sip 12.13.0 py313h827c3e9_1
qt-main 5.15.15 h9151539_2 conda-forge

@chipmuenk
Copy link
Owner

Thanks for reporting the issue, I'll add your workaround to the installation description. I will enable different Qt versions with qtpy in the future, but this is a major rework ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants