Closed merkdfb closed 4 years ago
You should install the missing modules. Try with this:
pip install openbabel
Thank you for the response.
That has already been done. As far as I can tell, all required modules have been installed.
Are you using any environment? Like conda, for example?
No I don't believe so
Ok, so that's my suggestion. First of all install conda: I suggest anaconda, because this way you import most useful libraries in this field in a very easy way. If you want to save space, you can install miniconda: it will require more steps, but it's okay.
Install anaconda: https://www.anaconda.com/distribution/ Installer for miniconda: https://docs.conda.io/en/latest/miniconda.html
Then you have to create an environment. It's super-easy. In this case, you can call the environment "dp4", for example. So you launch:
conda create --name dp4
Now you have created a safe "virtual box", but you must go inside. Launch:
conda activate dp4
So you're moving in a safe space, but you have to install all the useful modules. You can install both with pip
and with conda
command. I suggest pip because you already know that.
When you finish, go in the dp4 folder, activate the env there and launch the GUI:
python PyDP4_GUI .py
EDIT! I was forgetting to suggest the conda distribution for openbabel. Install with this command:
conda install -c bioconda openbabel
What version of openbabel have you got installed? The DP4-AI was developed with openbabel 2.4.1.The most recent version 3.0 broke some imports, so for the time being I would suggest to always use the 2.4.1 version. There is already a pull request trying to fix this and allow both the old and the new versions to be used, I just haven't had the time to test it.
mr-chrome's suggestion about using an environment is a good one, however, and can save a fair amount of headache if you ever want to install anything else python-related with incompatible dependencies.
Thanks very much to you both, this allowed me to get further.
I assume this issue was resolved, so I will close this now.
Hello,
I'm having trouble opening the GUI. Calling PyDP4_GUI.py results in the below output:
Traceback (most recent call last): File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\site-packages\openbabel\openbabel.py", line 27, in swig_import_helper return importlib.import_module(mname) File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\importlib__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'openbabel._openbabel'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "PyDP4_GUI.py", line 4, in
import PyDP4
File "c:\Users\user\Desktop\DP4-AI-master\DP4-AI-master\PyDP4.py", line 38, in
import NMR
File "c:\Users\user\Desktop\DP4-AI-master\DP4-AI-master\NMR.py", line 23, in
from Proton_processing import process_proton
File "c:\Users\user\Desktop\DP4-AI-master\DP4-AI-master\Proton_processing.py", line 8, in
from openbabel import *
File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\site-packages\openbabel__init__.py", line 3, in
from . import openbabel
File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\site-packages\openbabel\openbabel.py", line 30, in
_openbabel = swig_import_helper()
File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\site-packages\openbabel\openbabel.py", line 29, in swig_import_helper
return importlib.import_module('_openbabel')
File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\importlib__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed: The specified module could not be found.
Any assistance will be appreciated.