So, try this:
which python
I have been struggling with setting Python 2.7 to be the default Python on my system.,Python 2.6 came with my OS, and I have since installed 2.7 (from source) and have been trying to make that my default version.,I have since installed 2.7 (from source) and have been trying to make that my default version.,The overall issue is that, somewhere, somehow, Python 2.6 is getting auto-aliased as my default python every time my shell starts. I've gone through my .profile and .bashrc, and there are no commands that could alias them.
which python
which python
This guide assumes you are upgrading from Mac OSX 10.6 Snow Leopard to 10.7 Lion.,No action needed. Previous python libraries installed to /Library/Python/2.x/site-packages/ have all been removed by the upgrade to Lion.,Personally I don't like databases starting up automatically on system launch so I put the following aliases in my ~/.zshrc:,Pillow does a great job of finding all the dependencies it needs in OSX. But it sucks a bit if an other packages list PIL as a dependency, because Pillow will not be recognized as a valid PIL installation and PIL will be installed again.
Uninstall XCode
sudo / Developer / Library / uninstall - devtools– mode = all
Uninstall RVM
rvm implode
Use at your own risk.
rm - rf.cabal rm - rf.gem rm - rf.npm rm - rf.ghc rm - rf.passenger rm - rf.pip rm - rf.python - eggs
Add Homebrew to your path in ~/.zshenv
or ~/.bash_profile
:
export PATH = /usr/local / bin: $PATH
Then install the basics:
brew install git ack wget tree ctags
The macOS package installer automatically installs MacPorts, sets the shell environment, and runs a selfupdate operation to update the ports tree and MacPorts base with the latest release.,If you installed MacPorts using the package installer, skip this section. To install MacPorts from the source code, follow the steps below.,After this step you are done already, MacPorts is now installed and your shell environment was set up automatically by the installer. To confirm the installation is working as expected, now try using port in a new terminal window.,The upgrade action upgrades installed ports and their dependencies to the latest version available in MacPorts. In most cases, you will run
Terminal I/O and file text.
$ Commands to be typed into a terminal window.
$
Commands to be typed into a terminal window.
Command output to a terminal window.
Command output to a terminal window.
File text.
After this step you are done already, MacPorts is now installed and your shell environment was set up automatically by the installer. To confirm the installation is working as expected, now try using port in a new terminal window.
$ port version
$
port version
Version: 2.7 .2
Download and extract the MacPorts 2.7.2 tarball. Either do so using your browser and the Finder, or use the given commands in a terminal window.
$ curl - O https: //distfiles.macports.org/MacPorts/MacPorts-2.7.2.tar.bz2
$ tar xf MacPorts - 2.7 .2.tar.bz2
Afterwards, perform the commands shown in the terminal window. If you wish to use a path other
than /opt/local
, follow the instructions for installing multiple copies of MacPorts
instead.
$ cd MacPorts - 2.7 .2 /
$. / configure
$ make
$ sudo make install
Pick a location to store a working copy of the MacPorts code. For this example,
/opt/mports
will be used, but you can put the source anywhere. This example
will create /opt/mports/macports-base
containing everything needed for
MacPorts.
$ mkdir - p / opt / mports $ cd / opt / mports $ git clone https: //github.com/macports/macports-base.git $ cd macports - base $ git checkout v2 .7 .2 # skip this if you want to use the development version
MacPorts uses autoconf and makefiles for installation. These commands will build and install
MacPorts to /opt/local
. You can add --prefix
to
./configure
to relocate MacPorts to another directory if needed.
$ cd / opt / mports / macports - base $. / configure--enable - readline $ make $ sudo make install $ make distclean