2

I am completely new at Python (installed version Python 3.5.1. on Mac OSX 10.5.8. for the 1st time today).

As I went through some tutorials and learned few basics on how to program, they told me to install Pip in order to import a Paperclip library, so I followed instructions for downloading Pip at https://www.youtube.com/watch?v=yBdZZGPpYxg.

I was able to download the "Get Pip script" using the curl command in my Terminal but then got stuck when trying to execute the script. When I follow the instructions and run sudo python get-pip.py command in the Terminal, I receive the following error message:

  File "get-pip.py", line 43
    _b85alphabet = (b"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
                                                          ^
SyntaxError: invalid syntax

Could someone please help me with an advice what I can do? I've visited pipinstall instruction page (see link below) but this only confuses me further.

Please help with advice or instructions. If I can't solve this, I will have to give up Python before it really began and I don't want to do that. Thank you very much in advance!

https://pip.pypa.io/en/stable/reference/pip_install/#pip-install

agold
  • 6,140
  • 9
  • 38
  • 54
Goran
  • 21
  • 1
  • 3
  • 1
    try `python easy_install pip` But otherwise I would install Python using http://brew.sh. Also (OSX 10.5.8 ? that's really old!) – mirosval Dec 10 '15 at 14:49
  • You should really upgrade your OSX version before doing anything with Python. – Daniel Roseman Dec 10 '15 at 14:51
  • Check this http://stackoverflow.com/questions/17271319/installing-pip-on-mac-os-x?rq=1 – iled Dec 10 '15 at 14:52
  • Thank you for the answers and for the editing comments - it shows I am a complete newbie. I was not able to fix the problem with pip in the python version 3.5.1.. I guess my OSX is simply too old to handle it, therefore I installed version 2.7.11 instead that already includes pip. For learning purposes it will be good enough I think. Thanks again for the help though, I hope others find it useful. – Goran Dec 11 '15 at 18:00

1 Answers1

2

This will make your life easier: Open the Terminal and enter following commands:

  1. Install HomeBrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

  1. Install Python3 and pip: brew install python3

Now, whenever you want to install new packages for python3 just type:

pip3 install name_of_the_package

Minh Nguyen
  • 310
  • 2
  • 4
  • 11