donovan-h-parks / STAMP

Statistical Analysis of Metagenomic Profiles
GNU General Public License v3.0
91 stars 35 forks source link

ImportError: No module named PyQt4 when running STAMP after installation #36

Open MarwaElnaiem opened 4 years ago

MarwaElnaiem commented 4 years ago

Dear All, I have a problem running STAMP after installation. I created conda environment with 2.7 python version. and then installed it. However, I received the following error when I tried to run it.

Traceback (most recent call last): File "/home/marwa/miniconda3/envs/stamp-env/bin/STAMP", line 32, in <module> from stamp import STAMP File "/home/marwa/miniconda3/envs/stamp-env/lib/python2.7/site-packages/stamp/STAMP.py", line 38, in <module> from stamp.GUI.plotDlg import PlotDlg # forward reference so py2app recognizes this file is required File "/home/marwa/miniconda3/envs/stamp-env/lib/python2.7/site-packages/stamp/GUI/plotDlg.py", line 24, in <module> from PyQt4 import QtGui, QtCore ImportError: No module named PyQt4

I tried to install PyQt4 but I failed. Would you please help me to solve this problem.

Best, Marwa

timyerg commented 3 years ago

Had the same issue on Ubuntu 20.04. For others, who will be looking for a solution and will find this thread:

  1. Remove failed environment (if you cteated one for stamp): conda env remove -n stamp
  2. conda create -n stamp python=2.7
  3. conda activate stamp
  4. pip install numpy
  5. pip install cython
  6. pip install biom-format==2.1.7
  7. pip install STAMP
  8. conda install -n stamp -c asmeurer pyqt=4
  9. STAMP

Found it here: source

przemekiljan commented 2 years ago

@timyerg I know that github issues functionality is mostly for technical discussion, but I would like to thank you very much for that tip. I've been struggling with installing STAMP between time the original issue was posted, and your reply. And it was very frustrating. Thank you for your helpful contribution, especially when it considers such niche topic