Results 1 to 9 of 9

Thread: Problem Using Numpy with Eclipse + pydev

  1. Problem Using Numpy with Eclipse + pydev

    I've having a problem using numpy with eclipse + pydev under Ubuntu.

    I installed numpy via synaptic and then add the following line to my code.
    from numpy import *
    When I run that I get the following error message.
    ImportError: No module named numpy

    Could anyone offer insight into this problem?

  2. #2
    Join Date
    May 2008
    Location
    TN
    Posts
    853
    Images
    99
    Rep Power
    77

    Re: Problem Using Numpy with Eclipse + pydev

    It sounds like it didn't install correctly or you have a bizarre python installation. Open the software center and make sure python-numpy shows as installed.
    "If A is a success in life, then A equals x plus y plus z. Work is x; y is play; and z is keeping your mouth shut."
    -
    Einstein

    Don't be a HelpVampire

  3. Re: Problem Using Numpy with Eclipse + pydev

    python was already installed with this distro of Ubuntu. Numpy appears to be installed properly. Could it be an Eclipse problem?

  4. #4
    Join Date
    May 2008
    Location
    TN
    Posts
    853
    Images
    99
    Rep Power
    77

    Re: Problem Using Numpy with Eclipse + pydev

    Possibly. Try it from the command line. Open a terminal and run the python interpreter from there:
    python
    >>> import numpy
    if it doesn't throw an error then you are good and it's an eclipse problem.
    "If A is a success in life, then A equals x plus y plus z. Work is x; y is play; and z is keeping your mouth shut."
    -
    Einstein

    Don't be a HelpVampire

  5. Re: Problem Using Numpy with Eclipse + pydev

    damn, that was so obvious i can't believe i missed that. i guess its an eclipse problem.

    I pulled up preferences-interpreter-pydev-forced builtins and it shows numpy listed. hmm...

  6. #6
    Join Date
    May 2008
    Location
    TN
    Posts
    853
    Images
    99
    Rep Power
    77

    Re: Problem Using Numpy with Eclipse + pydev

    You're on your own from here on. I'm not an eclipse user. Good luck though!
    "If A is a success in life, then A equals x plus y plus z. Work is x; y is play; and z is keeping your mouth shut."
    -
    Einstein

    Don't be a HelpVampire

  7. #7
    Join Date
    Sep 2008
    Location
    Southampton, UK
    Posts
    37
    Rep Power
    45

    Re: Problem Using Numpy with Eclipse + pydev

    Hi iamscottym

    So good new defiantly possible
    I have just tried it on my setup and I can get numpy to work. Using the following
    from numpy import *
    a = arange(10)
    print a

    Bad news is Im not 100% sure why mine is working and yours isnt, here's a couple of ideas.
    * I created a new numpy project (could it be an issue with an old project maybe?
    * I cant remember if I installed pydev before or after numpy....I think after but not sure. This might effect it.
    * The only other thing I could suggest is to get eclipse to re-scan your python modules.
    (preferences/pydev/Interpreter-python) then 'Autoconfig button

  8. Re: Problem Using Numpy with Eclipse + pydev

    Could you check whether numpy is listed in the System-Pythonpath? Go to Preferences/-Pydev/Interpreter-Python/ and Select Libraries. I don't see numpy listed and I feel like I should. Where would numpy be located after installing it with synaptic?

  9. #9
    Join Date
    Sep 2008
    Location
    Southampton, UK
    Posts
    37
    Rep Power
    45

    Re: Problem Using Numpy with Eclipse + pydev

    Doing a "locate numpy" shows that numpy is under dist-packages at
    /usr/lib/python2.6/dist-packages/

    In eclipse numpy is not in the System-Pythonpath explicitly, I think its under one of these entrys,
    lib/python2.6/dist-packages or /usr/local/lib/python2.6/dist-packages.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. CMUcam3 problem..
    By e0ne199 in forum Sensors
    Replies: 2
    Last Post: 12-02-2010, 10:39 PM
  2. Question(s) Wirelessly programing arduino problem
    By gallamine in forum Robotics General Discussion
    Replies: 0
    Last Post: 10-25-2010, 02:41 PM
  3. Question(s) Writing an educatonal book on robotics
    By darkback2 in forum Robotics General Discussion
    Replies: 107
    Last Post: 05-24-2010, 11:51 PM
  4. Problem with speed control - smaller wheels or better PID
    By ronald in forum Robotics General Discussion
    Replies: 2
    Last Post: 12-02-2009, 06:46 AM
  5. Problem installing XP on Roboard
    By WGhost9 in forum Robot Computers
    Replies: 24
    Last Post: 06-25-2009, 10:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •