For Python development under Eclipse you can use the PyDev Plugin which is an open source project. Install PyDev via the Eclipse update manager Note that on MAC OS X the python libraries are not installed by default. Please use Google to find out, how to install them on a Mac OS X. Eclipse eclipse for mac. 14:53 1 - Setting Up Eclipse For Both Java And Python (using Pydev) On A Mac. 3:26 4 Secrets To Keeping Your Shirt Tucked In All Day| How To Tuck Your Shirts So They Stay. Here is a quick tour on how to setup an effective dev environment for Python 3 on your beloved OSX. Installing Homebrew There are many package installers on OSX but I find very pleasant, simple and convenient. Homebrew, originally started by, simplify the installation of open source tools (like,, etc.) that are not by default on OSX. What I really like with Homebrew is that everything is installed on a directory that is not conflicting with the system directories. By default, it’s on /usr/local but you can change to whatever you like. Installing Homebrew is very simple; open a Terminal window and type ruby -e '$(curl -fsSkL raw.github.com/mxcl/homebrew/go)' Once installed, just type brew in a terminal to check that Homebrew is installed. There are few commands to remember: • Updating brew and formula (ie tools/components you have installed) brew update • Searching formula brew search ack • Installing / Uninstalling brew install FORMULA brew uninstall FORMULA For example, brew install imagemagick will install on your OS, brew uninstall ack will uninstall ack. • Listing installed formula brew list • And finally, troubleshooting brew doctor Type brew doctor and if the output is Your system is raring to brew, everything is ok. You can have more information on the. Installing Python 3 To install Python 3 with Homebrew, simply type brew install python3 Once Python 3 is installed, we’re going to check that is it ready to use or our system by launching the interactive console python3 And you should see $ python3 Python 3.3.0 (default, Feb 1 2013, 22:09:55) [GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on darwin Type 'help', 'copyright', 'credits' or 'license' for more information. ![]() >>> Type Ctrl+D to exit the interpreter. It’s interesting to note that python launch the default 2.7 python interpreter and python3 is launching the 3.3 python interpreter. Now that we have Python 3 installed on our system, we are going to install a package. Python 3 comes with pip. You should pay attention to which pip you are using: • pip is for Python 2.7 • pip3 is for Python 3 The two package managers don’t share their site-package directory. If you want a python package x for both pythons, you need to install it twice. Once via pip for Python 2.7 and once via pip3 for python 3.3. If we want to install for instance, type pip3 install sqlalchemy Then launch the python3 interactive console and test that SQLAlchemy is installed now $ python3 Python 3.3.0 (default, Feb 1 2013, 22:09:55) [GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on darwin Type 'help', 'copyright', 'credits' or 'license' for more information. >>> import sqlalchemy >>> No error, everything is OK! Recipe for the best mac and cheese ever recipe. Note that, with Homebrew, Python 3 packages are installed under /usr/local/lib/python3.3/site-packages. Installing Eclipse Now that we have Python 3 installed, we can use to write some code. It can be also useful, but not mandatory, to use a complete IDE with Python autocompletion, debugging facilities and so on. To do so, we’re going to install Eclipse. Convert edi file to excel. To install Eclipse, go to, choose Mac OSX (Cocoa) and download. Untar the downloaded file and copy the eclipse directory under Applications. Installing PyDev for Eclipse is a Python IDE for Eclipse. ![]() To install it, launch Eclipse, go to ’Help > Install New Software’ (you can also follow these steps on ) Click on ’Add’ then PyDev in ’Name’ and in ’Location’ Tap on ’OK’, then select PyDev in the combo box ’Work with:’ ’Next’, select ’PyDev for Eclipse’, accept the Terms & Conditions, then ’Finish’. Then accept the certificates and wait for Eclipse to restart. After installing, we are going to configure PyDev to use our Python 3 interpreter. • Go to ’Eclipse > Preferences > PyDev > Interpreter - Python’ • Select ’New’, in ’Interpreter Name’ set python3 and in ’Interpreter Executable’ set ’/usr/local/bin/python3’ (which is a symlink to /usr/local/Cellar/python3/3.3.0/Frameworks/Python.framework/Versions/3.3/bin/python3.3) then ’OK’ 3. Just type OK on this window Now, PyDev is configured and ready to use in Eclipse. To test it, go to ’File > New > Project’ and select ’PyDev Project’, name your new project ’Test’, Project Type to ’Python’, Grammar Version to ’3.0’, interpreter to ’python3’, select ’Create ’src’ folder and add it to the PYTHONPATH’ and ’Finish’ Once the project is created, you can see on the left the PyDev Package Explorer with the Test project. Select the src folder, ’File > New > File’ and call it test.py.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |