2

This question may be a little general for Stack Overflow but I wanted to get some advice before I go ahead and make potentially frustrating changes to my setup (which I've done before).

I use the Anaconda 2.7 distribution of Python but am also learning C#. Therefore I'm looking into using IronPython to integrate some existing code with C#. I also want to start using Python 3.5, to try out PyPy (since what I do is usually computationally expensive) and Cython. My question is, what problems can I run into when having these multiple distributions of Python at the same? Is it worth uninstalling and reinstalling every time I want to use switch distributions or is there a manageable solution for these problems?

CiaranWelsh
  • 7,014
  • 10
  • 53
  • 106

1 Answers1

1

Usually Python2 and Python3 should not interfere with each other. If you use pip to install packages you need to decide on which version you want to install the package for.

If you want to be sure, I would recommend using a virtual environment: http://docs.python-guide.org/en/latest/dev/virtualenvs/

Every change you make in a virtualEnv is only applied to your local directory and can therefore not interfere with other versions.

Jannek S.
  • 365
  • 3
  • 16
  • Very interesting. Do you know if there are any disadvantages with respect to speed when using a virtual environment as compared to the standard installation? Thanks – CiaranWelsh Jan 24 '17 at 08:56
  • @CiaranWelsh Have not met such disadvantage yet, but I am not sure. Basically a virtualEnv only resets links, so there should not be much of a difference. – Jannek S. Jan 24 '17 at 09:01
  • Would strongly recommend virtualenv. That way you can install things with pip into a virtualenv without worrying that installing foobar 1.4 will break some system utility that depends on foobar 1.3. Also they are great for checking that upgrading pip packages (or Python itself) doesn't break your apps. – nigel222 Jan 24 '17 at 11:16