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

deeptime cannot be installed on Mac computers with Apple Silicon and Python 3.12.0. #283

Open
GuangchenJ opened this issue Oct 19, 2023 · 4 comments

Comments

@GuangchenJ
Copy link

when I installed deeptime via conda or mamba, my computer shows that:

$ conda install -c conda-forge deeptime
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - deeptime

Current channels:

  - https://conda.anaconda.org/conda-forge/osx-arm64
  - https://conda.anaconda.org/conda-forge/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

and

$ mamba install -c conda-forge deeptime

                  __    __    __    __
                 /  \  /  \  /  \  /  \
                /    \/    \/    \/    \
███████████████/  /██/  /██/  /██/  /████████████████████████
              /  / \   / \   / \   / \  \____
             /  /   \_/   \_/   \_/   \    o \__,
            / _/                       \_____/  `
            |/
        ███╗   ███╗ █████╗ ███╗   ███╗██████╗  █████╗
        ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
        ██╔████╔██║███████║██╔████╔██║██████╔╝███████║
        ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
        ██║ ╚═╝ ██║██║  ██║██║ ╚═╝ ██║██████╔╝██║  ██║
        ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═════╝ ╚═╝  ╚═╝

        mamba (1.4.2) supported by @QuantStack

        GitHub:  https://github.com/mamba-org/mamba
        Twitter: https://twitter.com/QuantStack

█████████████████████████████████████████████████████████████


Looking for: ['deeptime']

warning  libmamba Cache file "/opt/homebrew/Caskroom/miniforge/base/pkgs/cache/a850f475.json" was modified by another program
warning  libmamba Cache file "/opt/homebrew/Caskroom/miniforge/base/pkgs/cache/09cdf8bf.json" was modified by another program
conda-forge/noarch                                  14.2MB @   2.5MB/s  5.9s
conda-forge/osx-arm64                                8.3MB @   1.3MB/s  6.8s

Pinned packages:
  - python 3.12.*


Could not solve for environment specs
The following package could not be installed
└─ deeptime   does not exist (perhaps a typo or a missing channel).

When I installed it with pip, it shows that:

$ pip install deeptime
Collecting deeptime
  Using cached deeptime-0.4.4.tar.gz (461 kB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [71 lines of output]
      Ignoring tomli: markers 'python_version < "3.11"' don't match your environment
      Collecting setuptools>=42
        Using cached setuptools-68.2.2-py3-none-any.whl.metadata (6.3 kB)
      Collecting wheel
        Using cached wheel-0.41.2-py3-none-any.whl.metadata (2.2 kB)
      Collecting scikit-build>=0.16
        Using cached scikit_build-0.17.6-py3-none-any.whl.metadata (14 kB)
      Collecting cython>=0.29.30
        Using cached Cython-3.0.4-py2.py3-none-any.whl.metadata (3.2 kB)
      Collecting pybind11>=2.10.1
        Using cached pybind11-2.11.1-py3-none-any.whl.metadata (9.5 kB)
      Collecting numpy>=1.20
        Using cached numpy-1.26.1-cp312-cp312-macosx_11_0_arm64.whl.metadata (61 kB)
      Collecting cmake>=3.24
        Using cached cmake-3.27.7-py2.py3-none-macosx_10_10_universal2.macosx_10_10_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl.metadata (6.7 kB)
      Collecting scipy==1.9.3
        Using cached scipy-1.9.3.tar.gz (42.1 MB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Installing backend dependencies: started
        Installing backend dependencies: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error
      
        × Preparing metadata (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [31 lines of output]
            + meson setup /private/var/folders/00/hgdnr2413c1fhm721v97yq4r0000gn/T/pip-install-ajv6hhht/scipy_36a5961265534f2eb00a44b955cbf27b /private/var/folders/00/hgdnr2413c1fhm721v97yq4r0000gn/T/pip-install-ajv6hhht/scipy_36a5961265534f2eb00a44b955cbf27b/.mesonpy-rl7cciv9 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/private/var/folders/00/hgdnr2413c1fhm721v97yq4r0000gn/T/pip-install-ajv6hhht/scipy_36a5961265534f2eb00a44b955cbf27b/.mesonpy-rl7cciv9/meson-python-native-file.ini
            The Meson build system
            Version: 1.2.2
            Source dir: /private/var/folders/00/hgdnr2413c1fhm721v97yq4r0000gn/T/pip-install-ajv6hhht/scipy_36a5961265534f2eb00a44b955cbf27b
            Build dir: /private/var/folders/00/hgdnr2413c1fhm721v97yq4r0000gn/T/pip-install-ajv6hhht/scipy_36a5961265534f2eb00a44b955cbf27b/.mesonpy-rl7cciv9
            Build type: native build
            Project name: SciPy
            Project version: 1.9.3
            C compiler for the host machine: cc (clang 15.0.0 "Apple clang version 15.0.0 (clang-1500.0.40.1)")
            C linker for the host machine: cc ld64 1015.7
            C++ compiler for the host machine: c++ (clang 15.0.0 "Apple clang version 15.0.0 (clang-1500.0.40.1)")
            C++ linker for the host machine: c++ ld64 1015.7
            Host machine cpu family: aarch64
            Host machine cpu: aarch64
            Compiler for C supports arguments -Wno-unused-but-set-variable: YES
            Compiler for C supports arguments -Wno-unused-but-set-variable: YES (cached)
            Compiler for C supports arguments -Wno-unused-function: YES
            Compiler for C supports arguments -Wno-conversion: YES
            Compiler for C supports arguments -Wno-misleading-indentation: YES
            Compiler for C supports arguments -Wno-incompatible-pointer-types: YES
            Library m found: YES
      
            ../meson.build:57:0: ERROR: Unable to detect linker for compiler `gfortran -Wl,--version`
            stdout:
            stderr: collect2 version 13.2.0
            /usr/bin/ld -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/ -dynamic -arch arm64 -platform_version macos 14.0.0 0.0 -o a.out -L/opt/homebrew/Cellar/gcc/13.2.0/bin/../lib/gcc/current/gcc/aarch64-apple-darwin22/13 -L/opt/homebrew/Cellar/gcc/13.2.0/bin/../lib/gcc/current/gcc -L/opt/homebrew/Cellar/gcc/13.2.0/bin/../lib/gcc/current/gcc/aarch64-apple-darwin22/13/../../.. --version -lemutls_w -lgcc -lSystem -lgcc -no_compact_unwind -rpath @loader_path -rpath /opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc/aarch64-apple-darwin22/13 -rpath /opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc -rpath /opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current
            ld: unknown options: --version
            collect2: error: ld returned 1 exit status
      
      
            A full log can be found at /private/var/folders/00/hgdnr2413c1fhm721v97yq4r0000gn/T/pip-install-ajv6hhht/scipy_36a5961265534f2eb00a44b955cbf27b/.mesonpy-rl7cciv9/meson-logs/meson-log.txt
            [end of output]
      
        note: This error originates from a subprocess, and is likely not a problem with pip.
      error: metadata-generation-failed
      
      × Encountered error while generating package metadata.
      ╰─> See above for output.
      
      note: This is an issue with the package mentioned above, not pip.
      hint: See above for details.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

But these operations can run smoothly on my Computer with Linux OS and Python 3.12.0.
And I cannot find this package on conda-forge/osx-arm64.
If possible, could you consider adding this package on conda-forge or let me know how to resolve this issue promptly?

@GuangchenJ
Copy link
Author

and the gfortran shows that

$ gfortran -Wl,--version
collect2 version 13.2.0
/usr/bin/ld -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/ -dynamic -arch arm64 -platform_version macos 14.0.0 0.0 -o a.out -L/opt/homebrew/Cellar/gcc/13.2.0/bin/../lib/gcc/current/gcc/aarch64-apple-darwin22/13 -L/opt/homebrew/Cellar/gcc/13.2.0/bin/../lib/gcc/current/gcc -L/opt/homebrew/Cellar/gcc/13.2.0/bin/../lib/gcc/current/gcc/aarch64-apple-darwin22/13/../../.. --version -lemutls_w -lgcc -lSystem -lgcc -no_compact_unwind -rpath @loader_path -rpath /opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc/aarch64-apple-darwin22/13 -rpath /opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc -rpath /opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current
ld: unknown options: --version 
collect2: error: ld returned 1 exit status

@clonker
Copy link
Member

clonker commented Oct 24, 2023

Can you try building the package from source? Ie just call pip install . on a clone. FWIW deeptime is available on conda-forge and already updated to python 3.12, which puzzles me a bit (see conda-forge/deeptime-feedstock/pull/24). In any case, I will look into it shortly.

@GuangchenJ
Copy link
Author

I can't build it from the source, it's fine for linux, but for my Mac, it goes wrong. I can't find the version for arm64 Python3.12 on conda-forge.
when I build it, my Mac shows that

$ pip install .

Processing /Users/guangchenj/PythonProjects/deeptime
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [71 lines of output]
      Ignoring tomli: markers 'python_version < "3.11"' don't match your environment
      Collecting setuptools>=42
        Using cached setuptools-68.2.2-py3-none-any.whl.metadata (6.3 kB)
      Collecting wheel
        Using cached wheel-0.41.2-py3-none-any.whl.metadata (2.2 kB)
      Collecting scikit-build>=0.16
        Using cached scikit_build-0.17.6-py3-none-any.whl.metadata (14 kB)
      Collecting cython>=0.29.30
        Using cached Cython-3.0.4-py2.py3-none-any.whl.metadata (3.2 kB)
      Collecting pybind11>=2.10.1
        Using cached pybind11-2.11.1-py3-none-any.whl.metadata (9.5 kB)
      Collecting numpy>=1.20
        Using cached numpy-1.26.1-cp312-cp312-macosx_11_0_arm64.whl.metadata (61 kB)
      Collecting cmake>=3.24
        Using cached cmake-3.27.7-py2.py3-none-macosx_10_10_universal2.macosx_10_10_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl.metadata (6.7 kB)
      Collecting scipy==1.9.3
        Using cached scipy-1.9.3.tar.gz (42.1 MB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Installing backend dependencies: started
        Installing backend dependencies: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error
      
        × Preparing metadata (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [31 lines of output]
            + meson setup /private/var/folders/00/hgdnr2413c1fhm721v97yq4r0000gn/T/pip-install-ckph9gnu/scipy_b648fb437a9d4b1ea5d178c4aa280fef /private/var/folders/00/hgdnr2413c1fhm721v97yq4r0000gn/T/pip-install-ckph9gnu/scipy_b648fb437a9d4b1ea5d178c4aa280fef/.mesonpy-3b31abbp -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/private/var/folders/00/hgdnr2413c1fhm721v97yq4r0000gn/T/pip-install-ckph9gnu/scipy_b648fb437a9d4b1ea5d178c4aa280fef/.mesonpy-3b31abbp/meson-python-native-file.ini
            The Meson build system
            Version: 1.2.3
            Source dir: /private/var/folders/00/hgdnr2413c1fhm721v97yq4r0000gn/T/pip-install-ckph9gnu/scipy_b648fb437a9d4b1ea5d178c4aa280fef
            Build dir: /private/var/folders/00/hgdnr2413c1fhm721v97yq4r0000gn/T/pip-install-ckph9gnu/scipy_b648fb437a9d4b1ea5d178c4aa280fef/.mesonpy-3b31abbp
            Build type: native build
            Project name: SciPy
            Project version: 1.9.3
            C compiler for the host machine: cc (clang 15.0.0 "Apple clang version 15.0.0 (clang-1500.0.40.1)")
            C linker for the host machine: cc ld64 1015.7
            C++ compiler for the host machine: c++ (clang 15.0.0 "Apple clang version 15.0.0 (clang-1500.0.40.1)")
            C++ linker for the host machine: c++ ld64 1015.7
            Host machine cpu family: aarch64
            Host machine cpu: aarch64
            Compiler for C supports arguments -Wno-unused-but-set-variable: YES
            Compiler for C supports arguments -Wno-unused-but-set-variable: YES (cached)
            Compiler for C supports arguments -Wno-unused-function: YES
            Compiler for C supports arguments -Wno-conversion: YES
            Compiler for C supports arguments -Wno-misleading-indentation: YES
            Compiler for C supports arguments -Wno-incompatible-pointer-types: YES
            Library m found: YES
      
            ../meson.build:57:0: ERROR: Unable to detect linker for compiler `gfortran -Wl,--version`
            stdout:
            stderr: collect2 version 13.2.0
            /usr/bin/ld -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/ -dynamic -arch arm64 -platform_version macos 14.0.0 0.0 -o a.out -L/opt/homebrew/Cellar/gcc/13.2.0/bin/../lib/gcc/current/gcc/aarch64-apple-darwin22/13 -L/opt/homebrew/Cellar/gcc/13.2.0/bin/../lib/gcc/current/gcc -L/opt/homebrew/Cellar/gcc/13.2.0/bin/../lib/gcc/current/gcc/aarch64-apple-darwin22/13/../../.. --version -lemutls_w -lgcc -lSystem -lgcc -no_compact_unwind -rpath @loader_path -rpath /opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc/aarch64-apple-darwin22/13 -rpath /opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc -rpath /opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current
            ld: unknown options: --version
            collect2: error: ld returned 1 exit status
      
      
            A full log can be found at /private/var/folders/00/hgdnr2413c1fhm721v97yq4r0000gn/T/pip-install-ckph9gnu/scipy_b648fb437a9d4b1ea5d178c4aa280fef/.mesonpy-3b31abbp/meson-logs/meson-log.txt
            [end of output]
      
        note: This error originates from a subprocess, and is likely not a problem with pip.
      error: metadata-generation-failed
      
      × Encountered error while generating package metadata.
      ╰─> See above for output.
      
      note: This is an issue with the package mentioned above, not pip.
      hint: See above for details.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

And I try to check the gfortran:

$ gfortran --version

GNU Fortran (Homebrew GCC 13.2.0) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

and I check gfortran -Wl,--version, it shows that

$ gfortran -Wl,--version

collect2 version 13.2.0
/usr/bin/ld -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/ -dynamic -arch arm64 -platform_version macos 14.0.0 0.0 -o a.out -L/opt/homebrew/Cellar/gcc/13.2.0/bin/../lib/gcc/current/gcc/aarch64-apple-darwin22/13 -L/opt/homebrew/Cellar/gcc/13.2.0/bin/../lib/gcc/current/gcc -L/opt/homebrew/Cellar/gcc/13.2.0/bin/../lib/gcc/current/gcc/aarch64-apple-darwin22/13/../../.. --version -lemutls_w -lgcc -lSystem -lgcc -no_compact_unwind -rpath @loader_path -rpath /opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc/aarch64-apple-darwin22/13 -rpath /opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc -rpath /opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current
ld: unknown options: --version 
collect2: error: ld returned 1 exit status

And I try to modify the file pyproject.toml, remove the requirement python_version < '3.11' and change "scipy==1.9.3" to "scipy>=1.9.3"

[build-system]
requires = [
    "setuptools>=42",
    "wheel",
    "scikit-build>=0.16",
    "cython>=0.29.30",
    "pybind11>=2.10.1",
    "numpy>=1.20",
    "cmake>=3.24",
    "tomli",
    "scipy>=1.9.3",
    "ninja; platform_system!='Windows'",
    "versioneer[toml]==0.28"
]

and build it by calling pip install ., it shows that:

$ pip install .

Processing /Users/guangchenj/PythonProjects/deeptime
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting numpy>=1.20 (from deeptime==0.4.4+6.ga6ac0b9.dirty)
  Using cached numpy-1.26.1-cp312-cp312-macosx_11_0_arm64.whl.metadata (61 kB)
Collecting scipy>=1.9.0 (from deeptime==0.4.4+6.ga6ac0b9.dirty)
  Using cached scipy-1.11.3-cp312-cp312-macosx_12_0_arm64.whl.metadata (217 kB)
Collecting scikit-learn>=1.1 (from deeptime==0.4.4+6.ga6ac0b9.dirty)
  Downloading scikit_learn-1.3.2-cp312-cp312-macosx_12_0_arm64.whl.metadata (11 kB)
Collecting threadpoolctl>=3.1.0 (from deeptime==0.4.4+6.ga6ac0b9.dirty)
  Using cached threadpoolctl-3.2.0-py3-none-any.whl.metadata (10.0 kB)
Collecting joblib>=1.1.1 (from scikit-learn>=1.1->deeptime==0.4.4+6.ga6ac0b9.dirty)
  Using cached joblib-1.3.2-py3-none-any.whl.metadata (5.4 kB)
Using cached numpy-1.26.1-cp312-cp312-macosx_11_0_arm64.whl (13.7 MB)
Downloading scikit_learn-1.3.2-cp312-cp312-macosx_12_0_arm64.whl (9.3 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.3/9.3 MB 5.2 MB/s eta 0:00:00
Using cached scipy-1.11.3-cp312-cp312-macosx_12_0_arm64.whl (29.6 MB)
Using cached threadpoolctl-3.2.0-py3-none-any.whl (15 kB)
Using cached joblib-1.3.2-py3-none-any.whl (302 kB)
Building wheels for collected packages: deeptime
  Building wheel for deeptime (pyproject.toml) ... done
  Created wheel for deeptime: filename=deeptime-0.4.4+6.ga6ac0b9.dirty-cp312-cp312-macosx_14_0_arm64.whl size=1529419 sha256=e3811008f50f66927d6b03495aa1098e420e418469a4ffc10e389a61f9facedb
  Stored in directory: /private/var/folders/00/hgdnr2413c1fhm721v97yq4r0000gn/T/pip-ephem-wheel-cache-wbqjr82m/wheels/42/aa/ae/137d294a8f2ca28c2cd247961e34d387f9be2f55f5525f6170
Successfully built deeptime
Installing collected packages: threadpoolctl, numpy, joblib, scipy, scikit-learn, deeptime
Successfully installed deeptime-0.4.4+6.ga6ac0b9.dirty joblib-1.3.2 numpy-1.26.1 scikit-learn-1.3.2 scipy-1.11.3 threadpoolctl-3.2.0

It looks like fine......
Please update the requirement in pyproject.toml.

@clonker
Copy link
Member

clonker commented Nov 28, 2023

Since conda-forge/deeptime-feedstock#25 is merged I expect conda support for this architecture

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

2 participants