Closed feiranl closed 2 years ago
Hello,
When you say that you can import openbabel
, did you use that wording? Non from openbabel import openbabel
? In that case, there seems like you have a mismatch between the conda environment and the python used to run the code.
Thanks! It has been solved!
For future measurement, could you elaborate on how it was solved? I'm closing this issue btw.
I was trying to import openbabel in Python3.8.8 before. After changing to python3.10.4, it was ok.
I have the question, I met the issue - [ cannot import name 'pybel' from 'openbabel'] when I use - [ from 'openbabel' import 'pybel'] as well. So I tried to use - [ import 'openbabel' as 'op'], which was succeed. However, I was faild when I use - [ from 'openbabel' import 'openbabel'].
Then you have an old version of OpenBabel installed. How did you install? Did you use conda install -c conda-forge openbabel
? Are you sure that you have the correct conda environment activated? If so, you could try conda update -c conda-forge openbabel
to get a newer OpenBabel.
Thank you, let me try.^^
At 2022-07-08 17:03:18, "fredrikw" @.***> wrote:
Then you have an old version of OpenBabel installed. How did you install? Did you use conda install -c conda-forge openbabel? Are you sure that you have the correct conda environment activated? If so, you could try conda update -c conda-forge openbabel to get a newer OpenBabel.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
Thank you for your help, I have followed your advice but I still haven't succeed. Python is too difficult for me. :(
Comment:
Hi,
I met the issue
cannot import name 'pybel' from 'openbabel'
. I am following the intruction for installation using :it was shown successfully installed. I can
import openbabel
just fine. Is there something that I miss? Thanks for your help!I have checked the previous issue #8 , but it is not the same.
Environment (conda list):
``` packages in environment at /opt/anaconda3/envs/equcc: Name Version Build Channel bzip2 1.0.8 h0d85af4_4 conda-forge ca-certificates 2021.10.8 h033912b_0 conda-forge cairo 1.16.0 h9e0e54b_1010 conda-forge expat 2.4.7 h96cf925_0 conda-forge font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge font-ttf-inconsolata 3.000 h77eed37_0 conda-forge font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge font-ttf-ubuntu 0.83 hab24e00_0 conda-forge fontconfig 2.13.96 h676cef8_2 conda-forge fonts-conda-ecosystem 1 0 conda-forge fonts-conda-forge 1 0 conda-forge freetype 2.10.4 h4cff582_1 conda-forge gettext 0.19.8.1 hd1a6beb_1008 conda-forge icu 69.1 he49afe7_0 conda-forge libcxx 13.0.1 hc203e6f_0 conda-forge libffi 3.4.2 h0d85af4_5 conda-forge libglib 2.70.2 hf1fb8c0_4 conda-forge libiconv 1.16 haf1e3a3_0 conda-forge libpng 1.6.37 h7cec526_2 conda-forge libxml2 2.9.12 h7e28ab6_1 conda-forge libzlib 1.2.11 h9173be1_1013 conda-forge ncurses 6.3 he49afe7_0 conda-forge openbabel 3.1.1 py310he467037_3 conda-forge openssl 3.0.2 h6c3fc93_1 conda-forge pcre 8.45 he49afe7_0 conda-forge pip 22.0.4 pyhd8ed1ab_0 conda-forge pixman 0.40.0 hbcb3906_0 conda-forge python 3.10.4 h1cc4136_0_cpython conda-forge python_abi 3.10 2_cp310 conda-forge readline 8.1 h05e3726_0 conda-forge setuptools 60.10.0 pypi_0 pypi sqlite 3.37.1 hb516253_0 conda-forge tk 8.6.12 h5dbffcc_0 conda-forge tzdata 2022a h191b570_0 conda-forge wheel 0.37.1 pyhd8ed1ab_0 conda-forge xz 5.2.5 haf1e3a3_1 conda-forge zlib 1.2.11 h9173be1_1013 conda-forge ```Details about conda and system ( conda info ):
``` active environment : equcc active env location : /opt/anaconda3/envs/equcc shell level : 2 user config file : /Users/feiranl/.condarc populated config files : /Users/feiranl/.condarc conda version : 4.8.5 conda-build version : 3.18.9 python version : 3.7.4.final.0 virtual packages : __osx=10.16 base environment : /opt/anaconda3 (writable) channel URLs : https://conda.anaconda.org/conda-forge/osx-64 https://conda.anaconda.org/conda-forge/noarch https://repo.anaconda.com/pkgs/main/osx-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/osx-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /opt/anaconda3/pkgs /Users/feiranl/.conda/pkgs envs directories : /opt/anaconda3/envs /Users/feiranl/.conda/envs platform : osx-64 user-agent : conda/4.8.5 requests/2.22.0 CPython/3.7.4 Darwin/21.3.0 OSX/10.16 UID:GID : 45692255:20 netrc file : None offline mode : False ```