Closed Chih-Hao-Kuo closed 2 months ago
I can confirm the error. It seems like pgcore is installed correctly but apparently it is not. I guess I will have to build a special conda package with the matching numpy etc. like I did last time for Python 3.7.
Thank you. Is there any alternative or workaround? Let me know your recommendations.
I am afraid not. We will have to look at which package versions are installed and build a conda package for it. Of course this will change everytime Google updates the configuration.
I see. Thanks for letting me know. Do you have any timeline as to when this problem is expected to get fixed?
I was wrong. pgcore
seems not to be installed correctly. There is only a pgcore.pth
pointing to the pgcore-1.4.0-py3.10.egg
but a folder pgcore
holding an init file and the libgimli.so
is missing. Any help from people with more insight into conda installation is appreciated.
After noting that Google Colab (or rather condacolab) has switched to Mambaforge with Python 3.10 and numpy 1.23, I just gave it another try. It seems to install 190 (!) packages and seems to install pygimli properly (!ls -l /usr/local/lib/python3.10/site-packages/pygimli
):
drwxr-xr-x 3 root root 4096 Nov 13 06:46 core
drwxr-xr-x 3 root root 4096 Nov 13 06:46 frameworks
-rw-rw-r-- 2 root root 10318 Nov 9 15:59 __init__.py
drwxr-xr-x 3 root root 4096 Nov 13 06:47 math
drwxr-xr-x 3 root root 4096 Nov 13 06:46 meshtools
drwxr-xr-x 12 root root 4096 Nov 13 06:46 physics
drwxr-xr-x 2 root root 4096 Nov 13 06:47 __pycache__
drwxr-xr-x 3 root root 4096 Nov 13 06:46 solver
drwxr-xr-x 3 root root 4096 Nov 13 06:46 testing
drwxr-xr-x 3 root root 4096 Nov 13 06:46 utils
-rw-rw-r-- 2 root root 497 Nov 9 16:04 _version.py
drwxr-xr-x 5 root root 4096 Nov 13 06:46 viewer
but not pgcore (!ls -l /usr/local/lib/python3.10/site-packages/pgcore
)
ls: cannot access '/usr/local/lib/python3.10/site-packages/pgcore': No such file or directory
Both packages seem to be installed correctly (!mamba list
):
pgcore 1.4.0 pypi_0 pypi
pygimli 1.4.5 py_0 gimli
but pgcore is not installed at all. Boost 1.80 is installed, but there is no np123py39 core package (yet).
Dear Thomas,
Thanks for the update. I also gave another try in google colab
using Mamba to install pygimli package.
!pip install -q condacolab import condacolab condacolab.install() !mamba install -c gimli pygimli
After installation is complete, I checked if the following packages have been installed :
!mamba list
pygimli 1.4.5 py_0 gimli pgcore 1.4.0 pypi_0 pypi
But if I tried to import pygimli package , I still get the following error.
import pygimli
ImportError Traceback (most recent call last)
/usr/local/lib/python3.10/site-packages/pygimli/core/core.py
https://localhost:8080/# in
ImportError: cannot import name 'pygimli' from partially initialized module 'pygimli.core' (most likely due to a circular import) (/usr/local/lib/python3.10/site-packages/pygimli/core/init.py)
During handling of the above exception, another exception occurred:
ModuleNotFoundError Traceback (most recent call last)
/usr/local/lib/python3.10/site-packages/pygimli/core/core.py
https://localhost:8080/# in
ModuleNotFoundError: No module named 'pgcore'
NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt.
The error message shows that the pgcore module is still not installed properly.
Also, I tried to downgrade the python version to 3.8 but experienced an error with the installation of condacolab.
Thanks Chih
On Mon, Nov 13, 2023 at 2:59 PM Thomas Günther @.***> wrote:
After noting that Google Colab (or rather condacolab) has switched to Mambaforge with Python 3.10 and numpy 1.23, I just gave it another try. It seems to install 190 (!) packages and seems to install pygimli properly (!ls -l /usr/local/lib/python3.10/site-packages/pygimli):
drwxr-xr-x 3 root root 4096 Nov 13 06:46 core drwxr-xr-x 3 root root 4096 Nov 13 06:46 frameworks -rw-rw-r-- 2 root root 10318 Nov 9 15:59 init.py drwxr-xr-x 3 root root 4096 Nov 13 06:47 math drwxr-xr-x 3 root root 4096 Nov 13 06:46 meshtools drwxr-xr-x 12 root root 4096 Nov 13 06:46 physics drwxr-xr-x 2 root root 4096 Nov 13 06:47 pycache drwxr-xr-x 3 root root 4096 Nov 13 06:46 solver drwxr-xr-x 3 root root 4096 Nov 13 06:46 testing drwxr-xr-x 3 root root 4096 Nov 13 06:46 utils -rw-rw-r-- 2 root root 497 Nov 9 16:04 _version.py drwxr-xr-x 5 root root 4096 Nov 13 06:46 viewer
but not pgcore (!ls -l /usr/local/lib/python3.10/site-packages/pgcore)
ls: cannot access '/usr/local/lib/python3.10/site-packages/pgcore': No such file or directory
Both packages seem to be installed correctly (!mamba list):
pgcore 1.4.0 pypi_0 pypi pygimli 1.4.5 py_0 gimli
but pgcore is not installed at all. Both `
— Reply to this email directly, view it on GitHub https://github.com/gimli-org/gimli/issues/539#issuecomment-1807567718, or unsubscribe https://github.com/notifications/unsubscribe-auth/APZYLJUHKPKPQJFGR5BVPZDYEHALVAVCNFSM6AAAAAAYM7MBO2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBXGU3DONZRHA . You are receiving this because you authored the thread.Message ID: @.***>
From version v1.5 (just out now) on, we support pip as alternative way for installation, at least for Linux and still in test mode. This in turn allows for running pyGIMLi on Google colab again, see instructions on https://www.pygimli.org/installation.html#pygimli-on-google-colab
Problem description
After installing the current version of pygimili on google colab, I received an error message as follows.
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: Windows Python version: Python 3.10.10 pyGIMLi version: 1.4.0 Way of installation:conda
Steps to reproduce
After creating a Google Colab notebook, just follow the manual instructions.
After typing
import pygimli
, you will see the error messageExpected behavior
we should not experience any error message
Actual behavior
error message as follows: