There are different methods for installing and updating Python on Mac, but let's stick to the third principle of the Zen of Python that says: “ Simple is better than complex.” Accordingly, we will try simple methods rather than complex ones. Then, to write and run our Python code in an integrated development environment (IDE), we will learn how to install and configure Visual Studio Code on Mac. Here, we will walk through the different ways of installing and updating Python on macOS. As a novice programmer, you may be wondering how to install or update Python on your Mac properly. So, installing Python is essential for all programmers. $ python get-pip.Python is one of the most powerful programming languages, mostly used in data science, machine learning, and big data analytics. This will run the get-pip.py file Python codes which will simply install the pip for the macOS or OS X. $ curl -o get-pip.pyĪND then we will call the get-pip.py with the Python interpreter. We will provide the URL with the -o option where we will set the name of the downloaded get-pip.py file name. First, we will download the get-pip.py script with the curl command. get-pip.py is a Python script that will simply download and install the Pip package for Python. Get-pip.py is another way to install pip in MacOS. $ sudo pip install -upgrade pip Install Pip with get-pip.py On MacOS We will use the pip command because it installed already and provide the -upgrade option with the package name which is also pip. If the pip is already installed we can also upgrade the existing pip installation with the easy_install like below. We can install pip with the easy_install command like below. Before pip easy_install was the standard package manager for the Python. Install Pip with easy_install On MacOSĮasy_install is a Python module bundled with setuptools which gives us the ability to download, build, install, and manage Python packages. The python2 version is Python2.7.16 and Python3 version is Python3.6.8. So we can use installation commands for both Python2 and Python3. We can see that both PYthon2 and PYthon3 is installed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |