Why Is Python Mac Os X Library Frameworks

Caveat: I stopped using a Mac for my development machine wayback in the fall of 2014. You probably shouldn't listen to me.

2019-11-13  I had the native python on Mac OS, without removing which I installed python using brew and it created new symlinks and updated the hash for python too, works like a charm. If one isn't worried a lot about removing the older binaries, there isn't a necessity to remove them at all. 2020-2-2  I had used brew install python to put python 2.7.13 on El Capitan (OS X 10.11), and things were working fine for a while. Then I tried to deploy a venv, which went sideways, and I think my troubleshooting uncovered a deeper issue (or several). My goal is to have Python 2.7.x installed and functioning aside from OS X's python installation.

What Not to Do

The first rule of using Python on any operating system: don't usesystem Python. The OS relies on that Python, including the packages(and package versions) it has installed. This means if it is modified in anon-official way by you, then the OS may not have something it depends on.

For Mac OS X, system Python is installed in

(YMMV, this is on a 'current'-ish OS X 10.11.6). You couldn't edit it ifyou wanted to — not even with sudo — it's restricted.

Instead, most choose one of

  • the pyenv version manager
  • a custom Python from Homebrew
  • the conda package management system
  • 'official' Python directly from Python.org

What To Do

I strongly recommend using pyenv. Once installed and configured itallows easy switching between versions and more importantly allows youto have all versions owned by you (not root) and in one easy to find(and easy to remove) place.

For example, the system Python is 2.7.10 and was compiled with LLVM 7.0.0:

However, with pyenv installed, we can use the latest[ref]2.7.14 came outonly a few days before this post[/ref] version of 2.7[ref]I would liketo encourage you to use Python 3, and am just using 2.7 herebecause that is the system Python[/ref]:

Multiple Python executables live peacefully together:

Dec 04, 2017  First Method (The Easiest) Go to Finder and drop down the “ Go ” menu. You’ll see that the Library folder is not listed. To make the Library folder appear, press the “ Alt ” key (also known as the Option key) at the bottom left of your keyboard. Temporary access to the hidden User Library. Go to the Finder (or desktop). Hold the Option key on your keyboard, and click the Go menu at the top of the screen. With the Go menu open, you'll notice that pressing and releasing Option will display or hide the Library choice in this menu. Sep 27, 2016  Open Finder, or just click on the desktop. Then click “Go” in the menu bar, and select “Go to Folder”. You can also skip all this clicking by pressing Command+Shift+G on your keyboard to access the Go to Folder menu. Type /Library in the box and hit Enter. Follow the steps below to access the Hidden Library Menu option on your Mac. Left-click your mouse anywhere on the screen of your Mac. This will reveal the Go Option in the top menu bar of your Mac. You can also click on the Finder Icon in the Dock of your Mac to activate the Go Option. Create hidden folder mac. Jan 12, 2020  How to Make the Library Visible Permanently. Launch Terminal, located in /Applications/Utilities. Enter the following command at the Terminal prompt: Press Return. Once the command executes, you can quit Terminal. The Library folder will now be visible in the Finder. Should you ever wish to set.

When compared with the ease of pyenv install ${VERSION} without any rootprivileges, downloading a .pkg from Python.org and running as administratorseems unnecessary. However, I recently found a reason why the 'official'OS X Python binaries are worth having.

Spinning Wheels

I decided I should be a 'good citizen' and provide built Pythonwheels for a package of mine. Along the process, I came acrossMatthew Brett's wonderful Spinning Wheels.

TL;DR: it's best to build wheels that target OS X with the Pythonexecutables from Python.org. Library auf mac sichtbar machen.

The primary difference between a pyenv installed Python and an officialone can be seen in the platform tag:

First, the Python.org Python[ref]The one that starts with /Library/..[/ref]supports an older SDK (10.6) which gives forward compatibility of anybinaries produced for any SDK after 10.6.

Second, the intel architecture means the executable is a universal(or 'fat') binary. This means it can support both 32-bit and 64-bitarchitectures:

pyenv with official Python

To get the best of both worlds and use the official Python.org binariesfrom pyenv:

  • Download the .pkg installers for Python 2.7, 3.5, 3.6 andany other version you wish to support.
  • Install each of the .pkg files (this will require administratorprivileges, sorry). These will be installed into/Library/Frameworks/Python.framework/Versions/X.Y.
  • Reset your ${HOME}/.bash_profile. The Python.org installers willhave each added a line to your bash profile that puts/Library/Frameworks/Python.framework/Versions/X.Y/bin atthe beginning of your ${PATH}. This will 'jump in line' in frontof pyenv, which is not what we want.
  • (Optional) Add a python executable for the installed Python 3 versions(they don't come with python, see PEP 394).

Why Is Python Mac Os X Library Frameworks For Kids

  • Convince pyenv that these are installed versions:
  • (Optional) Un-confuse pyenv about what the actual system Python is:
  • Execute pyenv rehash so the binaries in the new versions getregistered with pyenv.

Why Is Python Mac Os X Library Frameworks 2017

Once done: