2

I'm trying to install modules on an alternate version of Python (3.3.0) I have installed on my Mac (OS X 10.7.4). The new version of Python runs OK in the IDLE and also in Terminal:

However, trying to install something relatively trivial like NumPy only installs in the old pre-installed version of Python on my Mac (2.7.1).

Executing this:

$ python3.3 easy_install numpy

Gives me this error message:

/Library/Frameworks/Python.framework/Versions/3.3/Resources/Python.app/Contents/MacOS/Python: can't open file 'easy_install': [Errno 2] No such file or directory

I then read that creating a virtual environment is the way to go, so I tried that:

$ mkvirtualenv python=python3.3 foo

It returned this error:

-bash: mkvirtualenv: command not found

So, I clearly don't have that installed correctly, either (virtualenv-1.8.4).

There is probably lots more homework that I need to do, but I don't really have any intention of using 2.7 ever again, just Python 3 so I don't need to go back and forth. At the same time I know that I need to keep the old version of Python on my Mac for whatever reason, so I don't intend to delete it. Any suggestions for what I'm missing would be very helpful.

Nathan
  • 4,009
  • 2
  • 20
  • 21
joseph_pindi
  • 857
  • 2
  • 10
  • 22

3 Answers3

0

Try with this:

easy_install numpy

easy_install is a shell script, not a python script.

jinghli
  • 617
  • 4
  • 11
0

You have the wrong command. Instead of:

$ python3.3 easy_install numpy

you want:

$ easy_install3 numpy

or even more specific:

$ easy_install-3.3 numpy

But you shouldn't be using easy_install in the first place:

$ pip3 install numpy

or more specific than pip3:

$ pip-3.3 install numpy

If you look deeper, you'll see that both pip3 and pip-3.3 are the same:

$ pip3 --version
pip 1.2.1 from /usr/local/lib/python3.3/site-packages/pip-1.2.1-py3.3.egg (python 3.3)
$ pip-3.3 --version
pip 1.2.1 from /usr/local/lib/python3.3/site-packages/pip-1.2.1-py3.3.egg (python 3.3)

and both easy_install3 and easy_install-3.3 are the same:

$ easy_install3 --version
distribute 0.6.32
$ easy_install-3.3 --version
distribute 0.6.32
Community
  • 1
  • 1
Nathan
  • 4,009
  • 2
  • 20
  • 21
  • $ easy_install3 numpy returns error: can't create or remove files in install directory. Same thing with easy_install-3.3... – joseph_pindi Dec 31 '12 at 15:09
  • 1
    That probably means that you need root privileges: prefix the command with `sudo`. Also, `pip`: `pip3 install numpy` or `sudo pip3 install numpy`. – Nathan Dec 31 '12 at 19:02
  • Try running `ls $(which easy_install)*`, see what you get. I'm inclined to believe that this is some kind of PATH issue, as from your last comment, `easy_install` returned something. This command should show all of the `easy_install` binaries you have. – Nathan Jan 02 '13 at 21:21
  • `zsh: command not found: easy_install3` – Dr.jacky Jan 28 '22 at 18:17
0

I solved this by using Anaconda from Enthought. It had all the plugins and such that I needed. Thanks for everyone's suggestions and help! :)

joseph_pindi
  • 857
  • 2
  • 10
  • 22