Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How should users install Open Babel using conda? #7

Open
baoilleach opened this issue Oct 10, 2019 · 28 comments
Open

How should users install Open Babel using conda? #7

baoilleach opened this issue Oct 10, 2019 · 28 comments

Comments

@baoilleach
Copy link
Member

Can @mwojcikowski, @mcs07 and @njzjz tell me what instructions I should add to the website and docs for users to tell them how to install Open Babel 3.0 using conda?

Think here of the naive user. We need one official way, which one/all of you will be able to help fix if there is a problem. We can add more details about different approaches using different channels but we need to agree on an 'official' approach.

@mcs07
Copy link
Collaborator

mcs07 commented Oct 10, 2019

Hi Noel, my preference is to recommend using the conda-forge channel. @njzjz has done a good job at updating the recipe and the conda-forge bots and CI system will detect tagged releases and create PRs - e.g. see conda-forge/openbabel-feedstock#2.

There are some outstanding issues right now - I think Windows builds are broken - but I can have a go at fixing that.

@njzjz
Copy link

njzjz commented Oct 10, 2019 via email

@mcs07
Copy link
Collaborator

mcs07 commented Oct 10, 2019

I managed to get Windows builds working locally by...

  • Disabling the maeparser with -DWITH_MAEPARSER=OFF
  • Adding a patch to add #include <iterator> in obmolecformat.cpp
  • Making a separate inchi package and linking to that as a requirement

I will try push to my personal repository and see if it builds on the CI and if it all is OK I will make a Pull Request in https://github.com/conda-forge/openbabel-feedstock

@baoilleach
Copy link
Member Author

Thanks all - I really appreciate it, as will our users. The official release announcement is Monday. It sounds like I can add these instructions for the Mac/Linux build now, and I can hold off for Windows until the remaining issues are sorted. Again, much appreciated.

@mwojcikowski
Copy link
Collaborator

Ok, so the plan is to switch entirely to conda-forge? I'm fine with it, but let's make it clear in the docs on our end too. Appveyor had issues last time I checked, but with conda-forge such issues should be easier to figure out.

@njzjz
Copy link

njzjz commented Oct 12, 2019

@mwojcikowski Could you please go to https://github.com/orgs/conda-forge/invitation and accept the invitation? You have been added to the list of maintainers.

@mcs07
Copy link
Collaborator

mcs07 commented Oct 27, 2019

So I got everything working at https://github.com/mcs07/conda-recipes using the Azure pipelines CI that conda-forge uses. However, there's a weird CI problem currently blocking my PR that adds windows InChI packages to conda-forge (conda-forge/inchi-feedstock#2). Once that is resolved, it should be very straightforward to update the openbabel recipe.

@mcs07
Copy link
Collaborator

mcs07 commented Nov 7, 2019

Thanks to @fredrikw packages for all platforms are now available on conda-forge. See:

@Aster-the-Med-Stu
Copy link

Could you guys please remove the outdated openbabel channel or add a note on it? The openbabel in that channel is outdated and quite deceptive, but it is the first result in Google search.

Google Result

openbabel channel in Anaconda

@mcs07
Copy link
Collaborator

mcs07 commented Nov 21, 2019

Removing the old channel might be a bit drastic as it will break older code that points to it. @ghutchis or whoever has ownership on anaconda.org can update the package description by going to Settings -> Summary and change it to something like "DEPRECATED - please use https://anaconda.org/conda-forge/openbabel".

Hopefully the google rankings will sort themselves out if plently of links to the conda-forge openbabel anaconda channel are added here on github and on the openbabel web site.

@mcs07 mcs07 mentioned this issue Nov 21, 2019
6 tasks
@ghutchis
Copy link
Member

Good suggestion. I edited the description just now - I'll see what I can do for the new OB site.

@kexul
Copy link

kexul commented Feb 26, 2021

Thanks to @fredrikw packages for all platforms are now available on conda-forge. See:

Hi, I install openbabel by conda install openbabel -c conda-forge in windows, when I want to import it in python, it says:
DLL load failed while importing _openbabel @mcs07

@fredrikw
Copy link
Contributor

fredrikw commented Mar 1, 2021

Hi,
What versions of conda and Python do you use? (what do you get by running conda --version and python -V)

@kexul
Copy link

kexul commented Mar 1, 2021

Hi @fredrikw, I'm using python 3.8.5 and conda 4.9.2 .

@fredrikw
Copy link
Contributor

fredrikw commented Mar 1, 2021

I just tried with those versions and everything worked great. Just to be sure, you are activating the conda env correctly?

@njzjz
Copy link

njzjz commented Mar 1, 2021

I suggest to create a new environment to avoid package conflicts:

conda create openbabel -c conda-forge -n openbabel

@kexul
Copy link

kexul commented Mar 2, 2021

Hi, @fredrikw , I'm sure I've activated conda env correctly. Here is the packages in my env:

ca-certificates           2020.12.5            h5b45459_0    conda-forge
cairo                     1.16.0            hba8bd2f_1007    conda-forge
certifi                   2020.12.5        py39hcbf5309_1    conda-forge
freetype                  2.10.4               h546665d_1    conda-forge
gettext                   0.19.8.1          h1a89ca6_1005    conda-forge
icu                       68.1                 h0e60522_0    conda-forge
libffi                    3.3                  h0e60522_2    conda-forge
libglib                   2.66.7               h1e62bf3_1    conda-forge
libiconv                  1.16                 he774522_0    conda-forge
libpng                    1.6.37               h1d00b33_2    conda-forge
libxml2                   2.9.10               hf5bbc77_3    conda-forge
openbabel                 3.1.1            py39h9aed371_1    conda-forge
openssl                   1.1.1j               h8ffe710_0    conda-forge
pcre                      8.44                 ha925a31_0    conda-forge
pip                       21.0.1             pyhd8ed1ab_0    conda-forge
pixman                    0.40.0               h8ffe710_0    conda-forge
python                    3.9.2           h7840368_0_cpython    conda-forge
python_abi                3.9                      1_cp39    conda-forge
setuptools                49.6.0           py39hcbf5309_3    conda-forge
sqlite                    3.34.0               h8ffe710_0    conda-forge
tzdata                    2021a                he74cb21_0    conda-forge
vc                        14.2                 hb210afc_3    conda-forge
vs2015_runtime            14.28.29325          h5e1d092_3    conda-forge
wheel                     0.36.2             pyhd3deb0d_0    conda-forge
wincertstore              0.2             py39hcbf5309_1006    conda-forge
zlib                      1.2.11            h62dcd97_1010    conda-forge

Hi, @njzjz , I've tried create a new env, but the same error occurred.

@fredrikw
Copy link
Contributor

fredrikw commented Mar 2, 2021

I assume that is the package list from the new env since it's a different Python version than you stated above. But other than that, it looks exactly like the one I have. Do you get the error as soon as you run from openbabel import openbabel? What version of Windows do you use?

@kexul
Copy link

kexul commented Mar 2, 2021

Yeah, It's a new env as suggest by @njzjz. Yes, I get this error when import openbabel. I'm using Windows 10 professional. You remind me that my Windows is not activated. So I tried open cmd using Administrator permissions, it worked now.

@jincanzuitongfeng
Copy link

Hello, my conda version is 4.13 and python is 3.7, but I can't install openbabel 3.1 version, the code installed is 2.4.1, do you know the reason?

@fredrikw
Copy link
Contributor

@jincanzuitongfeng Make sure that you have the correct conda environment activated (conda activate ...). If that is so, try with conda update -c conda-forge openbabel

@jincanzuitongfeng
Copy link

@jincanzuitongfeng Make sure that you have the correct conda environment activated (conda activate ...). If that is so, try with conda update -c conda-forge openbabel

My environment is indeed activated, I tried to install and then update, it is still a low version, I am win11, is it related to the system?

@njzjz
Copy link

njzjz commented Aug 16, 2022

@jincanzuitongfeng Make sure that you have the correct conda environment activated (conda activate ...). If that is so, try with conda update -c conda-forge openbabel

My environment is indeed activated, I tried to install and then update, it is still a low version, I am win11, is it related to the system?

What happened if you pin the version, i.e. conda install openbabel=3.1 -c conda-forge?

@fredrikw
Copy link
Contributor

And what is the result from conda search openbabel -c conda-forge?

@jincanzuitongfeng
Copy link

@jincanzuitongfeng Make sure that you have the correct conda environment activated (conda activate ...). If that is so, try with conda update -c conda-forge openbabel

My environment is indeed activated, I tried to install and then update, it is still a low version, I am win11, is it related to the system?

What happened if you pin the version, i.e. conda install openbabel=3.1 -c conda-forge?

image

@jincanzuitongfeng
Copy link

image
There are both high and low versions. Remove the low version??

@fredrikw
Copy link
Contributor

This searched on conda-forge so you can't remove the low version from there...

Something looks problematic with your conda environment since you get a "failed" when looking for incompatibilities.

Try to create a new with conda create -n test_env -c conda-forge python=3.7 openbabel (or change test_env and python=3.7 to your liking...)

@jincanzuitongfeng
Copy link

OK, thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants