Python 3.4 and Python 2.7: How to remove the preinstalled Macbook Version?

Asked

Viewed 6,374 times

5

I am currently migrating from a mac to a Windows and today I discovered, when installing all the resources I needed, that there was already a Python 2.X in it and I need to run Python 3.4.3.

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

  • 1

    Have you ever heard of virtual environments? recommend Voce to install virtualenv, where Voce can create a virtual environment for a particular version of python that Voce choose. It’s actually the best way to work. Voce can find more information on virtualenv and how to use it on this link https://virtualenv.pypa.io/en/latest/

  • Old version hurting you? I think you better not mess with the version that is installed on the system, some Mac OS applications may need Python 2.7. As Rafael said, install a virtual environment and put in it the version of Python you want to work, so you can have multiple environments with different settings.

1 answer

5


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

Another thing, when installing version 3, be careful not to overwrite version 2, because, as said, this could bring you many problems.

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

Tip: Since the pre-installed version is vital to 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, look for virtualenv.

  • 1

    And you see, entedna "definatively NO" as NO, DO NOT give up the Python that comes with your Mac itself!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.