1

I am using MacOS 10.9.4 with Xcode 5.1 (command line tools installed)

Today I upgraded macports and installed py27-numpy. Everything looked ok in my terminal window.

Then I tried to install PyCogent but failed due to 'Runtime error: Numpy required but not found'.

I kept trying , using pip. And it showed:

Requirement already satisfied (use --upgrade to upgrade): numpy in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
Cleaning up...

Now I am confused. Did I install numpy or not? Do I need to source the environmental variables after macports install?

Also,i typed which pip, it shows /usr/local/bin/pip rather than /opt/local/bin

how can I move it to the right place?

Last but not least, {

SEBASTIANs-MacBook-Pro:~ FLFLFLLF$ sudo port install python_select
Password:
--->  Cleaning python_select
--->  Scanning binaries for linking errors
--->  No broken files found.   

SEBASTIANs-MacBook-Pro:~ FLFLFLLF$ port select --list python
Available versions for python:
    none (active)
    python25-apple
    python26-apple
    python27
    python27-apple

SEBASTIANs-MacBook-Pro:~ FLFLFLLF$ port select --show python 
The currently selected version for 'python' is 'none'.
SEBASTIANs-MacBook-Pro:~ FLFLFLLF$ sudo python_select python27
Password:
sudo: python_select: command not found
SEBASTIANs-MacBook-Pro:~ FLFLFLLF$ sudo port install python_select
Password:
--->  Cleaning python_select
--->  Scanning binaries for linking errors
--->  No broken files found.}

I have no problems running python scripts but the currently selected version for python is none??? And no python_select can be installed or detected?

I am totally confused by python now...

I am not a python programmer, just use it when I need to.

0

1 Answer 1

1

python_select has been replaced by port select so is expected to be missing.

To set the python to the python you want you use port select -set e.g.

sudo port select --set python python27

You probably also want to install a pip from MacPorts e.g. for python 2.7

sudo port install py27-pip

Which then says

py27-pip has the following notes:
    To make the Python 2.7 version of pip the one that is run when you execute
    the commands without a version suffix, e.g. 'pip', run:
    sudo port select --set pip pip27
    sudo port select --set pip2 pip27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .