简体   繁体   中英

Python ImportError associated with Python3.5 Installation and Extensions

In attempting to install a Python package from GitHub for performing aerosol radiative calculations (not important). After cloning the repo and installing from source ( python3 setup.py install ), I tried to import the library (Python3.5.1) resulting in an import error:

ImportError: No module named 'mie._mie'

Looking at the setup.py file, I noticed that it creates this reference using the Extension syntax. What should I look for in trying to fix/debug this issue?

Why would the package install successfully but not import correctly?

NOTE : The extension essentially just wraps around some Fortran.

Try a straight:

import mie

If this doesn't work, consider these questions:

Is it possible you have multiple version of Python installed and are using a different one to try the import?

Are you using virtualenv by any chance?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM