Help with python3 setup on MacOS

I am trying to use python 3 and pip to install scrapy.

I’ve successfully installed it using homebrew, but when I type python at the terminal it is running python 2.7 (installed with the OS).

The installation instructions say that if this occurs ensure that the path is corret and that usr/local/bin takes precedence over usr/bin

Additionally pip “should be” installed along with python3, but when I type pip at the terminal there is no response.

Is this a path problem in both cases?

This is my path, i just removed all my old .rvm files from my RUby days to clean it up a bit:
/usr/local/opt/mongodb@3.0/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin

Please follow the instructions in this Link properly. Enjoy

this doesn’t really address my question, but it’s an excellent article. Thank you.

The answer to the pip question is that installing python3 installed pip3. so the commands are python3 and pip3. The former was clear in the documentation. The latter only after reading the digital ocean article. However I am still not sure how to make python3 run when running phython as some tutorials suggest should be possible by having the proper PATH order. However it may be a moot point when it’s as easy as simply running python3 from teh terminal

2.7 is installed in all macs at the terminal type python

Please make sure you understand what the OP is asking for before blindly hitting reply, thank you.

1 Like

My question is about python 3, and proper setting of paths after installation and updating. Thanks.

Sorry maybe i did not get your question right. Do you want to create an alias for python3 after installation so you can easily differentiate it from python2 originally on mac when you want to call it?

THat was my original question, but now that I have read your article and practiced a few times, it seems like it doesn’t matter (if I use an alias) if i’m setting up a virtual environment.

Thank you for your help!

You are welcome. Glad i could help.