Reputation: 12439
I get this error when I type in the terminal python ez_setup.py
Admins-MBP:PlugIns christoph$ python ez_setup.py
File "ez_setup.py", line 1
Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 01:25:11)
^
SyntaxError: invalid syntax
What happened so far?
ez_setup.py
.cd
to the folder where my ez_setup.py
file is located.python ez_setup.py
which prompts me the erromessage above.The reason why I want to install easy_install
is to install pip
in the following. It seems easier to install pip
with easy install since I cannot install pip
with python get-pip.py
neither. I want to set that up properly.
I am working with Python 3.3 on a freshly installed version of OS X 10.10.1
*edit:
Solved as in read the accepted answer. For installing it into the python3.3 folder (since I am using 3.3) change to the directory where the ez_setup.py
file is located and type into the terminal:
python3.3 ez_setup.py
(or replace the 3.3
with your python version)
Upvotes: 1
Views: 1802
Reputation: 1124090
You went wrong here:
I went to this site https://pypi.python.org/pypi/setuptools and copied the code, opened my python 3.3 IDLE, pasted it into it and saved a file named ez_setup.py.
You saved a Python shell session, not the script itself. The shell session is the output produced by code you run in the shell, and the first lines of the shell include the Python version.
Use the New File option (CMD-N) and paste the code in there, then save that.
Upvotes: 1