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

install pygimli on Mac #637

Open
vandam60 opened this issue Dec 22, 2023 · 8 comments
Open

install pygimli on Mac #637

vandam60 opened this issue Dec 22, 2023 · 8 comments
Assignees

Comments

@vandam60
Copy link

Problem description

I am unable to use condo to install pygimli.
when I run the command,
conda create -n pg -c gimli -c conda-forge pygimli=1.4.5
it runs for hours and it doesn't finish.

I have tried to build from source using the directions found here. instead of brew I used port.
I am able to get to go through the CMake build using:

cmake ../gimli -DPYTHON_EXECUTABLE=/Users/u6030191/anaconda3/bin/python3.11 -DPYTHON_INCLUDE_DIR=/opt/local/library/Frameworks/Python.framework/Versions/3.11/include/python3.11m -DPYTHON_LIBRARY=/opt/local/library/Frameworks/Python.framework/Version -DPY_NUMPY=/Users/u6030191/anaconda3/lib/python3.11/site-packages/numpy

at the bottom you see that I get the message "pygimli can be build. run: make pygimli"

But when I run the command
make -j 8
make gimili
make pygimili found on the installing from source page, I get the errors:

Consolidate compiler generated dependencies of target gimli
[ 2%] Building CXX object core/src/CMakeFiles/gimli.dir/gimli.cpp.o
In file included from /Users/u6030191/src/gimli/gimli/core/src/gimli.cpp:31:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/vecLib.framework/Headers/cblas.h:279:65: error: parameter declarator cannot be qualified
const enum CBLAS_TRANSPOSE __TransA, const int __M, const int __N,
^~~
/Users/u6030191/src/gimli/gimli/core/src/gimli.h:192:18: note: expanded from macro '__M'
#define __M std::cout << "*** " << WHERE << std::endl;

I am stuck and have worked on this for more than 20 hours. any help you can give me will be so much appreciated.
thank you,
---tonie

output to the screen from CMAKE:

-- CMAKE_SOURCE_DIR="/Users/u6030191/src/gimli/gimli"
-- System: Darwin Darwin-22.6.0 22.6.0
-- Compiler: AppleClang
-- UNIX: 1 on all UNIX-like OS's, including Apple OS X and CygWin
-- WIN32: on Windows. Prior to 2.8.4 this included CygWin
-- APPLE: 1 on Apple systems. does not imply the system is Mac OS X.
-- MINGW: using the MinGW compiler in Windows
-- MSYS: using the MSYS developer environment in Windows
-- CYGWIN: using the CygWin version of cmake
-- MSVC:
STATUS,TRUE
STATUS,setting version from git description: v1.4.5-60-g860c95a7
-- Target is 64 bits
-- ThirdParty set to: /Users/u6030191/src/gimli/gimli/../thirdParty/
-- External set to: /Users/u6030191/src/gimli/thirdParty/dist-AppleClang-14.0.3.14030022-64
-- ********** PYTHON ***********
-- Manually searching for python (pre cmake 3.14): 3
-- Python_INCLUDE_DIRS: /opt/local/library/Frameworks/Python.framework/Versions/3.11/include/python3.11m
-- Python_LIBRARIES: /opt/local/library/Frameworks/Python.framework/Version
-- Python_NumPy: TRUE, /Users/u6030191/anaconda3/lib/python3.11/site-packages/numpy
-- ********** BOOST ***********
-- Trying to guess boost installation:
-- BOOST_ROOT:
-- Boost_INCLUDE_DIR: /usr/local/include
-- ********** BOOST_PYTHON ***********
-- boost-python not found by cmake ... trying to determine boost-python manually ...
-- ----------- searching for libboost_python311
-- ----------- found:
-- Boost_PYTHON_FOUND:1
-- Boost_PYTHON_LIBRARY:Boost::python
-- ********** Misc ***********
-- Triangle_LIBRARIES = /Users/u6030191/src/gimli/thirdParty/dist-AppleClang-14.0.3.14030022-64/lib/libtriangle.a
-- ** Find or build Triangle at: TRIANGLE_FOUND force: True
-- Checking for package 'TRIANGLE'
-- External dir: /Users/u6030191/src/gimli/thirdParty/dist-AppleClang-14.0.3.14030022-64
-- Triangle_INCLUDE_DIR = /Users/u6030191/src/gimli/thirdParty/dist-AppleClang-14.0.3.14030022-64/include
-- Triangle_LIBRARIES = /Users/u6030191/src/gimli/thirdParty/dist-AppleClang-14.0.3.14030022-64/lib/libtriangle.a
-- Found: TRUE
-- Local build Triangle forced: True
-- ** Find or build Triangle done.
-- BLAS found:TRUE
-- OpenBLAS is used: /opt/local/lib/libopenblas.dylib
-- UMFPACK_INCLUDES : /opt/local/include
-- UMFPACK_LIBRARIES : /opt/local/lib/libumfpack.dylib
-- Checking for package 'CHOLMOD'
-- CHOLMOD_LIBRARIES: /opt/local/lib/libcholmod.dylib
-- not found cppunit
CMake Warning (dev) at /opt/local/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to find_package_handle_standard_args (READPROC)
does not match the name of the calling package (readproc). This can lead
to problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
core/cmake/Findreadproc.cmake:22 (find_package_handle_standard_args)
CMakeLists.txt:531 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

-- readproc could not be found. (missing: READPROC_LIBRARIES READPROC_INCLUDE_DIR)
-- ** Find or build castxml at: CASTXML_FOUND force: True
-- Found castxml executable:
-- Found:
-- Local build castxml forced: True
-- ** Find or build castxml done.
-- clang++ found : /usr/bin/clang
-- ** Find or build castxml at: CASTXML_FOUND force: True
-- Found castxml executable:
-- Found:
-- Local build castxml forced: True
-- ** Find or build castxml done.
-- ** Find or build pygccxml at: PYGCCXML_FOUND force: True
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'pygccxml'
-- Find python module pygccxml fails:
-- Result: 1
-- Output:
-- Maybe you can provide the location by stetting PY_PYGCCXML
-- Could NOT find pygccxml (missing: PY_PYGCCXML)
-- Found pygccxml path: /Users/u6030191/src/gimli/thirdParty/dist-AppleClang-14.0.3.14030022-64
-- Found pygccxml path: /Users/u6030191/src/gimli/thirdParty/dist-AppleClang-14.0.3.14030022-64
-- Found pygccxml path: /Users/u6030191/src/gimli/thirdParty/dist-AppleClang-14.0.3.14030022-64
-- Found:
-- Local build pygccxml forced: True
-- ** Find or build pygccxml done.
-- ** Find or build pyplusplus at: PYPLUSPLUS_FOUND force: True
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'pyplusplus'
-- Find python module pyplusplus fails:
-- Result: 1
-- Output:
-- Maybe you can provide the location by stetting PY_PYPLUSPLUS
-- Could NOT find pyplusplus (missing: PY_PYPLUSPLUS)
-- Found pyplusplus path: /Users/u6030191/src/gimli/thirdParty/dist-AppleClang-14.0.3.14030022-64
-- Found:
-- Local build pyplusplus forced: True
-- ** Find or build pyplusplus done.
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Search recursive for *.rst from here: /Users/u6030191/src/gimli/gimli
-- DOCFILES: ../core/python/apps/gimliAUTHORS.rstCITATION.rstCOPYING.rstINSTALLATION.rstREADME.rstcore/python/apps/gimlidependencies.rstdoc/BUILD_LINUX.rstdoc/BUILD_MAC.rstdoc/BUILD_WIN.rstdoc/_templates/module.rstdoc/about.rstdoc/citation.rstdoc/compilation.rstdoc/contrib.rstdoc/design.rstdoc/dev.rstdoc/documentation.rstdoc/faq.rstdoc/glossary.rstdoc/installation.rstdoc/license.rstdoc/paper/cg17/index.rstdoc/pygimliapi/index.rstdoc/references.rstdoc/tools.rst
-- PNGFILES: ../core/python/apps/gimlicore/python/apps/gimlidoc/_static/bg_dark.pngdoc/_static/bg_light.pngdoc/_static/cad_tutorial/freecad_fig.pngdoc/_static/cad_tutorial/gmsh_fig.pngdoc/_static/gmsh/bbox_coordinate.pngdoc/_static/gmsh/create_point.pngdoc/_static/gmsh/examples.pngdoc/_static/gmsh/line.pngdoc/_static/gmsh/mod_inv.pngdoc/_static/gmsh/surf1.pngdoc/_static/pg_design.pngdoc/_static/usecases/bergmann2014.pngdoc/_static/usecases/costabel2016.pngdoc/_static/usecases/gruenenbaum2023.pngdoc/_static/usecases/guenther2012.pngdoc/_static/usecases/guenther2016.pngdoc/_static/usecases/hellman2017.pngdoc/_static/usecases/huebner2017.pngdoc/_static/usecases/jordi2018.pngdoc/_static/usecases/loewer2017.pngdoc/_static/usecases/martin2013.pngdoc/_static/usecases/nazari2023.pngdoc/_static/usecases/pasquale2019.pngdoc/_static/usecases/rochlitz2018.pngdoc/_static/usecases/rochlitz2023.pngdoc/_static/usecases/ronczka2015a.pngdoc/_static/usecases/ronczka2015b.pngdoc/_static/usecases/ronczka2017.pngdoc/_static/usecases/skibbe2018.pngdoc/_static/usecases/skibbe2021.pngdoc/_static/usecases/steiner2019.pngdoc/_static/usecases/uecker2022.pngdoc/_static/usecases/wadas2022.pngdoc/_static/usecases/wagner2015.pngdoc/_static/usecases/wunderlich2018.pngpygimli/viewer/pv/pyqt/3dlogo.png
-- BIBFILES: ../core/python/apps/gimlicore/python/apps/gimlidoc/gimliuses.bibdoc/libgimli.bibdoc/references.bib
-- PYFILES: ../core/python/apps/gimlicore/python/apps/gimlidoc/paper/cg17/example-1.pydoc/paper/cg17/example-2.pydoc/paper/cg17/example-2_modelling.pydoc/paper/cg17/example-2_visualization.py
-- **********************************************************************
-- ************************* Dependencies found *************************
-- **********************************************************************
-- THREADS : std
-- USE_OPENBLAS : TRUE, OPENBLAS_CBLAS_FOUND :TRUE
-- BLAS_LIBRARIES : /opt/local/lib/libopenblas.dylib
-- OpenBLAS_INCLUDE_DIR : /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/vecLib.framework/Headers
-- CHOLMOD_LIBRARIES : /opt/local/lib/libcholmod.dylib
-- UMFPACK_LIBRARIES : /opt/local/lib/libumfpack.dylib
-- TRIANGLE_FOUND : TRUE Triangle_LIBRARIES: /Users/u6030191/src/gimli/thirdParty/dist-AppleClang-14.0.3.14030022-64/lib/libtriangle.a
-- Python_EXECUTABLE : /Users/u6030191/anaconda3/bin/python3.11
-- Python_LIBRARY_DIRS :
-- Python_LIBRARIES : /opt/local/library/Frameworks/Python.framework/Version
-- Python_INCLUDE_DIRS : /opt/local/library/Frameworks/Python.framework/Versions/3.11/include/python3.11m
-- Boost_INCLUDE_DIR : /usr/local/include
-- Boost_PYTHON_LIBRARY : Boost::python
-- Python_NumPy : TRUE /Users/u6030191/anaconda3/lib/python3.11/site-packages/numpy/core/include ver:
-- CASTER_FOUND : TRUE Caster: /Users/u6030191/src/gimli/thirdParty/dist-AppleClang-14.0.3.14030022-64/bin/castxml
-- PYGCCXML_FOUND : TRUE PYGCCXML: /Users/u6030191/src/gimli/thirdParty/dist-AppleClang-14.0.3.14030022-64
-- PYPLUSPLUS_FOUND : TRUE PYPLUSPLUS_PATH: /Users/u6030191/src/gimli/thirdParty/dist-AppleClang-14.0.3.14030022-64

-- **********************************************************************
-- *************** Optional Dependencies found **************************
-- **********************************************************************
-- CPPUNIT :
-- Doxygen : NO
-- Sphinx : TRUE /Users/u6030191/anaconda3/bin/sphinx-build sphinx-build 5.0.2

-- **********************************************************************

-- pygimli can be build. run: make pygimli
-- **********************************************************************

-- Configuring done
-- Generating done
-- Build files have been written to: /Users/u6030191/src/gimli/build

Your environment

Please provide the output of print(pygimli.Report()) here. If that does not
work, please give provide some additional information on your:

Operating system: Mac OS 13.6.1 (22G313)
Python version: 3.11
pyGIMLi version: none however I ran "git clone https://github.com/gimli-org/gimli.git"
Way of installation: manual compilation from source

Steps to reproduce

Tell us how to reproduce this issue. Ideally, you could paste the code that produces the error:

import pygimli as pg
...

Expected behavior

Tell us what should happen or what you want to achieve.

Actual behavior

Tell us what happens instead and/or provide the output of your script.

Paste your script output here.

If possible, please add one or more labels to your issue, e.g. if you expect that your issue is rather a question than a problem with the code, please add the label "question".

@florian-wagner florian-wagner self-assigned this Dec 23, 2023
@halbmy
Copy link
Contributor

halbmy commented Dec 28, 2023

when I run the command,
conda create -n pg -c gimli -c conda-forge pygimli=1.4.5
it runs for hours and it doesn't finish.

We are aware of difficulties in resolving the conda solving process.

You can use the libmamba solver (a faster alternative) by either

conda install -n base conda-libmamba-solver
conda config --set solver libmamba

or update to the newest conda version where it is already implemented

conda update -n base conda

@vandam60
Copy link
Author

please don't close this. becasue of the holidays, i have not been able to try this out. please give me some more time.

@florian-wagner
Copy link
Member

Yes, of course, take your time! And if you try, please directly test with the latest version pyGIMLi v1.4.6

Best wishes

@Prithwijit-Chak
Copy link

Hi,

I have been trying to install pygimli on windows by creating a separate conda environment with python version 3.10.13. However, I am getting the following error everytime. It seems like pygimli is not compatible with python >3.10?

I also tried installing using the command given in the instruction for installation. It is working fine but a python 3.9 environment is being created by default.

Output

(pg_test) C:\Users\pchakraborti>python --version
Python 3.10.13

(pg_test) C:\Users\pchakraborti>conda install -c gimli -c conda-forge pygimli=1.4.6
Channels:

  • gimli
  • conda-forge
  • defaults
    Platform: win-64
    Collecting package metadata (repodata.json): done
    Solving environment: / warning libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE
    failed

LibMambaUnsatisfiableError: Encountered problems while solving:

  • package pygimli-1.4.6-py_0 requires pgcore 1.4.0.*, but none of the providers can be installed

Could not solve for environment specs
The following packages are incompatible
├─ pin-1 is installable and it requires
│ └─ python 3.10.* , which can be installed;
└─ pygimli 1.4.6** is not installable because it requires
└─ pgcore 1.4.0.* , which requires
└─ python >=3.9,<3.10.0a0 , which conflicts with any installable versions previously reported.

Pins seem to be involved in the conflict. Currently pinned specs:

  • python 3.10.* (labeled as 'pin-1')

@halbmy
Copy link
Contributor

halbmy commented Jan 29, 2024

On Windows, pyGIMLi is currently only available for Python 3.9. We will change this in the future but now we recommend to create a new environment as written on pygimli.org under installation.

@florian-wagner
Copy link
Member

As this was originally a Mac issue, @vandam60, any news?

@florian-wagner
Copy link
Member

Dear @Prithwijit-Chak @vandam60,

could you please try if conda create -n pg15 -c gimli -c conda-forge pygimli=1.5.0 works on your Mac machines?

Thanks
Florian

@jwhhh
Copy link

jwhhh commented May 7, 2024

Just to add some data points here. I tried the above command (conda create -n pg15 -c gimli -c conda-forge pygimli=1.5.0) on the following:

  • Mac (Intel) MacOS 12.0.1
  • Mac (M1) MacOS 14.3.1
  • Rocky Linux 8.9

I can confirm the installation command works on all of them without an error, but I can't seem to import pygimli on any of the above. I'm getting the same error as in #618.

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

5 participants