WebFaction
Community site: login faq

I installed ntplib using:

easy_install ntplib

All looked well, but when I try to run my tiny script that uses it I receive:

ImportError: No module named ntplib

How come and how can I resolve it?

asked 08 Jul '11, 06:47

Jonathan
281813
accept rate: 0%


When you run:

easy_install <some package>

..the package will get installed for Python 2.4 by default. Other versions of Python won't see it.

You need to use the specific version of easy_install that corresponds to the version of Python interpreter you are running. For example, to install ntplib for Python 2.6 you would run:

easy_install-2.6 ntplib

Please make sure to check our docs on installing Python packages.

permanent link

answered 08 Jul '11, 07:01

tie
1.4k13
accept rate: 44%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×337
×16

question asked: 08 Jul '11, 06:47

question was seen: 6,126 times

last updated: 08 Jul '11, 07:01

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM