gempy-project / gempy

GemPy is an open-source, Python-based 3-D structural geological modeling software, which allows the implicit (i.e. automatic) creation of complex geological models from interface and orientation data. It also offers support for stochastic modeling to address parameter and model uncertainties.
https://gempy.org
European Union Public License 1.2
941 stars 232 forks source link

Gempy import fails #842

Closed Wrobs38 closed 3 months ago

Wrobs38 commented 7 months ago

Describe the bug I have installed : $ conda install theano $ pip install gempy

I also installed the following components of Microsoft Visual Basic which were preventing the install of some components of Theano (or gempy) :

I added the following SYSTEM environment variables:

as well as USER environment variable: VSINSTALLDIR VCVARSBAT as C:\Program Files\Microsoft Visual Studio\2022\Community

I created a new environment : $ conda create --gempy_env3 gempy python==3.7

In Jupyter Notebook, after activating the environment, I run: import gempy as gp

I get this error message: Traceback (most recent call last):

File ~\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py:3369 in run_code exec(code_obj, self.user_global_ns, self.user_ns)

Input In [1] in <cell line: 1> import gempy as gp

File ~\Anaconda3\lib\site-packages\gempy__init__.py:24 in from .core.model import Project, ImplicitCoKriging

File ~\Anaconda3\lib\site-packages\gempy\core\model.py:1575 match type(field_at_surface_points): ^ SyntaxError: invalid syntax

Not sure what the issue is and how to solve it. could you please help me?

thanks a lot JC

To Reproduce Provide detailed steps to reproduce the behavior:

1. 2. 3. ...

Expected behavior when i import gempy as gp i'd expect it to load the gempy librairies

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

it was installed from pip today, 29/11/2023

* if installed via pip: provide GemPy version (e.g. 2.0.1)
* if cloned from GitHub: provide Git commit id (e.g. 839bf85f)

Additional context Add any other context about the problem here.

thank you very much for your help, looking forward to hear back from you

regards JC

ChristinBo commented 7 months ago

I think I got the same issue, also Widnows 10 with gempy 2.3.1 installed via pip.

Japhiolite commented 7 months ago

Hi @Wrobs38

File ~\Anaconda3\lib\site-packages\gempy\core\model.py:1575 match type(field_at_surface_points): ^ SyntaxError: invalid syntax

match statements were introduced with Python 3.10. But I see, you created your conda environment with python 3.7 $ conda create --gempy_env3 gempy python==3.7.

Can you try with Python 3.10 (and install aesara, not theano)?

Wrobs38 commented 5 months ago

thanks @Japhiolite (sorry it took me a long while to get back to you). I tried but it did not work either. Is it worth testing the Version 3 instead? Florian mentioned that most dependencies are removed to ease the installation

thanks JCW

javoha commented 3 months ago

Hi and sorry for the late reply. Gempy v3 is available now and should hopefully solve these problems as you mentioned. Please feel free to reopen the issue if you keep encountering problems.

Varun019140 commented 2 months ago

Hi and sorry for the late reply. Gempy v3 is available now and should hopefully solve these problems as you mentioned. Please feel free to reopen the issue if you keep encountering problems.

hi can you plzz tell me the steps from the starting ..how to install gempy