Open srkaeppler opened 4 months ago
Dear @srkaeppler,
not sure why the test target fails, but the installation generally seems to have worked.
Can you check if the following works
cd /Users/srkaeppler/research/data/pygimli/source/
python -c "import pygimli; print(pygimli.__version__)"
If yes, you probably just need to add the path to your .bashrc
.
Best wishes Florian
@florian-wagner :
srkaeppler@Stephens-MacBook-Pro-2 foo % source ~srkaeppler/Env3/gimli/bin/activate
(gimli) srkaeppler@Stephens-MacBook-Pro-2 foo % cd ~srkaeppler/research/data/pygimli/source
(gimli) srkaeppler@Stephens-MacBook-Pro-2 source % ls
AUTHORS.rst INSTALLATION.rst apps environment.yml
CHANGELOG.md ISSUE_TEMPLATE.md build pygimli
CITATION.cff MANIFEST.in core pygimli.egg-info
CITATION.rst PULL_REQUEST_TEMPLATE.md dependencies.rst setup.cfg
CMakeLists.txt README.md dev_requirements.txt setup.py
CONTRIBUTING.md README.rst dist versioneer.py
COPYING.rst __pycache__ doc
(gimli) srkaeppler@Stephens-MacBook-Pro-2 source % python -c "import pygimli; print(pygimli.__version__)"
Traceback (most recent call last):
File "/Users/srkaeppler/research/data/pygimli/source/pygimli/core/core.py", line 11, in <module>
from . import _pygimli_ # if it works: as pgcore, replace all _pygimli_
^^^^^^^^^^^^^^^^^^^^^^^
ImportError: dlopen(/Users/srkaeppler/research/data/pygimli/source/pygimli/core/_pygimli_.so, 0x0002): symbol not found in flat namespace '_openblas_set_num_threads'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/srkaeppler/research/data/pygimli/source/pygimli/__init__.py", line 8, in <module>
from .core.decorators import (renamed, singleton, moduleProperty,
File "/Users/srkaeppler/research/data/pygimli/source/pygimli/core/__init__.py", line 11, in <module>
from .core import pgcore
File "/Users/srkaeppler/research/data/pygimli/source/pygimli/core/core.py", line 19, in <module>
import pgcore
ModuleNotFoundError: No module named 'pgcore'
(gimli) srkaeppler@Stephens-MacBook-Pro-2 source %
I also very much appreciate the help. I have debated whether to just use conda and bite the bullet. Brady got me onto this code and I have a particular nonlinear regularization problem I am wondering if this code could help with, so I am especially interested in the regularization notebooks, etc.
After some recent changes on the build toolchain its good to remove the CMakeCache.txt
in the build path or even try a new clean build.
You could also give the wheel
branch a try. Its on the same state like the dev
branch plus a test for a build-chain for whl generation using venv. Note, this branch is not yet tested for mac and there might be some minor tweeks necessary.
In the new branch are new make targets which should produce valid whl files for local pip installation.
make whlpgcore
make whlpygimli
Both create there respective whl files and test them against a local test venv. The final whl's you can find in build/wheelhouse. If there is something wrong maybe the cmake output give some hints.
@carsten-forty2 @florian-wagner Thanks for the response. I see two potential actions here and let me outline the proposed procedure.
One:
Two:
git checkout wheel
to get onto the wheel
branch.make -j=8
make whlpgcore
make whlpygimli
make pygimli J=8
Is this the procedure?One last thing, how do I build or make pgcore
maybe that is what is screwing up...
@carsten-forty2 @florian-wagner
The other issue I am still concerned about is that the .so
file above has some missing tags. I am not sure if this is something you need to set as a compiler option or some sort of .bashrc
environment variable. I am setting some of this stuff in .zshrc
since I am using a mac with a M3 chip. I have not extensively worked with openblas or any of those packages, so any help there would be appreciated.
Thank you both for helping me! Once we get this working, I am happy to post this to you in some form and you could potentially add it to your website.
Just recloned this morning and getting new errors during the make install -j8
step:
file INSTALL cannot find
"/Users/srkaeppler/research/data/pygimli/source/build/gimli_export.h": No
such file or directory.
Call Stack (most recent call first):
cmake_install.cmake:42 (include)
The documentation has gotten a lot better on installation. I decided to attempt to install on mac using
brew
andvenv
. I realize this is not supported, but I have wanted to stay away fromconda
because I heard that it is hard to remove from your computer, although I may go that route. I was able to get completions of:make -j=8
andmake pygimli J=8
However, when I test the code by loading the code, I get the following error:I am not sure what the issue is.
My brew and enviornment installation includes the following packages:
Here is the full output in this file: https://www.dropbox.com/scl/fi/7antaqtoafg3ra3tsmgms/gimli-srkaeppler-Stephens-MBP-2-pygiml.txt?rlkey=rdlr69962pl34qwibilcjay22&dl=0