dougthor42 / wafer_map

Semiconductor Wafer Mapping
GNU General Public License v3.0
74 stars 33 forks source link

Example.py can't be performed #75

Open Marshors opened 5 years ago

Marshors commented 5 years ago

Hi, I am new guy of python. Sorry about the stupid question When I performed example.py. It shows " from . import wm_core. ImportError: attempted relative import with no known parent package" I couldn't find a way to sovle it.

OS: win7 Version: Python 3.5 in virtualenv & all the package in the requirements are installed

dougthor42 commented 5 years ago

Hey, sorry for the delay - holidays can be quite busy and whatnot.

Are you installing from source (git clone)? Or are you installing from pip (pip install wafer_map)?

I can think of 2 issues:

  1. If installing from source, you probably also need to install the package itself:

    (venv) C:\temp\wafer_map>python -m pip install -r requirements.txt
    (venv) C:\temp\wafer_map>python -m pip install -e .
  2. The example is called by running the wafer_map module, not by calling example.py:

    (venv) C:\temp\wafer_map>python -m wafer_map

Give those two things a shot.

dougthor42 commented 5 years ago

Also I realize now that the README file does not reflect what I've mentioned above... I've made a note to fix that.