Jump to content


Photo

Ch2. Pg 42 Importerror: No Module Named Nester


  • Please log in to reply
5 replies to this topic

#1 nbh

nbh

    New Member

  • Members
  • Pip
  • 1 posts

Posted 03 August 2011 - 09:08 PM

I'm on Mac OS X 10.7. I've been following through the examples. The build and install of the distribution went well — although nester.pyc was not created in the nester folder. When I go into IDLE and type "import nester" I get these messages:

Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
import nester
ImportError: No module named nester

What am I doing wrong?

Nigel

#2 paulbarry

paulbarry

    Advanced Member

  • O'Reilly Author
  • PipPipPipPipPipPipPipPip
  • 307 posts

Posted 04 August 2011 - 01:14 AM

Please see the errata entry for page 42 here: http://oreilly.com/c...n=0636920003434 - does this explain things? --Paul.

#3 AnnuityFactor

AnnuityFactor

    New Member

  • Members
  • Pip
  • 1 posts

Posted 10 August 2011 - 10:01 AM

After thinking I had this problem too and actually discovering how to point to alternative directories for modules, I realized the reason it wasn't working for me is I accidentally skipped step 4 on page 41. Doing that fixed the issue for me, although I do have a solution to point to whatever folder you want.

Edited by AnnuityFactor, 10 August 2011 - 10:44 AM.


#4 DragonDon

DragonDon

    New Member

  • Members
  • Pip
  • 4 posts

Posted 04 April 2013 - 11:01 PM

I am running Debian Squeeze and getting this same error in IDLE. All the steps have completed just fine. The errata does not address this. Any suggestions?

#5 DragonDon

DragonDon

    New Member

  • Members
  • Pip
  • 4 posts

Posted 04 April 2013 - 11:05 PM

I am running Debian Squeeze and getting this same error in IDLE. All the steps have completed just fine. The errata does not address this. Any suggestions?


my nester.py is not in the sys.path. Does this have to be exclusived defined, although one would think that installing the distribution would make such a connection/copy nester.py into it's own libraries?

#6 DragonDon

DragonDon

    New Member

  • Members
  • Pip
  • 4 posts

Posted 07 April 2013 - 06:32 AM

I found this as a solution/workaround as it requres you to be in a specific folder when launching idle.

http://stackoverflow...correctly-linux




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users