openbabel / conda-openbabel

Conda build recipe for Open Babel
2 stars 4 forks source link

How should users install Open Babel using conda? #7

Open baoilleach opened 5 years ago

baoilleach commented 5 years ago

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 commented 5 years ago

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 https://github.com/conda-forge/openbabel-feedstock/pull/2.

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

njzjz commented 5 years ago

It’s fine to install on Linux and macOS with conda install openbabel -c conda-forge

However, I faced some problems with Windows builds and had to disable them.

mcs07 commented 5 years ago

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

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

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 (https://github.com/conda-forge/inchi-feedstock/pull/2). Once that is resolved, it should be very straightforward to update the openbabel recipe.

mcs07 commented 4 years ago

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

Aster-the-Med-Stu commented 4 years ago

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 commented 4 years ago

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.

ghutchis commented 4 years ago

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

kexul commented 3 years ago

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 commented 3 years ago

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

kexul commented 3 years ago

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

fredrikw commented 3 years ago

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

njzjz commented 3 years ago

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

conda create openbabel -c conda-forge -n openbabel
kexul commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

@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 commented 2 years ago

@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 commented 2 years ago

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

jincanzuitongfeng commented 2 years ago

@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 commented 2 years ago

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

fredrikw commented 2 years ago

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 commented 2 years ago

OK, thank you very much.