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

New version could not find Python Anaconda #470

Closed
potassium-chloride opened this issue Feb 22, 2024 · 3 comments
Closed

New version could not find Python Anaconda #470

potassium-chloride opened this issue Feb 22, 2024 · 3 comments

Comments

@potassium-chloride
Copy link

potassium-chloride commented Feb 22, 2024

Dear developers,

I have problems installing CRPropa on my system
System Information: (Please fill out the following information)

  • Operating system: Linux Mint 20 Cinnamon
  • Laptop
  • Python version: 3.7.6 (default, Jan 8 2020, 19:59:22), Anaconda
  • NumPy version: 1.21.6
  • Swig version: 4.0.1
  • Cmake version: 3.16.3

Did you install CRPropa from git or download a release?
I installed version 3.2.1-77-g3498d825 from git cloning.

Things that I tried before asking for help:
I read and followed the installation instructions at https://crpropa.github.io/CRPropa3/ . Before writing this request I have installed previous version of CRPropa 3.2.1-no-git without problems. Today I receive the following output:

  Could NOT find Python (missing: Python_LIBRARIES Python_INCLUDE_DIRS
  Python_NumPy_INCLUDE_DIRS Development NumPy) (found suitable version
  "3.9.5", minimum required is "3.0")
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.16/Modules/FindPython/Support.cmake:2214 (find_package_handle_standard_args)
  /usr/share/cmake-3.16/Modules/FindPython.cmake:304 (include)
  CMakeLists.txt:448 (find_package)

But I have Python+NumPy and successfully installed previous version.
Previous version o CMakeLists.txt used lines:

find_package(PythonLibs)

New version uses line: find_package(Python 3.0 REQUIRED COMPONENTS Interpreter Development NumPy)

I tried putting -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DPYTHON_EXECUTABLE=$(which python) -DCMAKE_PREFIX_PATH=$CONDA_PREFIX after cmake command but there is no effect.

Cmake found python at /usr/bin/python3.9, but I always use Anaconda. How to fix it?

@potassium-chloride potassium-chloride changed the title New version could not find Python New version could not find Python Anaconda Feb 22, 2024
@rafaelab
Copy link
Member

The CMake Python finder understands Python_EXECUTABLE but not PYTHON_EXECUTABLE.

@potassium-chloride
Copy link
Author

Thanks a lot! It helped. I confused because previous version understands PYTHON_EXECUTABLE.

@rafaelab
Copy link
Member

Thanks, @potassium-chloride .
The documentation will be amended following your question, with pull request #471

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

No branches or pull requests

2 participants