1

I'm trying to run a program called Sansview with the module sansview.py.

I currently get this error:

Import error

The directory where the gui_manager.py is located is: "C:\sansviewproject\trunk\build\lib.win32-2.6\sans\guiframe"

The directory where the sansview.py is located is: "C:\sansviewproject\trunk\build\lib.win32-2.6\sans\sansview"

I believed the problem had something to do with having the wrong environmental variables set. However I currently have PYTHONPATH set to: "C:\Python26;C:\sansviewproject\trunk\build" which should pick up the gui_manager.py module.

I am running python 2.6 on Win7. If anyone could point me in the right direction of where my error could be I would appreciate it.

3
  • 1
    I think that your path should include C:\sansviewproject\trunk\build\lib.win32-2.6, as you'd want the sans module to be available in the first place. Commented Mar 8, 2012 at 15:41
  • 1
    Try setting your PYTHONPATH to C:\sansviewproject\trunk\build\lib.win32-2.6 instead. Commented Mar 8, 2012 at 15:42
  • Don't forget to accept an answer by clicking on the green checkmark by it. Commented Mar 8, 2012 at 15:54

1 Answer 1

2

You should have a directory on your PYTHONPATH which contains the "sans" package for "from sans.guiframe import gui_manager" to work. So I guess it would be:

C:\Python26;C:\sansviewproject\trunk\build\lib.win32-2.6

rather than just:

C:\Python26;C:\sansviewproject\trunk\build

which needs to be there.

Hope this helps.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.