Hi Garrett,
You can’t remove numpy from Chimera — it needs numpy to start up.  Once you remove it, you only option really is to reinstall Chimera from scratch.  Chimera ships will numpy 1.7.2 preinstalled.  You either need to install a version of pandas compatible with numpy 1.7.2, or you need to upgrade numpy to whatever version is compatible with the pandas you want to use.  You install a specific version of pandas with:

chimera --nogui --script `chimera --root`"/bin/pip install pandas=version_compatible_with_numpy”

You might be able to upgrade the numpy inside Chimera similarly with:

chimera --nogui --script `chimera --root`"/bin/pip install numpy=version_for_pandas”

I’m not 100% certain the latter will work, or that Chimera will work smoothly with a different version of numpy.

—Eric

On Apr 1, 2024, at 7:17 AM, Garrett Scapellato via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:



Garrett Scapellato

Research Technician II
Edwards Lab
DHVI
Duke University

<Outlook-xq1gx0pd.jpg>

From: Garrett Scapellato <garrett.scapellato@duke.edu>
Sent: Friday, March 29, 2024 2:24 PM
To: pett@cgl.ucsf.edu <pett@cgl.ucsf.edu>
Subject: Re: Chimera numpy error
 
Eric,

Apologies for sending so many emails. I was able to delete all numpy modules from Chimera. Now when I try to open Chimera I get this error.

Traceback (most recent call last):
  File "/Applications/Chimera.app/Contents/Resources/share/__main__.py", line 73, in <module>
    value = chimeraInit.init(sys.argv)
  File "/Applications/Chimera.app/Contents/Resources/share/chimeraInit.py", line 680, in init
    import chimera
  File "/Applications/Chimera.app/Contents/Resources/share/chimera/__init__.py", line 2782, in <module>
    from SimpleSession import BEGIN_RESTORE_SESSION, END_RESTORE_SESSION
  File "/Applications/Chimera.app/Contents/Resources/share/SimpleSession/__init__.py", line 14, in <module>
    from save import saveSession, sessionID, noAutoRestore, autoRestorable, \
  File "/Applications/Chimera.app/Contents/Resources/share/SimpleSession/save.py", line 13, in <module>
    from chimera import replyobj, selection, SessionPDBio, version
  File "/Applications/Chimera.app/Contents/Resources/share/chimera/selection/__init__.py", line 1033, in <module>
    from chimera import oslParser
  File "/Applications/Chimera.app/Contents/Resources/share/chimera/oslParser.py", line 690, in <module>
    import numpy
ImportError: No module named numpy

I tried reinstalling numpy the same way I installed pandas, but I get the same error as above. How can I fix this issue?

Thanks,
Garrett Scapellato

Research Technician II
Edwards Lab
DHVI
Duke University

<Outlook-t5tu01ez.jpg>

From: Garrett Scapellato
Sent: Friday, March 29, 2024 2:11 PM
To: pett@cgl.ucsf.edu <pett@cgl.ucsf.edu>
Subject: Chimera numpy error
 
Eric,

I get the following error whenever I try to open chimera. I tried uninstalling numpy with a pip installer, and that didn't work, I assume because it doesn't uninstall the module from chimera specifically. 

DHVI-F5KJC04Q:~ edwardslab$ chimera
Traceback (most recent call last):
  File "/Applications/Chimera.app/Contents/Resources/share/__main__.py", line 73, in <module>
    value = chimeraInit.init(sys.argv)
  File "/Applications/Chimera.app/Contents/Resources/share/chimeraInit.py", line 680, in init
    import chimera
  File "/Applications/Chimera.app/Contents/Resources/share/chimera/__init__.py", line 2782, in <module>
    from SimpleSession import BEGIN_RESTORE_SESSION, END_RESTORE_SESSION
  File "/Applications/Chimera.app/Contents/Resources/share/SimpleSession/__init__.py", line 14, in <module>
    from save import saveSession, sessionID, noAutoRestore, autoRestorable, \
  File "/Applications/Chimera.app/Contents/Resources/share/SimpleSession/save.py", line 13, in <module>
    from chimera import replyobj, selection, SessionPDBio, version
  File "/Applications/Chimera.app/Contents/Resources/share/chimera/selection/__init__.py", line 1033, in <module>
    from chimera import oslParser
  File "/Applications/Chimera.app/Contents/Resources/share/chimera/oslParser.py", line 690, in <module>
    import numpy
  File "/Applications/Chimera.app/Contents/Resources/lib/python2.7/site-packages/numpy/__init__.py", line 142, in <module>
    from . import core
  File "/Applications/Chimera.app/Contents/Resources/lib/python2.7/site-packages/numpy/core/__init__.py", line 91, in <module>
    raise ImportError(msg.format(path))
ImportError: Something is wrong with the numpy installation. While importing we detected an older version of numpy in ['/Applications/Chimera.app/Contents/Resources/lib/python2.7/site-packages/numpy']. One method of fixing this is to repeatedly uninstall numpy until none is found, then reinstall this version.


I also tried 
rm -rf ~/Applications/Chimera.app/Contents/Resources/lib/python2.7/site-packages/numpy/
repeatedly, but that didn't work. I couldn't use Finder to navigate to the python2.7 folder to delete the files manually, either. Any help would be appreciated.


Thanks,
Garrett Scapellato

Research Technician II
Edwards Lab
DHVI
Duke University

<Outlook-grtstsda.jpg>
_______________________________________________
Chimera-users mailing list -- chimera-users@cgl.ucsf.edu
To unsubscribe send an email to chimera-users-leave@cgl.ucsf.edu
Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimera-users@cgl.ucsf.edu/