Results 1 to 2 of 2

Thread: Installing NumPy for Python 3, when Python 3 is installed in home directory

  1. #1
    Join Date
    Jan 2009
    Location
    San Francisco, CA
    Beans
    211
    Distro
    Xubuntu 14.04 Trusty Tahr

    Installing NumPy for Python 3, when Python 3 is installed in home directory

    Yeah, that's my question.

    I installed Python 3 (from source) into my home directory, and I want to install NumPy and SciPy on it.
    How do I go about it?

    I've no idea where to ask this question. If you guys know the right forum, I'll go there.

    Thanks.
    There are two sides to every story: my side and the wrong side.

  2. #2
    Join Date
    Dec 2004
    Location
    Manchester
    Beans
    2,081
    Distro
    Ubuntu Studio 13.04 Raring Ringtail

    Re: Installing NumPy for Python 3, when Python 3 is installed in home directory

    there are 2 things you need to get right. running the setup script with the correct version of python, and installing numpy into the right place.

    if you do
    Code:
    python setup.py install
    then it will probably use your built in python (/usr/bin/python). but if you do
    Code:
    /home/USRNAME/software/bin/python3 setup.py install
    (or however you call you python3 install), then it willl use that one.

    you will probably also want to set a prefix.
    Code:
    /home/USRNAME/software/bin/python3 setup.py install --prefix=/home/USRNAME/software/
    if thats the same as the prefix you used when installing python, then you should be able to import numpy from your python3 now.

    otherwsie you may need to set the PYTHONPATH environment variable.

Bookmarks

Posting Permissions

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