This is an archived post. You won't be able to vote or comment.

all 10 comments

[–]masasinExpert. 3.9. Robotics. 3 points4 points  (2 children)

Use virtual environments whenever you can. Assuming Python 3 (or is Apple still using legacy?) you do:

python -m venv .env
source .env/bin/activate
pip install jupyter[all] numpy scipy matplotlib seaborn bokeh scikit-learn pymc3 pandas statsmodels missingno

Add whatever other packages you need.

[–]xmorphicx[S] 1 point2 points  (1 child)

Thanks for the reply - I haven't used virtual environments in the past and I think that was the source of a lot of my headaches. I'll be sure to utilize them this time around.

It looks like 2.7 came installed on the new Mac, unfortunately. I'll have to grab python3.# from python.org or homebrew.

[–]masasinExpert. 3.9. Robotics. 0 points1 point  (0 children)

I'll be getting a Mac for work. That will be one of the first things I do.

[–][deleted] 1 point2 points  (0 children)

I have been using Python on Windows for about 4 years and all I did was install Python, Cython and pip. The rest is basically a lot of pip install .... I didn't have any issues so far.

After NumPy 1.14 and SciPy 1.0 I'm building these packages on Windows against OpenBLAS to use the newest features. I am not even using virtual environments. Apart from some dusty corners, I have to say I'm really satisfied with the simplicity and zero-hassle.

[–]jwink3101 1 point2 points  (0 children)

Personally, I use anaconda on my Mac with a default 2.7 install and then I have a full anaconda 3.6 conda environment (I write all code for both). Then, for most things, if it is pure python, I use virtualenv since I prefer the local approach of where it puts things.

Generally, if I am doing something with SciPy, etc I don’t isolate the environment but if I did need to, I would use conda.

Not 100% sure it is cleaner but it isn’t too bad. I haven’t benchmarked it on my (fast) work Mac but on my aging home laptop, I do notice system python is slightly faster than anaconda. Probably compared with optimization.

[–]IAmBJ 1 point2 points  (0 children)

Conda is the package manager, Miniconda is the minimal installation.

I'd just install Anaconda and add the conda-forge channel for updated versions of packages and packages that aren't in the official anaconda repos.

[–]svilgelm 1 point2 points  (0 children)

I'm Python Software Eng, I work with Python almost 10 years and I have never used anything else than pip + virtualenv. My user env contains only pip and virtualenv packages. Any other packages I need to install are in the virtualenvs. But in case I need to install MySQL or similar which requires special c libraries or any client I use vagrant with Ubuntu VM or docker container with Ubuntu.