Multiple installs of Python on MacOSX for Eclipse

eclipse for python
pydev eclipse
eclipse download
download eclipse for python
install eclipse on mac
eclipse for python 3
eclipse ide
python download

I want to have multiple installs of Python: 2.1, 2.4, 2.7, 3.x My IDE is Eclipse (Helios)/Pydev on MacOSX, which works great. I have a couple of Python codebases that are/will be running on different versions of Python. Also, I like Eclipse PyDev's crosslinking from source-code to documentation.

The standard recommendation seems to be: use virtualenv, and keep the installs totally separate from the builtin MacPython (2.6.1). Eclipse should never be pointing to the MacPython install. (Should PYTHONPATH even be set in such an environment?)

Before I get on with virtualenv, is there anything else I should know about this? virtualenv doesn't impose any overhead, and I shouldn't be worried with occasional comments about breakage to nose, coverage etc?

I'm interested in hearing from Eclipse or Pydev users on MacOS. Also if anyone has other tips on migrating a Python codebase from 2.1 -> 2.7.

A good way is to use macport to install the different version of pythons. It will have different versions of all packages for all versions of pythons that you want. They will be installed in /opt/local/. So in Eclipse with PyDev for a particular project you can right click into the name of the project -> properties: There, in the left you choose PyDev - Interpreter/Grammar. And you click the link Click here to configure an interpreter not lister. You click on new on the top right of the new window. You give the name of the version of python you want to create the interpreter for, if you have already installed it with all required package through macport. And in the field Intepreter Executable you give the path: /opt/local/bin/pythonX.X . After, in the previous option window: PyDev - Intepreter/Grammar, you can choose in the Interpreter menu the python version that you just installed.

For the shell, and the default path pointing to /usr/bin/python you must use: python_select (installed through macport) instead of playing with the env variables. Afterward you can use macport to update/install new packages, make sure everything is alway clean.

Eclipse Download and Installation (for Python) Instructions, In this handout we will download Eclipse Standard 4.4 for Mac OS. The version you should download is Eclipse IDE for Eclipse Committers. It is critical that Java, � Python 2.x is the legacy version, and Python 3.x is the present and future of Python, but some of the less disruptive improvements in 3.0 and 3.1 have been backported to 2.6 and 2.7, respectively. Regarding the materials available to learn about Data Science and Machine Learning you need the ability to switch between those Python versions, and

Having Home Brew already installed in your system, I recommend you pyenv. Most of the following information comes from this quick installation/use guide:

Installing pyenv + pyenv-virtualenv

  1. Go to your terminal and install pyenv and the external libraries needed by Python:

    brew update
    brew install pyenv openssl readline sqlite3 xz zlib
    
  2. Add pyenv init to your shell to enable shims and autocompletion running the following command:

    echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.bash_profile
    
  3. Install the pyenv-virtualenv plugin so you can create virtual environments for each version of Python:

    git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
    echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bash_profile
    
  4. Reset your terminal to apply the changes exec "$SHELL" or just close your terminal and open a new one.

Gettings different Python versions

We can list all available versions with pyenv install --list:

pyenv install --list
Available versions:
  2.7.15
  3.0.1
  ..
  3.7.2

For installing the Python version 3.7.2:

pyenv install 3.7.2

With pyenv versions you can see all the Python versions installed in your computer:

root@Host ~$ pyenv versions
* 3.7.2

Creating a virtual environment

In the previous step we have downloaded the Python 3.7.2 interpreter, we can now use it to create an isolated virtual environment. This is very useful for software development, keeping each project completely isolated from the others:

pyenv virtualenv 3.7.2 MY_VIRTUALENV_NAME

To list all your virtual environments:

pyenv virtualenvs

To activate a virtual environment:

pyenv activate MY_VIRTUALENV_NAME

To deactivate the currently active virtual environment:

pyenv deactivate

Installing Python, Eclipse, and PyDev, I use separate Eclipse packages for different programming requirements. If you already have an Eclipse installation, get an Eclipse package then add PyDev� In this handout we will download Eclipse Standard 4.4 for Mac OS. The version you should download is Eclipse IDE for Eclipse Committers. It is critical that Java, Python, and Eclipse are either all 32 Bit or are all 64 Bit (and only if your Machine/OS supports 64 Bit): I think it easiest on Macs to use 64 Bit for everything.

From the README text file of python

Installing multiple versions

On Unix and Mac systems if you intend to install multiple versions of Python using the same installation prefix (--prefix argument to the configure script) you must take care that your primary python executable is not overwritten by the installation of a different version. All files and directories installed using "make altinstall" contain the major and minor version and can thus live side-by-side. "make install" also creates ${prefix}/bin/python which refers to ${prefix}/bin/pythonX.Y. If you intend to install multiple versions using the same prefix you must decide which version (if any) is your "primary" version. Install that version using "make install". Install all other versions using "make altinstall".

For example, if you want to install Python 2.5, 2.6 and 3.0 with 2.6 being the primary version, you would execute "make install" in your 2.6 build directory and "make altinstall" in the others.

Virtualenv is an option but you could use the above mentioned option instead of venv which seems much simpler.

How to install Eclipse for Python on OSX, Is it advantageous to install multiple applicable Eclipse IDEs? bit install, for an iMac mid-2011, 4GB memory, Mac OS X 10.9.2. ps: I also need to have best support available for Perl, Python, D Language, Scala, & VHDL. (For the Mac choose Eclipse / Preferences). This brings up the Preferences dialog box. Choose Pydev / Interpreter - Python: The Quick Auto-Config may set Eclipse up the way you want it, but only if some version of Python 3 is selected. If no version of Python is found, follow the next steps. If an earlier version of Python is found, make sure

Personally, I use conda to create multiple environments (mostly, you create a new env, activate it and install the packages you want there -- using conda itself if possible or pip if it's not available in conda). See: https://conda.io/docs/installation.html.

After you have an environment created, you just need to add a new interpreter inside PyDev which points to the interpreter in the created environment. Ssee: http://www.pydev.org/manual_101_interpreter.html.

Newcomers � multiple IDEs, I have installed two versions of the Eclipse IDE on mac (macos 10.12.6, but I had a look and I do have multiple Eclipse installations shown in� This article just want to tell you how to use it to develop Python application. 1. Install PyDev Eclipse Plugin. Before you can develop python app, you should install PyDev ( an eclipse plugin ) in the eclipse. Below is the installation steps. Open eclipse, and click Help —> Eclipse Marketplace… menu item at top tool bar.

How to get two IDEs show in macos launchpad, And which package is the best for Python programming? Thank you so much! Put PyDev into the search box and install the package. You'll need a Python Eclipse is like a LEGO base and plenty of different blocks to put on it. My base setup is I'm running Eclipse on MAC OS X and Linux. The Pythons� Introduction: This handout introduces Python programming in the Eclipse Integrated Development Environment (IDE). It is presented partly as a tutorial and partly in a "cook book" style: read the text and follow the instructions to gain some hands-on experience operating this software, which we will use extensively when we write, test, and debug our own programs.

Newcomers � What Eclipse-Version , Last few months I have been delving into Data Science and Machine Learning. Both fields are related. In fact, in my opinion Data Science… Python and Java should be installed before installing Eclipse. Unzip eclipse-committers-newon-2-win32.zip, the file that you just downloaded and moved. On my machine (running Windows 7), I can Right-click the file. Hover over the IZArc command from the menu of options. Click Extract Here

Running Multiple Python Versions in Mac OSX, 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 system, the author of this� 4) Once the download is done. Go to the download folder, you would find a file named “eclipse-java-mars-2-macosx-cocoa-x86_64.tar” (the file name may be different based on the version you download but it should be a tar file starting with word eclipse). 5) Drag the zipped file to the desktop and double click to open it.

Comments
  • Forgot about macports completely, been some while since I used OS X now. This is much better than what I suggested :)
  • Thanks, this was exactly right. You didn't explicitly say why but PyDev - Interpreter scanning does not seem to automatically find a Macport install of python.
  • How do you configure Eclipse to use this virtualenv?
  • I think it was within Eclipse Settings -> PyDev -> Interpreters -> Python interpreter. Then add the path of the corresponding python binary env, in mi example it would be ~/.pyenv/versions/MY_VIRTUALENV_NAME/bin/python. But it depends where you have installed .pyenv.
  • Ah, PyDev. Unfortunately in my situation I'm not using PyDev, just need Eclipse to find pyenv (or at least the right Python version within pyenv). In my case I ended up prepending to PATH.
  • Thanks. There's more to it than clobbering an existing install - MacOS is supposed to have dependencies on the version and libraries with MacPython (2.6.1). I may not strictly need venv but I want the peace of mind that a package will never get installed in the wrong place - opinions?
  • I think you should try what @Zenon suggests and try macports if you have not already tried it.