Can I ask some basic Python installation questions?

In summary, the author decided to take a Coursera course sponsored by IBM and learned Python 3. However, he is now wanting to use his own environment and is stuck on how to wire things up. He found Anaconda to be helpful and installed it on his Windows box. He also found numpy and Jupyter notebooks which will be helpful for programming.
  • #1
RPinPA
Science Advisor
Homework Helper
587
329
I finally decided to do something I've been meaning to do for a couple years, namely learn Python. I opted for a Coursera course sponsored by IBM. They provide a "lab" that has everything you need to write and test code fragments in Python 3.

But now I'm at the point of wanting my own environment in my OS/X computer(s). My understanding is that OS/X distributes with Python 2, so if you want Python 3 you need some extra software. After skimming a couple recommended articles including at python.org, I've so far done the following:

- installed the Python 3.8.1 package from the Python website. This creates a Python 3.8 folder in your Applications folder that includes a development environment called IDLE and an application called Python Launcher which is the recommended way to run your *.py scripts.
- I also downloaded BBEdit because that seems to be highly recommended as a text editor / dev environment.

Now I'm stuck about how to wire various things up to have a nice smooth Python 3 experience so I have some rather basic questions. I have no IT person to go to since leaving my day job, so I'm hoping folks here are willing to help. Also I'll take unsolicited advice on editors and development environments, for this and other languages.

I used to be reasonably familiar with Unix (Linux) and emacs and wonder if going that route via the terminal would be useful, but I've forgotten a lot and not sure how to get back up to speed.
 
Technology news on Phys.org
  • #2
Have you looked at the Anaconda distro for python? After installation, things will be wired up correctly. Special modules can be downloaded and installed via the conda command.

You can also create different environments for specific projects.

https://www.anaconda.com/distribution/
 
Last edited:
  • Like
Likes cobalt124
  • #3
jedishrfu said:
Have you looked at the Anaconda distro for python? After installation, things will be wired up correctly. Special modules can be downloaded and installed via the conda command.

You can also create different environments for specific projects.

https://www.anaconda.com/distribution/

First time I heard of it. Looks interesting. Includes several packages I'm interested in and others that I haven't heard of that will probably be useful.

In particular I wanted to start with numpy, which didn't come with the python.org distribution. So my first questions have to do with adding packages to that distribution. You can find lots of websites telling you the command-line commands to manage packages, but the command line in terminal defaults to Python 2. I remember there's a special file that does setup for new command shells but don't recall where it is (you can see how much basic stuff has escaped me from not using it for a couple of years). Also, I believe the shell running by default in terminal is bash, which I'm not that familiar with.

I guess if I wanted to use terminal commands the easiest thing would be to create a script that puts Python 3 in the path ahead of Python 2, and call that only when I need it. Once I figure out the bash syntax to do that. Or should I skip the terminal and figure out how to do this stuff with IDLE or some other environment?

This whole process is starting to make me feel like one of those old guys who complains he needs to borrow grandchildren to program his devices. I'm not there yet but the basic-ness of my questions is embarrassing.
 
  • #4
RPinPA said:
In particular I wanted to start with numpy, which didn't come with the python.org distribution.

This is one of the use cases that anaconda was specifically designed for, so I think you'll find that it will make things much easier for you than trying to wrestle with OS X's default configuration for the terminal and other such.

RPinPA said:
You can find lots of websites telling you the command-line commands to manage packages, but the command line in terminal defaults to Python 2.

Not only that, but AFAIK OS X doesn't play nearly as nicely with things like pip install (or pip3 install if you want to force Python 3 and if it's available in the terminal--OS X doesn't always put things where a typical Unix would) as Linux or even Windows does. It's been some time since I dealt with this in any detail on OS X, but when I did I had the persistent feeling that I was trying to color outside the lines and Apple didn't like me to do that. I don't get that feeling at all when I do similar things on Linux.
 
  • Like
Likes jedishrfu
  • #5
I installed Anaconda on my windows box, it worked seamless from the beginning. numpy is installed.
 
  • Like
Likes jedishrfu
  • #6
There’s also the Jupyter notebooks that people really like and anaconda has that covered too. Basically a web page for program snippets, commentary and output rolled into one. Great for giving lectures and doing research.

https://jupyter.org/install
 
  • Like
Likes Borg
  • #7
OK, so it sounds like Anaconda has a lot of popular packages right out of the box. Does it also make it easy to add additional packages?

Also, what do people like for 2D and 3D graphics? Matlab is still my favorite for both. It never looks that great with the default settings but if you tweak enough attributes you can get some pretty darn nice looking graphics in Matlab. Is there anything comparable in Python?
 
  • #8
jedishrfu said:
There’s also the Jupyter notebooks that people really like and anaconda has that covered too. Basically a web page for program snippets, commentary and output rolled into one. Great for giving lectures and doing research.

https://jupyter.org/install
+1 on that. I work almost exclusively with Jupyter notebooks when I'm coding in python. It is an awesome tool with lots of great features.
 
Last edited:
  • #9
Yes, definitely use Anaconda, I asked the same question fairly recently and had Python up and running more or less straightaway. Pip install works fine for installing extra packages.
 

1. How do I install Python on my computer?

To install Python, you can go to the official Python website and download the installer for your operating system. Follow the instructions provided by the installer to complete the installation process.

2. Do I need to have any prior programming knowledge to install Python?

No, you do not need any prior programming knowledge to install Python on your computer. However, having some basic understanding of programming concepts can be helpful in using Python effectively.

3. Can I have multiple versions of Python installed on my computer?

Yes, you can have multiple versions of Python installed on your computer. However, it is recommended to only have one main version of Python and use virtual environments for different projects.

4. How do I check if Python is already installed on my computer?

If you are using a Mac or Linux, you can open the terminal and type "python --version" to check if Python is installed. If you are using Windows, you can open the command prompt and type "python --version" to check. If Python is installed, it will show the version number.

5. What is the best way to update Python to the latest version?

The best way to update Python to the latest version is to download and install the latest version from the official Python website. You can also use package managers such as pip or conda to update Python and its packages.

Similar threads

  • STEM Career Guidance
Replies
15
Views
2K
  • Programming and Computer Science
Replies
2
Views
2K
Replies
2
Views
880
  • STEM Career Guidance
Replies
5
Views
2K
Replies
5
Views
4K
Replies
2
Views
5K
  • Electrical Engineering
Replies
14
Views
7K
  • Computing and Technology
Replies
10
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
12K
Back
Top