Closed milljm closed 4 years ago
@ocefpaf, is this consistent with the libnetcdf
error you were addressing in https://github.com/conda-forge/libnetcdf-feedstock/pull/98? Do folks just need to wait for that build to get picked up with new conda create
calls?
@ocefpaf, actually I see that this environment is with the new build:
libnetcdf 4.7.4 nompi_he461dc0_101 conda-forge
That's discouraging.
That's discouraging.
Indeed. I can reproduce that here. Not sure why vtk
is breaking the run_exports
though. It works as expected if I try to install nco
or netcdf4
. I'll try bumping the build here to see what happens.
@beckermr and @isuruf I guess we'll have to do a repo patch for libnetcdf. I have never been successful to send one of those PRs though.
I added some helper functions now. https://github.com/conda-forge/conda-forge-repodata-patches-feedstock/blob/master/recipe/gen_patch_json.py#L499
I added some helper functions now. conda-forge/conda-forge-repodata-patches-feedstock:recipe/gen_patch_json.py@
master
#L499
Awesome! I'll try a PR and ping you there.
Should be solved now.
I am getting the exact same error message as the OP; following your steps and setting up a fresh conda environment, I'm able to import vtk. However, installing netcdf4
results in the error returning upon import...
The minimal environment setup is:
# run at top level directory after activating conda env
conda create -n vtk_test_env python=3.7
conda activate vtk_test_env
# base installs
conda install numpy scipy sympy matplotlib
conda install nb_conda
# vtk
conda install -c conda-forge vtk
# the following line, if uncommented,
# results in the ModuleNotFoundError: No module named 'vtkIOExodusPython'
#conda install -c anaconda netcdf4 # clashes with VTK
If I need to use both the vtk
and netcdf4
libraries, is there a workaround?
@CorbinFoucart, by mixing package versions between defaults and conda-forge, you are quite likely to get incompatible versions of the packages. It seems to me that you need to be getting all these packages from conda-forge if you are getting any of them from here:
conda config --set channel_priority strict
conda create -n vtk_test_env -c conda-forge python=3.7 numpy scipy sympy matplotlib nb_conda vtk netcdf4
conda activate vtk_test_env
python -c "import vtk"
Mixing libnetcdf
from one channel with packages that rely on it from another channel will not work.
This worked fine for me in a test on linux. Note below that all my packages are from conda-forge.
Environment (conda list
):
Details about conda
and system ( conda info
):
Perfect -- this worked well. I didn't know that it was inadvisable to mix and match conda defaults and conda-forge; thanks!
Issue: Can not import VTK (for Python 3.7, 3.8. Have not tested 3.6):
Environment (
conda list
):Details about
conda
and system (conda info
):