fhs / pyhdf

Python wrapper around the NCSA HDF version 4 library
https://pypi.org/project/pyhdf/
Other
46 stars 15 forks source link

python3 supporting problems: No module named 'pyhdf' #34

Closed eldertiger closed 5 years ago

eldertiger commented 5 years ago

pyhdf After I use conda to install pyhdf, I saw that the build of pyhdf is Python27, and if I use python3 to run a .py file in which I import pyhdf, the error:

No module named 'pyhdf'

goes out. I'm confused, do I need a python27 environment to run it or is there anyway I can change the build of pyhdf to python3. And then pyhdf can run in python3. I'm new in python actually, hope this is not a stupid question.

fhs commented 5 years ago

You don't need python27. Python3 is fully supported. I think you may have both python27 and python3 installed in your system, and you're installing pyhdf using python27 and then trying to use pyhdf in python3. @ocefpaf does the conda packaging for pyhdf. He may have a better idea of what you're doing wrong.

ocefpaf commented 5 years ago

Indeed there are version for Python 2.7, 3.6, and 3.7 for 0.10.0.

> conda search --platform win-64 --channel conda-forge pyhdf 
pyhdf                         0.10.0  py27h8afc3b7_0  conda-forge         
pyhdf                         0.10.0  py36h1684c0f_0  conda-forge         
pyhdf                         0.10.0  py37h1684c0f_0  conda-forge         

One can create an environment with:

conda create --name TEST python=3.7 pyhdf

Please, like @fhs mention above, open an issue in https://github.com/conda-forge/pyhdf-feedstock if you have further questions.

eldertiger commented 5 years ago

thanks for your reply~