Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

numpy C_API incompatibilty after adding flopy to phreeqcrm conda env #125

Open
scharlton2 opened this issue Jul 27, 2023 · 0 comments
Open

Comments

@scharlton2
Copy link
Contributor

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf . Check the section C-API incompatibility at the Troubleshooting ImportError section at https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility for indications on how to solve this problem .

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[1], line 1
----> 1 import phreeqcrm
      2 import numpy as np
      3 import matplotlib.pyplot as plt

File ~\Anaconda3\envs\phreeqcrm\lib\site-packages\phreeqcrm\__init__.py:2
      1 from .yamlphreeqcrm import YAMLPhreeqcRM
----> 2 from .phreeqcrm import (
      3     BMIPhreeqcRM,
      4     PhreeqcRM,
      5     IRM_BADINSTANCE,
      6     IRM_BADVARTYPE,
      7     IRM_FAIL,
      8     IRM_INVALIDARG,
      9     IRM_INVALIDCOL,
     10     IRM_INVALIDROW,
     11     IRM_OK,
     12     IRM_OUTOFMEMORY,
     13     BoolVector,
     14     DoubleVector,
     15     IntVector,
     16     StringVector
     17 )

File ~\Anaconda3\envs\phreeqcrm\lib\site-packages\phreeqcrm\phreeqcrm.py:10
      8 # Import the low-level C/C++ module
      9 if __package__ or "." in __name__:
---> 10     from . import _phreeqcrm
     11 else:
     12     import _phreeqcrm

ImportError: numpy.core.multiarray failed to import

Before adding flopy:

❯ conda list
# packages in environment at C:\Users\charlton\Anaconda3\envs\phreeqcrm:
#
# Name                    Version                   Build  Channel
anyio                     3.5.0            py38haa95532_0
argon2-cffi               21.3.0             pyhd3eb1b0_0
argon2-cffi-bindings      21.2.0           py38h2bbff1b_0
asttokens                 2.0.5              pyhd3eb1b0_0
attrs                     22.1.0           py38haa95532_0
backcall                  0.2.0              pyhd3eb1b0_0
beautifulsoup4            4.12.2           py38haa95532_0
black                     23.7.0                   pypi_0    pypi
bleach                    4.1.0              pyhd3eb1b0_0
bmipy                     2.0                      pypi_0    pypi
ca-certificates           2023.05.30           haa95532_0
cffi                      1.15.1           py38h2bbff1b_3
click                     8.1.6                    pypi_0    pypi
colorama                  0.4.6            py38haa95532_0
comm                      0.1.2            py38haa95532_0
contourpy                 1.1.0                    pypi_0    pypi
cycler                    0.11.0                   pypi_0    pypi
debugpy                   1.5.1            py38hd77b12b_0
decorator                 5.1.1              pyhd3eb1b0_0
defusedxml                0.7.1              pyhd3eb1b0_0
entrypoints               0.4              py38haa95532_0
executing                 0.8.3              pyhd3eb1b0_0
fonttools                 4.41.1                   pypi_0    pypi
idna                      3.4              py38haa95532_0
importlib-metadata        6.0.0            py38haa95532_0
importlib_metadata        6.0.0                hd3eb1b0_0
importlib_resources       5.2.0              pyhd3eb1b0_1
ipykernel                 6.19.2           py38hd4e2768_0
ipython                   8.12.0           py38haa95532_0
ipython_genutils          0.2.0              pyhd3eb1b0_1
jedi                      0.18.1           py38haa95532_1
jinja2                    3.1.2            py38haa95532_0
jsonschema                4.17.3           py38haa95532_0
jupyter_client            8.1.0            py38haa95532_0
jupyter_core              5.3.0            py38haa95532_0
jupyter_events            0.6.3            py38haa95532_0
jupyter_server            2.5.0            py38haa95532_0
jupyter_server_terminals  0.4.4            py38haa95532_1
jupyterlab_pygments       0.1.2                      py_0
kiwisolver                1.4.4                    pypi_0    pypi
libffi                    3.4.4                hd77b12b_0
libiconv                  1.16                 h2bbff1b_2
libsodium                 1.0.18               h62dcd97_0
libxml2                   2.10.3               h0ad7f3c_0
libxslt                   1.1.37               h2bbff1b_0
lxml                      4.9.2            py38h2bbff1b_0
markupsafe                2.1.1            py38h2bbff1b_0
matplotlib                3.7.2                    pypi_0    pypi
matplotlib-inline         0.1.6            py38haa95532_0
mistune                   0.8.4           py38he774522_1000
modflowapi                0.1.0                    pypi_0    pypi
mypy-extensions           1.0.0                    pypi_0    pypi
nbclassic                 0.5.5            py38haa95532_0
nbclient                  0.5.13           py38haa95532_0
nbconvert                 6.5.4            py38haa95532_0
nbformat                  5.7.0            py38haa95532_0
nest-asyncio              1.5.6            py38haa95532_0
notebook                  6.5.4            py38haa95532_0
notebook-shim             0.2.2            py38haa95532_0
numpy                     1.24.4                   pypi_0    pypi
openssl                   3.0.9                h2bbff1b_0
packaging                 23.0             py38haa95532_0
pandas                    2.0.3                    pypi_0    pypi
pandocfilters             1.5.0              pyhd3eb1b0_0
parso                     0.8.3              pyhd3eb1b0_0
pathspec                  0.11.1                   pypi_0    pypi
phreeqcrm                 0.0.2                    pypi_0    pypi
pickleshare               0.7.5           pyhd3eb1b0_1003
pillow                    10.0.0                   pypi_0    pypi
pip                       23.1.2           py38haa95532_0
pkgutil-resolve-name      1.3.10           py38haa95532_0
platformdirs              2.5.2            py38haa95532_0
powershell_shortcut       0.0.1                         3
prometheus_client         0.14.1           py38haa95532_0
prompt-toolkit            3.0.36           py38haa95532_0
psutil                    5.9.0            py38h2bbff1b_0
pure_eval                 0.2.2              pyhd3eb1b0_0
pycparser                 2.21               pyhd3eb1b0_0
pygments                  2.15.1           py38haa95532_1
pyparsing                 3.0.9                    pypi_0    pypi
pyrsistent                0.18.0           py38h196d8e1_0
python                    3.8.17               h1aa4202_0
python-dateutil           2.8.2              pyhd3eb1b0_0
python-fastjsonschema     2.16.2           py38haa95532_0
python-json-logger        2.0.7            py38haa95532_0
pytz                      2023.3                   pypi_0    pypi
pywin32                   305              py38h2bbff1b_0
pywinpty                  2.0.10           py38h5da7b33_0
pyyaml                    6.0              py38h2bbff1b_1
pyzmq                     25.1.0           py38hd77b12b_0
rfc3339-validator         0.1.4            py38haa95532_0
rfc3986-validator         0.1.1            py38haa95532_0
seaborn                   0.12.2                   pypi_0    pypi
send2trash                1.8.0              pyhd3eb1b0_1
setuptools                67.8.0           py38haa95532_0
six                       1.16.0             pyhd3eb1b0_1
sniffio                   1.2.0            py38haa95532_1
soupsieve                 2.4              py38haa95532_0
sqlite                    3.41.2               h2bbff1b_0
stack_data                0.2.0              pyhd3eb1b0_0
terminado                 0.17.1           py38haa95532_0
tinycss2                  1.2.1            py38haa95532_0
tomli                     2.0.1                    pypi_0    pypi
tornado                   6.2              py38h2bbff1b_0
traitlets                 5.7.1            py38haa95532_0
typing-extensions         4.6.3            py38haa95532_0
typing_extensions         4.6.3            py38haa95532_0
tzdata                    2023.3                   pypi_0    pypi
vc                        14.2                 h21ff451_1
vs2015_runtime            14.27.29016          h5e58377_2
wcwidth                   0.2.5              pyhd3eb1b0_0
webencodings              0.5.1                    py38_1
websocket-client          0.58.0           py38haa95532_4
wheel                     0.38.4           py38haa95532_0
winpty                    0.4.3                         4
xmipy                     1.3.1                    pypi_0    pypi
yaml                      0.2.5                he774522_0
zeromq                    4.3.4                hd77b12b_0
zipp                      3.11.0           py38haa95532_0
zlib                      1.2.13               h8cc25b3_0
❯ conda install -c conda-forge flopy
Collecting package metadata (current_repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 22.9.0
  latest version: 23.7.0

Please update conda by running

    $ conda update -n base -c defaults conda



## Package Plan ##

  environment location: C:\Users\charlton\Anaconda3\envs\phreeqcrm

  added / updated specs:
    - flopy


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    ca-certificates-2023.7.22  |       h56e8100_0         146 KB  conda-forge
    flopy-3.4.1                |     pyhd8ed1ab_0         747 KB  conda-forge
    intel-openmp-2023.2.0      |   h57928b3_49496         2.4 MB  conda-forge
    pyparsing-3.1.0            |     pyhd8ed1ab_0          87 KB  conda-forge
    ------------------------------------------------------------
                                           Total:         3.4 MB

The following NEW packages will be INSTALLED:

  cycler             conda-forge/noarch::cycler-0.11.0-pyhd8ed1ab_0 None
  flopy              conda-forge/noarch::flopy-3.4.1-pyhd8ed1ab_0 None
  freetype           conda-forge/win-64::freetype-2.10.4-h546665d_1 None
  intel-openmp       conda-forge/win-64::intel-openmp-2023.2.0-h57928b3_49496 None
  kiwisolver         conda-forge/win-64::kiwisolver-1.4.4-py38hbd9d945_0 None
  libblas            conda-forge/win-64::libblas-3.9.0-8_mkl None
  libcblas           conda-forge/win-64::libcblas-3.9.0-8_mkl None
  liblapack          conda-forge/win-64::liblapack-3.9.0-8_mkl None
  libpng             pkgs/main/win-64::libpng-1.6.39-h8cc25b3_0 None
  matplotlib-base    conda-forge/win-64::matplotlib-base-3.2.2-py38hbe5506b_1 None
  mkl                conda-forge/win-64::mkl-2020.4-hb70f87d_311 None
  numpy              conda-forge/win-64::numpy-1.22.3-py38h1d2777f_2 None
  pyparsing          conda-forge/noarch::pyparsing-3.1.0-pyhd8ed1ab_0 None
  python_abi         conda-forge/win-64::python_abi-3.8-2_cp38 None

The following packages will be UPDATED:

  ca-certificates    pkgs/main::ca-certificates-2023.05.30~ --> conda-forge::ca-certificates-2023.7.22-h56e8100_0 None


Proceed ([y]/n)? y


Downloading and Extracting Packages
ca-certificates-2023 | 146 KB    | ############################################################################################################################################################################################################################################# | 100%
pyparsing-3.1.0      | 87 KB     | ############################################################################################################################################################################################################################################# | 100%
intel-openmp-2023.2. | 2.4 MB    | ############################################################################################################################################################################################################################################# | 100%
flopy-3.4.1          | 747 KB    | ############################################################################################################################################################################################################################################# | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Retrieving notices: ...working... done
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant