[pydev - Users] PyDev can't find 'math' on Ubuntu 9.10 ??

View: New views
9 Messages — Rating Filter:   Alert me  

[pydev - Users] PyDev can't find 'math' on Ubuntu 9.10 ??

by SourceForge.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=7476779
By: jwishnie

I've installed PyDev and configured two interpreters Python2.5 and Python2.6

i've confirmed that the Pythonpath and Forced Builtins look correct (PYTHONPATH
contains _everything_ that is in 'sys.path' when running python from the standard
command line)

BUT whenever I try to run or debug a Python script I get an error on 'math'

e.g.
import math
math.ceil(3.1)

gets:
module has no member 'ceil'

Is this because 'math' is a C-library from lib-dynload? It's certainly a core
Python library...

I added it to 'forced builtins' with no success.

Any idea how I make this work?



______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=293649

------------------------------------------------------------------------------
_______________________________________________
Pydev-users mailing list
Pydev-users@...
https://lists.sourceforge.net/lists/listinfo/pydev-users

[pydev - Users] RE: PyDev can't find 'math' on Ubuntu 9.10 ??

by SourceForge.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=7476780
By: jwishnie

Ugh, apologies--I did not mean this to be a comment on this thread and I can;t
see how to delete it...

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=293649

------------------------------------------------------------------------------
_______________________________________________
Pydev-users mailing list
Pydev-users@...
https://lists.sourceforge.net/lists/listinfo/pydev-users

[pydev - Users] RE: PyDev can't find 'math' on Ubuntu 9.10 ??

by SourceForge.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=7476785
By: jwishnie

ok, double apology, it DID go where I wanted. This SF forum UI has me confused...

So, any idea on how to solve the 'math' problem?

Thanks!

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=293649

------------------------------------------------------------------------------
_______________________________________________
Pydev-users mailing list
Pydev-users@...
https://lists.sourceforge.net/lists/listinfo/pydev-users

[pydev - Users] RE: PyDev can't find 'math' on Ubuntu 9.10 ??

by SourceForge.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=7476853
By: fabioz

Well, as far as I know, math is a module built into python (meaning it's compiled
directly into the python executable). It seems very strange that you don't have
it  -- does it work on the command-line?

Cheers,

Fabio

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=293649

------------------------------------------------------------------------------
_______________________________________________
Pydev-users mailing list
Pydev-users@...
https://lists.sourceforge.net/lists/listinfo/pydev-users

[pydev - Users] RE: PyDev can't find 'math' on Ubuntu 9.10 ??

by SourceForge.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=7477109
By: jwishnie

yes, everything works fine on the command line.

'math' is a C-shared-library that in Ubuntu is under lib-dynload/math.so

Here's the stack trace--if I'm reading it properly, 'math' fails to import because
it can't import 'log', both of which are standard and in the path... Again,
from the command line, no problem executing this script and there are no ENV
variables set.

    sender_len=int(math.ceil(sender_dec_len/2.0))
AttributeError: 'module' object has no attribute 'ceil'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/apport_python_hook.py", line 38, in
apport_excepthook
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python2.5/site-packages/apport/__init__.py", line 1, in
<module>
    from apport.report import Report
  File "/usr/lib/python2.5/site-packages/apport/report.py", line 14, in
<module>
    import subprocess, tempfile, os.path, urllib, re, pwd, grp, os, sys
  File "/usr/lib/python2.5/tempfile.py", line 33, in <module>
    from random import Random as _Random
  File "/usr/lib/python2.5/random.py", line 43, in <module>
    from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil
as _ceil
ImportError: cannot import name log


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=293649

------------------------------------------------------------------------------
_______________________________________________
Pydev-users mailing list
Pydev-users@...
https://lists.sourceforge.net/lists/listinfo/pydev-users

[pydev - Users] RE: PyDev can't find 'math' on Ubuntu 9.10 ??

by SourceForge.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=7477126
By: fabioz

Another doubt: have you tried starting Eclipse from that same shell?

Cheers,

Fabio

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=293649

------------------------------------------------------------------------------
_______________________________________________
Pydev-users mailing list
Pydev-users@...
https://lists.sourceforge.net/lists/listinfo/pydev-users

[pydev - Users] RE: PyDev can't find 'math' on Ubuntu 9.10 ??

by SourceForge.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=7477138
By: jwishnie

Hi Fabio,

Thanks for your help--yes, I have tried launching Eclipse from the same shell
and it has the same problem...

I do not use any environment variables and have confirmed that the PYTHONPATH
in Eclipse is the same as 'sys.path' from within the python command-line...

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=293649

------------------------------------------------------------------------------
_______________________________________________
Pydev-users mailing list
Pydev-users@...
https://lists.sourceforge.net/lists/listinfo/pydev-users

[pydev - Users] RE: PyDev can't find 'math' on Ubuntu 9.10 ??

by SourceForge.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=7477144
By: jwishnie

BTW--I am using Eclipse 3.5 (Galileo)--should I downgrade to 3.4?

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=293649

------------------------------------------------------------------------------
_______________________________________________
Pydev-users mailing list
Pydev-users@...
https://lists.sourceforge.net/lists/listinfo/pydev-users

[pydev - Users] RE: PyDev can't find 'math' on Ubuntu 9.10 ??

by SourceForge.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=7477274
By: jwishnie

BTW--I am using Eclipse 3.5 (Galileo)--should I downgrade to 3.4?

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=293649

------------------------------------------------------------------------------
_______________________________________________
Pydev-users mailing list
Pydev-users@...
https://lists.sourceforge.net/lists/listinfo/pydev-users