Can I ask some basic Python installation questions?

  • Context: Python 
  • Thread starter Thread starter RPinPA
  • Start date Start date
  • Tags Tags
    installation Python
Click For Summary

Discussion Overview

The discussion revolves around the installation and setup of Python on OS/X, with a focus on transitioning from Python 2 to Python 3, and the use of various development environments and package management systems. Participants share their experiences and seek advice on how to create a smooth Python programming environment.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant describes their initial setup process for Python 3 on OS/X, including installing Python 3.8.1 and BBEdit, and expresses a desire for assistance in configuring their environment.
  • Another participant suggests using the Anaconda distribution for Python, noting that it simplifies the setup process and allows for easy package management with the conda command.
  • A participant mentions their interest in using numpy and questions how to add packages to the python.org distribution, expressing uncertainty about command-line usage and the default Python version in the terminal.
  • Some participants highlight that OS/X may not handle package installations as smoothly as other operating systems, particularly with pip commands.
  • One participant shares their positive experience with Anaconda on Windows, noting that numpy was installed seamlessly.
  • There is a discussion about Jupyter notebooks as a useful tool for coding in Python, with several participants expressing their support for its features.
  • A participant inquires about the ease of adding additional packages with Anaconda and seeks recommendations for 2D and 3D graphics libraries in Python, comparing them to Matlab.

Areas of Agreement / Disagreement

Participants generally agree on the advantages of using Anaconda for Python installation and package management. However, there are varying opinions on the ease of using the terminal and the default configurations of OS/X, indicating some unresolved preferences and experiences.

Contextual Notes

Some participants express uncertainty about command-line operations and the configuration of their development environments, highlighting limitations in their familiarity with Unix and bash syntax.

Who May Find This Useful

Individuals looking to set up Python on OS/X, those interested in package management and development environments, and users transitioning from Python 2 to Python 3 may find this discussion beneficial.

RPinPA
Science Advisor
Homework Helper
Messages
587
Reaction score
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
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   Reactions: cobalt124
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.
 
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   Reactions: jedishrfu
I installed Anaconda on my windows box, it worked seamless from the beginning. numpy is installed.
 
  • Like
Likes   Reactions: jedishrfu
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   Reactions: Borg
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?
 
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:
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.
 

Similar threads

Replies
2
Views
3K
  • · Replies 15 ·
Replies
15
Views
4K
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
2
Views
6K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 14 ·
Replies
14
Views
7K
  • · Replies 3 ·
Replies
3
Views
13K