conda-forge / rdkit-feedstock

A conda-smithy repository for rdkit.
BSD 3-Clause "New" or "Revised" License
8 stars 22 forks source link

build py39h042da20_0 for osx-arm64 installs into python3.10 directory #109

Closed greglandrum closed 1 year ago

greglandrum commented 1 year ago

Solution to issue cannot be found in the documentation.

Issue

If I create a new environment with python 3.9 and the rdkit:

mamba create -n py39_rdkit python=3.9 rdkit matplotlib jupyter

it looks like the RDKit isn't installed:

(py39_rdkit) Marder:~ glandrum$ python -c 'import rdkit;print(rdkit.__version__)'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'rdkit'

even though conda says it is:

(py39_rdkit) Marder:~ glandrum$ conda list | grep rdkit
# packages in environment at /Users/glandrum/miniforge3/envs/py39_rdkit:
rdkit                     2022.03.5        py39h042da20_0    conda-forge

and, in fact, there's no package in the right place:

(py39_rdkit) Marder:~ glandrum$ ls -l ~/miniforge3/envs/py39_rdkit/lib/python3.9/site-packages/rdkit*
ls: /Users/glandrum/miniforge3/envs/py39_rdkit/lib/python3.9/site-packages/rdkit*: No such file or directory

instead there's something in python3.10/site-packages:

(py39_rdkit) Marder:~ glandrum$ ls -l ~/miniforge3/envs/py39_rdkit/lib/python3.10/site-packages/
total 0
drwxr-xr-x  27 glandrum  staff  864  7 Okt 17:26 rdkit
drwxr-xr-x   3 glandrum  staff   96  7 Okt 17:26 xcbgen

Looks like xcbgen has the same problem.

Here's the original RDKit bug report, from @jrsacher: https://github.com/rdkit/rdkit/issues/5626

Installed packages

# packages in environment at /Users/glandrum/miniforge3/envs/py39_rdkit:
#
# Name                    Version                   Build  Channel
appnope                   0.1.3              pyhd8ed1ab_0    conda-forge
argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0           py39hb18efdd_2    conda-forge
asttokens                 2.0.8              pyhd8ed1ab_0    conda-forge
attrs                     22.1.0             pyh71513ae_1    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
beautifulsoup4            4.11.1             pyha770c72_0    conda-forge
bleach                    5.0.1              pyhd8ed1ab_0    conda-forge
boost                     1.74.0           py39h776e71f_5    conda-forge
boost-cpp                 1.74.0               h1cb353e_8    conda-forge
brotli                    1.0.9                h1c322ee_7    conda-forge
brotli-bin                1.0.9                h1c322ee_7    conda-forge
bzip2                     1.0.8                h3422bc3_4    conda-forge
ca-certificates           2022.9.24            h4653dfc_0    conda-forge
cairo                     1.16.0            h73a0509_1014    conda-forge
certifi                   2022.9.24          pyhd8ed1ab_0    conda-forge
cffi                      1.15.1           py39h04d3946_0    conda-forge
contourpy                 1.0.5            py39haaf3ac1_0    conda-forge
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
debugpy                   1.6.3            py39h3c22d25_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
executing                 1.1.0              pyhd8ed1ab_0    conda-forge
expat                     2.4.9                hb7217d7_0    conda-forge
flit-core                 3.7.1              pyhd8ed1ab_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.14.0               h82840c6_1    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fonttools                 4.37.4           py39h02fc5c5_0    conda-forge
freetype                  2.12.1               hd633e50_0    conda-forge
gettext                   0.19.8.1          h0186832_1009    conda-forge
greenlet                  1.1.3            py39h23fbdae_0    conda-forge
icu                       70.1                 h6b3803e_0    conda-forge
importlib-metadata        4.11.4           py39h2804cbe_0    conda-forge
importlib_resources       5.9.0              pyhd8ed1ab_0    conda-forge
ipykernel                 6.16.0             pyh736e0ef_0    conda-forge
ipython                   8.5.0              pyhd1c38e8_1    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipywidgets                8.0.2              pyhd8ed1ab_1    conda-forge
jedi                      0.18.1             pyhd8ed1ab_2    conda-forge
jinja2                    3.1.2              pyhd8ed1ab_1    conda-forge
jpeg                      9e                   he4db4b2_2    conda-forge
jsonschema                4.16.0             pyhd8ed1ab_0    conda-forge
jupyter                   1.0.0            py39h2804cbe_7    conda-forge
jupyter_client            7.3.5              pyhd8ed1ab_0    conda-forge
jupyter_console           6.4.4              pyhd8ed1ab_0    conda-forge
jupyter_core              4.11.1           py39h2804cbe_0    conda-forge
jupyterlab_pygments       0.2.2              pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        3.0.3              pyhd8ed1ab_0    conda-forge
kiwisolver                1.4.4            py39hab5e169_0    conda-forge
lcms2                     2.12                 had6a04f_0    conda-forge
lerc                      4.0.0                h9a09cb3_0    conda-forge
libblas                   3.9.0           16_osxarm64_openblas    conda-forge
libbrotlicommon           1.0.9                h1c322ee_7    conda-forge
libbrotlidec              1.0.9                h1c322ee_7    conda-forge
libbrotlienc              1.0.9                h1c322ee_7    conda-forge
libcblas                  3.9.0           16_osxarm64_openblas    conda-forge
libcxx                    14.0.6               h2692d47_0    conda-forge
libdeflate                1.14                 h1a8c8d9_0    conda-forge
libffi                    3.4.2                h3422bc3_5    conda-forge
libgfortran               5.0.0           11_3_0_hd922786_25    conda-forge
libgfortran5              11.3.0              hdaf2cc0_25    conda-forge
libglib                   2.74.0               h14ed1c1_0    conda-forge
libiconv                  1.17                 he4db4b2_0    conda-forge
liblapack                 3.9.0           16_osxarm64_openblas    conda-forge
libopenblas               0.3.21          openmp_hc731615_3    conda-forge
libpng                    1.6.38               h76d750c_0    conda-forge
libsodium                 1.0.18               h27ca646_1    conda-forge
libsqlite                 3.39.4               h76d750c_0    conda-forge
libtiff                   4.4.0                hfa0b094_4    conda-forge
libwebp-base              1.2.4                h57fd34a_0    conda-forge
libxcb                    1.13              h9b22ae9_1004    conda-forge
libzlib                   1.2.12               h03a7124_4    conda-forge
llvm-openmp               14.0.4               hd125106_0    conda-forge
markupsafe                2.1.1            py39hb18efdd_1    conda-forge
matplotlib                3.6.0            py39hdf13c20_0    conda-forge
matplotlib-base           3.6.0            py39h35e9e80_0    conda-forge
matplotlib-inline         0.1.6              pyhd8ed1ab_0    conda-forge
mistune                   0.8.4           py39h5161555_1005    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
nbclient                  0.5.13             pyhd8ed1ab_0    conda-forge
nbconvert                 6.4.5            py39h2804cbe_0    conda-forge
nbformat                  5.6.1              pyhd8ed1ab_0    conda-forge
ncurses                   6.3                  h07bb92c_1    conda-forge
nest-asyncio              1.5.6              pyhd8ed1ab_0    conda-forge
notebook                  6.4.12             pyha770c72_0    conda-forge
numpy                     1.23.3           py39hcb4b507_0    conda-forge
openjpeg                  2.5.0                h5d4e404_1    conda-forge
openssl                   3.0.5                h03a7124_2    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pandas                    1.5.0            py39hde7b980_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pcre2                     10.37                hcf5f1cc_1    conda-forge
pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    9.2.0            py39he45c975_2    conda-forge
pip                       22.2.2             pyhd8ed1ab_0    conda-forge
pixman                    0.40.0               h27ca646_0    conda-forge
pkgutil-resolve-name      1.3.10             pyhd8ed1ab_0    conda-forge
prometheus_client         0.14.1             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.31             pyha770c72_0    conda-forge
prompt_toolkit            3.0.31               hd8ed1ab_0    conda-forge
psutil                    5.9.2            py39h02fc5c5_0    conda-forge
pthread-stubs             0.4               h27ca646_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
pycairo                   1.21.0           py39h9e65f43_1    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pygments                  2.13.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.9              pyhd8ed1ab_0    conda-forge
pyrsistent                0.18.1           py39hb18efdd_1    conda-forge
python                    3.9.13          h96fcbfb_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-fastjsonschema     2.16.2             pyhd8ed1ab_0    conda-forge
python_abi                3.9                      2_cp39    conda-forge
pytz                      2022.4             pyhd8ed1ab_0    conda-forge
pyzmq                     24.0.1           py39h0553236_0    conda-forge
rdkit                     2022.03.5        py39h042da20_0    conda-forge
readline                  8.1.2                h46ed386_0    conda-forge
reportlab                 3.5.68           py39h3fc2f6e_1    conda-forge
send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
setuptools                65.4.1             pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
soupsieve                 2.3.2.post1        pyhd8ed1ab_0    conda-forge
sqlalchemy                1.4.41           py39h02fc5c5_0    conda-forge
sqlite                    3.39.4               h2229b38_0    conda-forge
stack_data                0.5.1              pyhd8ed1ab_0    conda-forge
terminado                 0.16.0             pyhd1c38e8_0    conda-forge
testpath                  0.6.0              pyhd8ed1ab_0    conda-forge
tk                        8.6.12               he1e0b03_0    conda-forge
tornado                   6.2              py39h9eb174b_0    conda-forge
traitlets                 5.4.0              pyhd8ed1ab_0    conda-forge
typing_extensions         4.4.0              pyha770c72_0    conda-forge
tzdata                    2022d                h191b570_0    conda-forge
unicodedata2              14.0.0           py39hb18efdd_1    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
widgetsnbextension        4.0.3              pyhd8ed1ab_0    conda-forge
xorg-libxau               1.0.9                h27ca646_0    conda-forge
xorg-libxdmcp             1.1.3                h27ca646_0    conda-forge
xz                        5.2.6                h57fd34a_0    conda-forge
zeromq                    4.3.4                hbdafb3b_1    conda-forge
zipp                      3.8.1              pyhd8ed1ab_0    conda-forge
zlib                      1.2.12               h03a7124_4    conda-forge
zstd                      1.5.2                h8128057_4    conda-forge

Environment info

active environment : py39_rdkit
    active env location : /Users/glandrum/miniforge3/envs/py39_rdkit
            shell level : 2
       user config file : /Users/glandrum/.condarc
 populated config files : /Users/glandrum/miniforge3/.condarc
                          /Users/glandrum/.condarc
          conda version : 22.9.0
    conda-build version : not installed
         python version : 3.9.1.final.0
       virtual packages : __osx=12.3.1=0
                          __unix=0=0
                          __archspec=1=arm64
       base environment : /Users/glandrum/miniforge3  (writable)
      conda av data dir : /Users/glandrum/miniforge3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/osx-arm64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://conda.anaconda.org/default/osx-arm64
                          https://conda.anaconda.org/default/noarch
          package cache : /Users/glandrum/miniforge3/pkgs
                          /Users/glandrum/.conda/pkgs
       envs directories : /Users/glandrum/miniforge3/envs
                          /Users/glandrum/.conda/envs
               platform : osx-arm64
             user-agent : conda/22.9.0 requests/2.28.1 CPython/3.9.1 Darwin/21.4.0 OSX/12.3.1
                UID:GID : 501:20
             netrc file : None
           offline mode : False
florian-huber commented 1 year ago

Seems some CI tests I run got me the same issue. Saw it occurring also for rdkit-2022.03.2 (py39h89e00b9_0). In my case it only happened for ubtuntu, not macOS or windows (see CI results: https://github.com/matchms/matchms/actions/runs/3299894916/jobs/5453884303). Right now I am not sure how to fix it (other than skipping that combination or fixing rdkit versions).

jaimergp commented 1 year ago

Do we need to mark the affected packages as broken?

greglandrum commented 1 year ago

@jaimergp If that's straightforward to do, I think that would make sense.

jaimergp commented 1 year ago

See here @greglandrum:

https://conda-forge.org/docs/maintainer/updating_pkgs.html#removing-broken-packages

mattwthompson commented 1 year ago

Any ideas how this happens? I skimmed through the build scripts and nothing stuck out as particularly obvious to me

fxcoudert commented 1 year ago

What is the value of SP_DIR in the build script?

https://github.com/conda-forge/rdkit-feedstock/blob/90a4d7e4b82bc98c0487eb0d74160a222412f247/recipe/build.sh#L25

and PREFIX?

https://github.com/conda-forge/rdkit-feedstock/blob/90a4d7e4b82bc98c0487eb0d74160a222412f247/recipe/build.sh#L20

mattwthompson commented 1 year ago

They are probably

Python's site-packages location. Build prefix to which the build script should install. 

https://docs.conda.io/projects/conda-build/en/latest/user-guide/environment-variables.html

mcs07 commented 1 year ago

Fixed by #121