LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 12-06-2003, 10:21 AM   #1
dumpthecore
LQ Newbie
 
Registered: Nov 2003
Distribution: Red Hat 9
Posts: 5

Rep: Reputation: 0
python2.3 - import math module not working


Gurus,

I am using the python 2.3 version and I have set the path in my .bashrc
as,

export PYTHONPATH=/usr/lib/python2.3

I could not import the math module. In general, where to put the downloaded
module and how to set it.

thanks



Python 2.3.1 (#1, Sep 23 2003, 10:07:41)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import math
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: No module named math
 
Old 12-07-2003, 12:31 AM   #2
Vincent_Vega
Member
 
Registered: Nov 2003
Location: Jacksonville, FL
Distribution: Slackware
Posts: 812

Rep: Reputation: 30
Should be able to just import it like you tried. Are you sure your search path is correct? Can you import any of the other modules?
 
Old 12-10-2003, 10:30 PM   #3
dumpthecore
LQ Newbie
 
Registered: Nov 2003
Distribution: Red Hat 9
Posts: 5

Original Poster
Rep: Reputation: 0
Initially, I could not also include the modules numarray and numeric, but, after appending
\usr\lib\python2.3\site-packages it worked. One new line has crept in between exportpythonpath and the arguments for which it is not sourcing :-|

Thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Python2.4 sanu Linux - Newbie 1 04-01-2005 07:31 AM
Install python2.4 elopee Programming 7 02-01-2005 12:14 PM
Import sys ?bash: import: command not found joirnange Linux - Newbie 4 12-28-2004 10:33 PM
python2.2 is not available? darrylneufeld Fedora 4 06-01-2004 08:10 AM
python2.2 Dependencies webboss Linux - General 3 03-06-2002 04:20 AM


All times are GMT -5. The time now is 02:57 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration