Py-ChemShell ./test FAILED

Dear all,

Last month I installed py-ChemShell within a conda environment and it worked perfectly fine. All test jobs were running as expected and I was able to use it with external softwares like turbomole. For running QM/MM calculations I installed GULP and tried to clean up the existing build before running it again. After that step, nothing worked anymore. When looking at the failed test runs it shows me the error message “NameError: name ‘Fragment’ is not defined”.
I tried sevaral things which did not work:

  • I removed and deleted GULP and tried to set py-ChemShell up without GULP again
  • I created a new environment on conda
  • I reinstalled py-Chemshell
  • I even reinstalled anaconda

I also checked my $PYTHONPATH which is also fine.

Is there maybe anything else I’m missing?

Thank you in advance!

Best,
Dilara

Dear Dilara,

Sorry to hear you are having issues installing py-ChemShell. The error message you describe can be caused by a few things, but is normally due to an issue with python module importing.

Based on the timing in your post I suspect you are running into an issue with the release of Numpy 2.0.0. Unfortunately, the last release of py-ChemShell will install the newest version of Numpy available, which is not compatible with itself.

To check if this is your problem, please run the following command with the same python install you are using with ChemShell
python3 -m pip show numpy
and take note of the version number.

If you have version 2.0.0, you will need to downgrade the installed version with e.g.
python3 -m pip install numpy==1.26.4

This behaviour will be fixed in the next release of ChemShell, but until this is available, the incorrect behaviour can be avoided by using the following option to the setup script:
./setup --no-pip ...
This will prevent the newest version of Numpy being installed for new builds, but will not resolve the issue if the incorrect version of Numpy has already been installed on your system.

If this doesn’t help to resolve your issue, let me know and we can look at the specific error you are getting in more detail.

All the best,
Tom

Dear Tom,

That was indeed the problem! Thank you very much!

Best,
Dilara

Hi @dbalci,

Out of interest could you tell me how you installed pychemshell in conda? This is something we have been discussing to improve support for and I am interested in your experience.

Thanks

Joe

Dear Joe,

First, I created my conda environment named “chemshell” with Python version 3.11 using the command:
conda create -n chemshell python=3.11
and then activated it. (Now I downgraded numpy additionally)

To compile pychemshell, I used the pythondir and pythonlib of the conda environment. I inserted the complete path where my environments can be found:
./setup --fc gfortran-13 --cc gcc-13 --pythondir ~/anaconda3/envs/chemshell/include/python3.11/ --pythonlib ~/anaconda3/envs/chemshell/lib/libpython3.11.so

Since Gaussian, Turbomole, etc. are in my PATH, I can use them within the conda environment I created. For me that worked perfectly fine so far.

Best,
Dilara

1 Like

Hi Dilara,

For info the fix for the numpy issue has now been released in ChemShell v23.0.2, which is available from the Download page on chemshell.org.

Best wishes,

Tom

1 Like