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

PLUMED doesn't recognise Cython during install #1185

Open
a-ws-m opened this issue Jan 24, 2025 · 1 comment
Open

PLUMED doesn't recognise Cython during install #1185

a-ws-m opened this issue Jan 24, 2025 · 1 comment

Comments

@a-ws-m
Copy link

a-ws-m commented Jan 24, 2025

I'm trying to install PLUMED from the current master branch.
I would like PLUMED to use a python environment created by micromamba, in which I have installed cython and some other packages (see below).

During ./configure --disable-mpi, PLUMED recognises that Cython is installed:

checking for python3... python3
configure: Python executable is python3
checking pycv: support for required python modules (python3, pybind11, numpy)... yes
checking python wrapper: support for required python modules (python3, setuptools, cython)... yes

Running make -j 4 also has no issues. However, during sudo make install, I get the following:

cd install/python && rm -fr *.so plumed.cpp build && \
          unset CXX && unset CC && unset CFLAGS && unset CXXFLAGS && unset LDSHARED && \
          plumed_program_name=plumed \
          plumed_force_cython=yes \
          plumed_version=2.11.0-dev \
          plumed_include_dir=../../../wrapper \
          plumed_default_kernel="/usr/local/lib/libplumedKernel.so" \
          python3 setup.py build_ext -i
Module name plumed
Version number 2.11.0-dev
Hardcoded PLUMED_KERNEL /usr/local/lib/libplumedKernel.so
plumed_force_cython=yes
importing cython
Error: building plumed requires cython. Please install it first with pip install cython

The packages in my environment are as follows:

List of packages in environment: "/home/awsm/micromamba/envs/pycv"

  Name                         Version     Build                     Channel
──────────────────────────────────────────────────────────────────────────────────
  _libgcc_mutex                0.1         conda_forge               conda-forge
  _openmp_mutex                4.5         2_gnu                     conda-forge
  bzip2                        1.0.8       h4bc722e_7                conda-forge
  c-ares                       1.34.4      hb9d3cd8_0                conda-forge
  ca-certificates              2024.12.14  hbcca054_0                conda-forge
  cuda-cccl_linux-64           12.6.77     ha770c72_0                conda-forge
  cuda-crt-dev_linux-64        12.6.85     ha770c72_0                conda-forge
  cuda-crt-tools               12.6.85     ha770c72_0                conda-forge
  cuda-cudart                  12.6.77     h5888daf_0                conda-forge
  cuda-cudart-dev_linux-64     12.6.77     h3f2d84a_0                conda-forge
  cuda-cudart-static_linux-64  12.6.77     h3f2d84a_0                conda-forge
  cuda-cudart_linux-64         12.6.77     h3f2d84a_0                conda-forge
  cuda-cupti                   12.6.80     hbd13f7d_0                conda-forge
  cuda-cupti-dev               12.6.80     h5888daf_0                conda-forge
  cuda-nvcc-tools              12.6.85     he02047a_0                conda-forge
  cuda-nvrtc                   12.6.85     hbd13f7d_0                conda-forge
  cuda-nvtx                    12.6.77     hbd13f7d_0                conda-forge
  cuda-nvvm-tools              12.6.85     he02047a_0                conda-forge
  cuda-version                 12.6        h7480c83_3                conda-forge
  cudnn                        9.3.0.75    h62a6f1c_2                conda-forge
  cython                       3.0.11      py312h8fd2918_3           conda-forge
  importlib-metadata           8.6.1       pyha770c72_0              conda-forge
  jax                          0.4.35      pyhd8ed1ab_1              conda-forge
  jaxlib                       0.4.35      cuda126py312hd27b167_200  conda-forge
  ld_impl_linux-64             2.43        h712a8e2_2                conda-forge
  libabseil                    20240722.0  cxx17_hbbce691_4          conda-forge
  libblas                      3.9.0       26_linux64_openblas       conda-forge
  libcblas                     3.9.0       26_linux64_openblas       conda-forge
  libcublas                    12.6.4.1    hbd13f7d_0                conda-forge
  libcublas-dev                12.6.4.1    h5888daf_0                conda-forge
  libcufft                     11.3.0.4    hbd13f7d_0                conda-forge
  libcufft-dev                 11.3.0.4    h5888daf_0                conda-forge
  libcurand                    10.3.7.77   hbd13f7d_0                conda-forge
  libcurand-dev                10.3.7.77   h5888daf_0                conda-forge
  libcusolver                  11.7.1.2    hbd13f7d_0                conda-forge
  libcusolver-dev              11.7.1.2    h5888daf_0                conda-forge
  libcusparse                  12.5.4.2    hbd13f7d_0                conda-forge
  libcusparse-dev              12.5.4.2    h5888daf_0                conda-forge
  libexpat                     2.6.4       h5888daf_0                conda-forge
  libffi                       3.4.2       h7f98852_5                conda-forge
  libgcc                       14.2.0      h77fa898_1                conda-forge
  libgcc-ng                    14.2.0      h69a702a_1                conda-forge
  libgfortran                  14.2.0      h69a702a_1                conda-forge
  libgfortran5                 14.2.0      hd5240d6_1                conda-forge
  libgomp                      14.2.0      h77fa898_1                conda-forge
  libgrpc                      1.67.1      h25350d4_1                conda-forge
  liblapack                    3.9.0       26_linux64_openblas       conda-forge
  liblzma                      5.6.3       hb9d3cd8_1                conda-forge
  libnsl                       2.0.1       hd590300_0                conda-forge
  libnvjitlink                 12.6.85     hbd13f7d_0                conda-forge
  libopenblas                  0.3.28      pthreads_h94d23a6_1       conda-forge
  libprotobuf                  5.28.3      h6128344_1                conda-forge
  libre2-11                    2024.07.02  hbbce691_2                conda-forge
  libsqlite                    3.48.0      hee588c1_1                conda-forge
  libstdcxx                    14.2.0      hc0a3c3a_1                conda-forge
  libstdcxx-ng                 14.2.0      h4852527_1                conda-forge
  libuuid                      2.38.1      h0b41bf4_0                conda-forge
  libxcrypt                    4.4.36      hd590300_1                conda-forge
  libzlib                      1.3.1       hb9d3cd8_2                conda-forge
  ml_dtypes                    0.5.1       py312hf9745cd_0           conda-forge
  nccl                         2.24.3.1    hb92ee24_0                conda-forge
  ncurses                      6.5         h2d0b736_2                conda-forge
  numpy                        2.2.2       py312h72c5963_0           conda-forge
  openssl                      3.4.0       h7b32b05_1                conda-forge
  opt-einsum                   3.4.0       hd8ed1ab_1                conda-forge
  opt_einsum                   3.4.0       pyhd8ed1ab_1              conda-forge
  pip                          24.3.1      pyh8b19718_2              conda-forge
  pybind11                     2.11.1      py312h8572e83_2           conda-forge
  pybind11-global              2.11.1      py312h8572e83_2           conda-forge
  python                       3.12.8      h9e4cc4f_1_cpython        conda-forge
  python_abi                   3.12        5_cp312                   conda-forge
  re2                          2024.07.02  h9925aae_2                conda-forge
  readline                     8.2         h8228510_1                conda-forge
  scipy                        1.15.1      py312h180e4f1_0           conda-forge
  setuptools                   75.8.0      pyhff2d567_0              conda-forge
  tk                           8.6.13      noxft_h4845f30_101        conda-forge
  tzdata                       2025a       h78e105d_0                conda-forge
  wheel                        0.45.1      pyhd8ed1ab_1              conda-forge
  zipp                         3.21.0      pyhd8ed1ab_1              conda-forge
@a-ws-m
Copy link
Author

a-ws-m commented Jan 24, 2025

I have also confirmed that using the v2.10 branch produces similar results:

cp -pr ../../python install
cd install/python && rm -fr *.so plumed.cpp build && \
          unset CXX && unset CC && unset CFLAGS && unset CXXFLAGS && unset LDSHARED && \
          plumed_program_name=plumed \
          plumed_force_cython=yes \
          plumed_version=2.10b \
          plumed_include_dir=../../../wrapper \
          plumed_default_kernel="/usr/local/lib/libplumedKernel.so" \
          python3 setup.py build_ext -i
Module name plumed
Version number 2.10b
Hardcoded PLUMED_KERNEL /usr/local/lib/libplumedKernel.so
plumed_force_cython=yes
importing cython
Error: building plumed requires cython. Please install it first with pip install cython

Note that this isn't an issue during make:

make -C python
make[1]: Entering directory '/home/awsm/plumed2/python'
Building python interface for PLUMED
unset CXX && unset CC && unset CFLAGS && unset CXXFLAGS && unset LDSHARED && \
          plumed_program_name=plumed \
          plumed_force_cython=yes \
          plumed_version=2.10b \
          plumed_include_dir=../src/wrapper \
          plumed_default_kernel="$PWD/../src/lib/libplumedKernel.so" \
          python3 setup.py build_ext -i
Module name plumed
Version number 2.10b
Hardcoded PLUMED_KERNEL /home/awsm/plumed2/src/lib/libplumedKernel.so
plumed_force_cython=yes
importing cython
/home/awsm/micromamba/envs/pycv/lib/python3.12/site-packages/setuptools/_distutils/dist.py:270: UserWarning: Unknown distribution option: 'test_suite'
  warnings.warn(msg)
/home/awsm/micromamba/envs/pycv/lib/python3.12/site-packages/setuptools/dist.py:330: InformationOnly: Normalizing '2.10b' to '2.10b0'
  self.metadata.version = self._normalize_version(self.metadata.version)

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

1 participant