![]() Note that this is optional - you can also invoke this Python installation by using python2.7 and ipython-2.7. Make this Python installation the default: These settings are likely to be the most useful for plotting astronomical data. ![]() Optionally, you can uncomment and set the image.origin and image.interpolation lines to This ensures that when you use Matplotlib interactively, a window will pop up. matplotlib/matplotlibrc and change the following line matplotlib in your home directory and copy the default matplotlibrc file to it:Ĭp /opt/local/Library/Frameworks/amework/Versions/2.7/lib/python2.7/site-packages/matplotlib/mpl-data/matplotlibrc ~/.matplotlib/Įdit. If it does not already exist, create a folder called. If you are still having issues, please let me know! If this does not work, try cleaning the latest port that MacPorts was trying to install, e.g.: Note: if for any reason the installation gets interrupted (for example if you get disconnected) and you end up with an error, try running the installation command again. If you want to install these, use sudo port install py27-atpy +sql) and sudo port install py27-aplpy +montage respectively). MacPorts will automatically take care of any dependencies! (by default SQL dependencies are not installed for py27-atpy, and the Montage dependency is not installed for py27-aplpy. Sudo port install py27-pyfits py27-pywcs py27-atpy py27-aplpy To install Astronomy packages, use for example: Note that this will probably take several hours, and is best done overnight. Sudo port install py27-matplotlib py27-numpy py27-scipy py27-ipython To install most of the basic Python packages, run: Go to the terminal and update the package index:.Note that if needed, it is possible to install MacPorts without root/admin privileges - see here for more details. Mount the disk image and run the installer. If you get gcc: command not found, then XCode is not properly installed.ĭownload the DMG image for MacPorts from here - be sure to pick the correct one for your MacOS X version. To check if XCode is installed properly, you can type gcc in the command-line. If you like to live on the bleeding edge, you can purchase XCode 4 from the Mac App Store. This page was originally designed for Astronomers, but most of the instructions are generic, and apply to anyone wanting to use Python via MacPorts.Įnsure that XCode 3 or 4 is installed (should be on the install DVDs for your Mac). Please report any issues with these instructions here. ~/.bash.d/python/python.shĬontents © 2019 Kenneth H.MacPorts Python installation on Mac - 10 easy steps For more info, see the Python # section of. #!/usr/bin/env bash function usage () " # FYI, virtualenvwrapper does not need to be selected, but the # correct one should be sourced in to the environment. Something like this, I sometimes end up with inconsistent defaults. I have a simple bash script called pyselect that I use to switch theĭefault version of Python and related tools. This hasĬaused me some real pain and lost hours in the past it's very frustrating.īut I contribute nothing to the Macports project and I like it much better Variant, which seems to be new as of Feb. The details are here, but theyĪre confusing. I've had a lot of issues with Macports python installations and tty corruptionĪfter exiting from a command line session. $ sudo port install p圓6-virtualenvwrapper # install Python 3.6.x $ sudo port install python36 +readline $ sudo port install p圓5-virtualenvwrapper # install Python 3.5.x $ sudo port install python35 +readline $ sudo port install py27-virtualenvwrapper I install 2.7.x and 3.6.x using macports (I assume macports is already installed): # install Python 2.7.x $ sudo port install python27 +readline
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |