liamholtlab / GEMspa

GNU General Public License v3.0
1 stars 3 forks source link

Error on Windows #2

Open sameerbau opened 2 years ago

sameerbau commented 2 years ago

Hello,

We are using Anaconda on Windows 10.

C:\Users\LAB-PC-2\gempsa-python\Scripts\python C:\Users\LAB-PC-2\Desktop\GEMspa\**gui_tester.py** is working fine. Confirming that wxpython and other libraries are installed.

When using Conda prompt and entering the commands:

C:\Users\LAB-PC-2\gempsa-python\Scripts\python C:\Users\LAB-PC-2\Desktop\GEMspa\**main_gui.py**

We get error:


Traceback (most recent call last):
  File "C:\Users\LAB-PC-2\Desktop\GEMspa\main_gui.py", line 6, in <module>
    import trajectory_analysis as tja
  File "C:\Users\LAB-PC-2\Desktop\GEMspa\trajectory_analysis.py", line 7, in <module>
    import matplotlib.pyplot as plt
  File "C:\Users\LAB-PC-2\gempsa-python\lib\site-packages\matplotlib\pyplot.py", line 2336, in <module>
    switch_backend(rcParams["backend"])
  File "C:\Users\LAB-PC-2\gempsa-python\lib\site-packages\matplotlib\__init__.py", line 703, in __getitem__
    plt.switch_backend(rcsetup._auto_backend_sentinel)
  File "C:\Users\LAB-PC-2\gempsa-python\lib\site-packages\matplotlib\pyplot.py", line 256, in switch_backend
    switch_backend(candidate)
  File "C:\Users\LAB-PC-2\gempsa-python\lib\site-packages\matplotlib\pyplot.py", line 276, in switch_backend
    class backend_mod(matplotlib.backend_bases._Backend):
  File "C:\Users\LAB-PC-2\gempsa-python\lib\site-packages\matplotlib\pyplot.py", line 277, in backend_mod
    locals().update(vars(importlib.import_module(backend_name)))
  File "C:\Users\LAB-PC-2\Anaconda3\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "C:\Users\LAB-PC-2\gempsa-python\lib\site-packages\matplotlib\backends\backend_qt5agg.py", line 11, in <module>
    from .backend_qt5 import (
  File "C:\Users\LAB-PC-2\gempsa-python\lib\site-packages\matplotlib\backends\backend_qt5.py", line 16, in <module>
    import matplotlib.backends.qt_editor.figureoptions as figureoptions
  File "C:\Users\LAB-PC-2\gempsa-python\lib\site-packages\matplotlib\backends\qt_editor\figureoptions.py", line 11, in <module>
    from matplotlib.backends.qt_compat import QtGui
  File "C:\Users\LAB-PC-2\gempsa-python\lib\site-packages\matplotlib\backends\qt_compat.py", line 172, in <module>
    _setup()
  File "C:\Users\LAB-PC-2\gempsa-python\lib\site-packages\matplotlib\backends\qt_compat.py", line 132, in _setup_pyqt4
    _setup_pyqt4_internal(api=2)
  File "C:\Users\LAB-PC-2\gempsa-python\lib\site-packages\matplotlib\backends\qt_compat.py", line 115, in _setup_pyqt4_internal
    sip.setapi(_sip_api, api)
AttributeError: module 'sip' has no attribute 'setapi'

Please advise.

snkeegan commented 2 years ago

There seems to be an incompatibility between matplotlib v3.4 and PyQt4.

Try downgrading the version of matplotlib:

pip uninstall matplotlib

python -m pip install matplotlib==3.2

Or, upgrading PyQt:

pip install PyQt5

If you still have problems, and you did not start from python v3.7, as mentioned in the User Manual, try this.


From: sameerbau @.***> Sent: Wednesday, December 22, 2021 10:35:55 PM To: liamholtlab/GEMspa Cc: Subscribed Subject: [liamholtlab/GEMspa] Error on Windows (Issue #2)

[EXTERNAL]

Hello,

We are using Anaconda on Windows 10.

C:\Users\LAB-PC-2\gempsa-python\Scripts\python C:\Users\LAB-PC-2\Desktop\GEMspa**gui_tester.py** is working fine. Confirming that wxpython and other libraries are installed.

When using Conda prompt and entering the commands:

C:\Users\LAB-PC-2\gempsa-python\Scripts\python C:\Users\LAB-PC-2\Desktop\GEMspa**main_gui.py**

We get error:

Traceback (most recent call last): File "C:\Users\LAB-PC-2\Desktop\GEMspa\main_gui.py", line 6, in import trajectory_analysis as tja File "C:\Users\LAB-PC-2\Desktop\GEMspa\trajectory_analysis.py", line 7, in import matplotlib.pyplot as plt File "C:\Users\LAB-PC-2\gempsa-python\lib\site-packages\matplotlib\pyplot.py", line 2336, in switch_backend(rcParams["backend"]) File "C:\Users\LAB-PC-2\gempsa-python\lib\site-packages\matplotlib__init.py", line 703, in getitem__ plt.switch_backend(rcsetup._auto_backend_sentinel) File "C:\Users\LAB-PC-2\gempsa-python\lib\site-packages\matplotlib\pyplot.py", line 256, in switch_backend switch_backend(candidate) File "C:\Users\LAB-PC-2\gempsa-python\lib\site-packages\matplotlib\pyplot.py", line 276, in switch_backend class backend_mod(matplotlib.backend_bases._Backend): File "C:\Users\LAB-PC-2\gempsa-python\lib\site-packages\matplotlib\pyplot.py", line 277, in backend_mod locals().update(vars(importlib.import_module(backend_name))) File "C:\Users\LAB-PC-2\Anaconda3\lib\importlib__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "C:\Users\LAB-PC-2\gempsa-python\lib\site-packages\matplotlib\backends\backend_qt5agg.py", line 11, in from .backend_qt5 import ( File "C:\Users\LAB-PC-2\gempsa-python\lib\site-packages\matplotlib\backends\backend_qt5.py", line 16, in import matplotlib.backends.qt_editor.figureoptions as figureoptions File "C:\Users\LAB-PC-2\gempsa-python\lib\site-packages\matplotlib\backends\qt_editor\figureoptions.py", line 11, in from matplotlib.backends.qt_compat import QtGui File "C:\Users\LAB-PC-2\gempsa-python\lib\site-packages\matplotlib\backends\qt_compat.py", line 172, in _setup() File "C:\Users\LAB-PC-2\gempsa-python\lib\site-packages\matplotlib\backends\qt_compat.py", line 132, in _setup_pyqt4 _setup_pyqt4_internal(api=2) File "C:\Users\LAB-PC-2\gempsa-python\lib\site-packages\matplotlib\backends\qt_compat.py", line 115, in _setup_pyqt4_internal sip.setapi(_sip_api, api) AttributeError: module 'sip' has no attribute 'setapi'

Please advise.

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/liamholtlab/GEMspa/issues/2__;!!MXfaZl3l!PK8OFJt1xcErhsX9cBf3Oz59BN-RVMJ7dkM5Ue9UkXPYA4SwxV6KKpZCTV6K54z6EQgzew$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AAV5H5RU55LBJBVLJKPKOXDUSKKJXANCNFSM5KT4EUKQ__;!!MXfaZl3l!PK8OFJt1xcErhsX9cBf3Oz59BN-RVMJ7dkM5Ue9UkXPYA4SwxV6KKpZCTV6K54y0F0WVpw$. Triage notifications on the go with GitHub Mobile for iOShttps://urldefense.com/v3/__https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675__;!!MXfaZl3l!PK8OFJt1xcErhsX9cBf3Oz59BN-RVMJ7dkM5Ue9UkXPYA4SwxV6KKpZCTV6K54z-i4Dq-g$ or Androidhttps://urldefense.com/v3/__https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign*3Dnotification-email*26utm_medium*3Demail*26utm_source*3Dgithub__;JSUlJSU!!MXfaZl3l!PK8OFJt1xcErhsX9cBf3Oz59BN-RVMJ7dkM5Ue9UkXPYA4SwxV6KKpZCTV6K54zto0F7_w$. You are receiving this because you are subscribed to this thread.Message ID: @.***>


This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.