Having issues with setting up Atom


#1

Hello, I’m new to this forum and also just starting off with coding and I keep coming across the same problem over and over again.
As I started to learn Python, I decided to start learning by doing on my MacBook. I installed Python and also installed Atom since it was suggested to me. I followed a youtube tutorial for setting up Atom for Python and at one point I was supposed to install autopep8. However when I tried to install it using the line of code given in the Readme file (which was ‘pip install autopep8’), autopep8 could not be installed. My Terminal keeps returning this line: '-bash: pip: command not found’
This was also the case when trying to install further packages.
One more issue is that Atom seems to be using Python 2, which was pre installed on my computer. However, I would like to use Python 3 instead.

I’m very new to thisand will be really grateful for any good advice or detailed and easy to understand explanation of why this won’t work and how I can fix it.

I’ve been searching up and down the internet for the past week but couldn’t figure it out.

Thanks for your help :slight_smile:


#2

pip is the Python package manager. If the command isn’t found, it’s because there’s no Python installation in your PATH environment variable.

Atom cannot use either version of Python. It needs packages to tell it how to interface with these external programs. Packages like script will likely use the command python, which will hit whichever version of Python you have set up to be used by your system (whichever comes first in your PATH). You can also use pyenv to manage multiple versions and create virtual environments (all of which are useful things to learn about if you’re getting into the Python/Ruby/JavaScript world).

detailed and easy to understand explanation of why this won’t work and how I can fix it.

It will work. You just need to have all the pieces in place and you are not personally knowledgeable enough to know what all of the pieces are. I have that knowledge, and if I can find out exactly what you need to know, I can give it to you.


#3

So how would I make sure that the Python installation is in my PATH?


#4

Here’s a good tutorial about using PATH for Mac. It’s not really any different between Mac and Linux.


#5

not sure if you have solved your problems yet, but here is how I solved mine:

  1. the pip install autopep8 problem:

first, follow the instruction in this youtube video:

after pip is installed, in the OS terminal you type: sudo pip install autopep8

  1. the run script with Python 3 problem:

follow the instruction in this youtube video:

Hope this help