Python 3.4 and Python 2.7: How to remove the preinstalled version of MacBook?

5

Currently I'm migrating from a Mac to a Windows and today I discovered, when I installed all the features I needed, that I already had a Python 2.X in it and I need to run Python 3.4.3. >

How can I remove the old version that is harming me?

    
asked by anonymous 15.07.2015 / 23:05

1 answer

4

You definitely NOT should uninstall the version of Python that came with your system. Other programs and even your system may depend on that particular version.

Another thing, when installing version 3, be careful not to overwrite version 2, because, as already mentioned, this can be very problematic.

It's completely normal to have both major Python versions installed on your system, including smaller versions (eg 2.6 and 2.7, 3.1 and 3.4). This gives you greater flexibility and versatility during development. An example of this is you develop an application entirely in version 3, but use a tool to help you make builds that only exists in version 2. Your application depends on Python 3, the Python 2 tool.

Tip: Given that the version that comes pre-installed is vital for your system, use virtual environments to develop your applications and use other libraries. This way, in addition to protecting your system, this practice will allow you to isolate your applications from each other, making it easier to manage specific dependencies.

For example, one application may depend on version 1.5 of django while another depends on version 1.8. This will be much easier to manage (or perhaps the only possibility) if you use virtual environments.

As suggested in the comments, search for virtualenv .

    
16.07.2015 / 02:06