The Python scripts are all written in Python 2. I adapted them accordingly.
However, I am running into a more difficult issue when the script haddock/Haddock/ThirdParty/DictWithDefault.py
tries to import UserDict (line 3).
After some research, I found out that the module UserDict has been removed and cannot be found in Python 3.
Any suggestions?
Since you’re using Anaconda, the best would be to create an environment for haddock with Python 2.7. We’re doing the same conversion for haddock2.5 and it’s not trivial.
Dear João,
Thanks a lot for the hint. I am just afraid that this command would overwrite the Python 3 version, which I don’t want to loose.
If not, should the command that you recommand be entered from within the software/haddock folder or anywhere else?
When you create Anaconda environments, you isolate an instalation of python and whatever you install there doesn’t impact other environments. If you never create environments, you install and run things from the base environment (the default). This is not ideal because as you mentioned, you risk changing python/library versions and creating conflicts.
In short, when you do “conda activate xyz” you switch to using the python installed in that environment and have access only to libraries installed therein. If you then do “conda deactivate” or “conda activate xyz2”, you leave that environment (and/or move to xyz2).
Let us know if this is unclear and I’d be happy to help you troubleshoot.
Cheers,
João
You can type these commands anywhere, they’re not folder specific either!
Congratulations for the tutorial about environments using conda. It is very well written, so that I could follow it without problem. I will process to the next steps soon.
Thanks again for your prompt answers.