2

I am trying to install numpy (so that I can run matplotlibs) for python 3.3 on Mac Mavericks. I have a Windows machine and was able to install everything correctly by simply downloading the .exe files. However, I am very new to the Mac world, and have never installed anything via command line before.

I have downloaded Anaconda and also XCode.

I have tried:

pip install numpy

and I get the following output:

Requirement already satisfied (use --upgrade to upgrade): numpy in ./anaconda/lib/python2.7/site-packages

It looks like it has 2.7 installed already, but I want 3.3! So, next I tried:

pip-3.3 install numpy

and I get the following output:

pip-3.3: command not found

I have tried to use anaconda after these have failed (having never used anaconda before):

conda create -n myenv python=3
conda install -n myenv numpy scipy matplotlib ipython

After everything was said and done, I got this message:

# All requested packages already installed.
# packages in environment at /Users/username/anaconda/envs/myenv:
#
ipython                   2.2.0                    py34_1  
matplotlib                1.3.1                np18py34_1  
numpy                     1.8.2                    py34_0  
scipy                     0.14.0               np18py34_0 

This didn't work either when I attempted to import matplotlib into Python 3.3. It appears to me that this has not installed numpy for 3.3, but for 3.4.

So, I installed Python 3.4. However, it looks like there are compatibility issues between matplotlib and 3.4, so back to 3.3... Additionally, I could not import numpy into 3.4 anyway.

A number of the topics on here where people posted similar problems had OS Lion. As a new Mac person, I can't seem to follow those directions because my version is the newer Mavericks. I looked here, for example: NumPy in IDLE (Python 3.3.2) on Mac OSx 10.8

When I type

which python

into the terminal, I get

/Users/username/anaconda/bin/python

I do not get

/Library/Frameworks/Python.framework/Versions/3.3    

like the user in that topic suggested I should. In fact, the /Library folder appears to be hard to find on Mavericks.. But, I figured out how to make ~/Library visible. I next

cd Library/Frameworks
ls

and saw:

EWSMac-GC.framework

There was no Python.framework. At this points, I feel like I should have that directory in order to continue. Perhaps not. I am lost at how to continue at this point, and if anyone has any suggestions, it would be appreciated.

Community
  • 1
  • 1
jboatz
  • 21
  • 1
  • 3

2 Answers2

0

I now have numpy installed correctly for Python 3.4, but not Python 3.3.

What I did from terminal:

cd ../..
pwd

output:

/

commands:

cd usr/local/bin
ls

output:

2to3            python3-32      pythonw3.3
2to3-3.3        python3-config      pythonw3.3-32
2to3-3.4        python3.3       pyvenv
brew            python3.3-32        pyvenv-3.3
easy_install-3.4    python3.3-config    pyvenv-3.4
idle3           python3.3m      tclselect
idle3.3         python3.3m-config   tclsh
idle3.4         python3.4       tclsh8.6
pip3            python3.4-32        tclvfse
pip3.4          python3.4-config    teacup
pydoc3          python3.4m      wish
pydoc3.3        python3.4m-config   wish8.6
pydoc3.4        pythonw3
python3         pythonw3-32

commands:

pip3 install numpy

There was a lot of output, many lines that looked like:

 Downloading numpy-1.8.2-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_  

And then this output:

10_9_x86_64.whl (12.0MB): 12.0MB downloaded
Installing collected packages: numpy
Successfully installed numpy
Cleaning up...

This command installed numpy for 3.4, and not 3.3, as intended. As stated above, I now have both on my system. I don't know if it would have installed for 3.3 if I had completely uninstalled 3.4 first.

I tried to install numpy for 3.3:

pip3 install numpy python3.3

output:

Requirement already satisfied (use --upgrade to upgrade): numpy in /Library/Framework/Python.framework/Versions/3.4/lib/python3.4/site-packages
Downloading/unpacking python3.3
Could not find any downloads that satisfy the requirement python3.3
Cleaning up...
No distributions at all found for python3.3

I tried importing numpy from python 3.4 and it worked. However, my primary goal was to use matplotlib. I attempted to install matplotlib from the command line.

pip3 install matplotlib

This worked, and now I can use matplotlib in python 3.4 and IDLE for 3.4.

Unfortunately, this doesn't satisfy requirements for Python 3.3... But for now, 3.4 is probably OK too.

jboatz
  • 21
  • 1
  • 3
0

install python (matplotlib numpy integrating and more ...) through Homebrew, an installer libraries