opengeostat/pygslib

Cpython Code not Reading from Correct Location

Opened this issue · 4 comments

I am currently trying to setup the pygslib library with my computer (Mac OSX Catalina 10.15.1) but I am receiving the following traceback:

`---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
in
----> 1 import pygslib

~/opt/anaconda3/envs/deepmine/lib/python3.6/site-packages/pygslib/init.py in
24
25 # import pygslib modules (compatible with python 3x)
---> 26 from . import drillhole, blockmodel, vtktools, nonlinear, sandbox, gslib, plothtml, charttable, progress
27
28 from . import version

~/opt/anaconda3/envs/deepmine/lib/python3.6/site-packages/pygslib/gslib/init.py in
40
41 #gslib fortran code
---> 42 from . import __gslib__kt3d
43 from . import __gslib__postik
44 from . import __read_gslib

ImportError: dlopen(/Users/daniel.curilla@ibm.com/opt/anaconda3/envs/deepmine/lib/python3.6/site-packages/pygslib/gslib/__gslib__kt3d.cpython-36m-darwin.so, 2): Library not loaded: /usr/local/gfortran/lib/libgfortran.3.dylib
Referenced from: /Users/daniel.curilla@ibm.com/opt/anaconda3/envs/deepmine/lib/python3.6/site-packages/pygslib/gslib/__gslib__kt3d.cpython-36m-darwin.so
Reason: image not found`

Not sure why __gslib__kt3d.cpython-36m-darwin.so is reading from my /usr/local directory.

In addition, when trying from pysgslib.drillhole import Drillhole I end up with the following error statement:
AttributeError: type object 'pygslib.drillhole.Drillhole' has no attribute '__reduce_cython__'

Any help on this matter would be greatly appreciated!

Following the instructions in Issue #12 I am now able to get the drillhole module to work. However, I am having some troubled importing the kt3d file when calling import pygslib. Continuing to look into this today.

@djcurill , did you have any luck with the kt3d? I'm facing the same problem here.

File "C:\ProgramData\Anaconda3\lib\site-packages\pygslib\gslib_init_.py", line 1233, in kt3d
assert parameters['bhid'] is not None, 'Error: BHID required if nbhid > 0'
KeyError: 'bhid'
Please let me know if you got a breakthrough.
Thanks

Good day guys.
Have anyone found a solution to the kt3d problem?
I still get the following error.

TypeError Traceback (most recent call last)
~/opt/anaconda3/lib/python3.6/site-packages/pygslib/gslib/init.py in kt3d(parameters)
1327 output['outlagr'],
-> 1328 output['outwmean']) =__gslib__kt3d.pykt3d(**parameters)
1329

TypeError: 'bhidint' is an invalid keyword argument for this function

During handling of the above exception, another exception occurred:

NameError Traceback (most recent call last)
in
354
355 # estimating in one block
--> 356 estimate, debug, summary = pygslib.gslib.kt3d(kt3d_Parameters)

~/opt/anaconda3/lib/python3.6/site-packages/pygslib/gslib/init.py in kt3d(parameters)
1330 except:
1331
-> 1332 raise NameError('unexpected error in FORTRAN kt3d code')
1333
1334

NameError: unexpected error in FORTRAN kt3d code
Please if anyone found a fix, I would greatly appreciate.
Thanks!

I uploaded the conda package of pygslib v 0.0.0.6 for mac, linux and windows for Python 3.8. Please try and let me know if it works. This conda package has libgfortran as a dependency.