Documente Academic
Documente Profesional
Documente Cultură
(2) Right click on the Command Prompt, and then select Run as administrator (by running
the Command Prompt as an administrator, you’ll avoid any permission issues):
(3) In the Command Prompt, type “cd\” to ensure that your starting point has only the drive
name:
(4) Press Enter, and you’ll see the drive name C:\>
(5) Locate your Python application path, which is the folder where you originally installed
Python.
C:\Users\Ron\AppData\Local\Programs\Python\Python37-32
Once you retrieved the Python application path, type the following command in the
Command Prompt:
In my case, I typed:
(7) To upgrade PIP, type/copy this command, and then press Enter:
This is how the command would look like in the Command Prompt:
(8) You’ll notice that the latest version of PIP will be installed:
(1) First, type “cd\” to ensure that your starting point has only the drive name:
(2) Then, locate your Python Scripts path. The Scripts folder should be located within the
Python application path.
C:\Users\Ron\AppData\Local\Programs\Python\Python37-32\Scripts
(3) Type “cd” followed by the Python Scripts path (then press Enter):
(4) Finally, type the following command to check the version of PIP:
pip --version
Note that you’ll need to add Python to Windows path in order to start using the tool.
import os
import tkinter as tk
root= tk.Tk()
Simply, run the code, and then press on the button ‘Upgrade PIP’ and you should be good to
go.
You can easily downgrade to a previous version of PIP by following the steps below.
(2) Let’s say that you want to downgrade the PIP version to 18.1
To do that, simply type the following command, and then press Enter:
Final Words
If you’re using Anaconda, you may want to check this tutorial that explains how to upgrade
PIP in Anaconda.
Finally, if you need to install PIP, you may wanna review the pip documentation.
Installing Packages: In Python
Start the installer and select Customize installation. On the next screen leave all the optional
features checked. Finally, on the Advanced Options screen make sure to check Install for all
users, Add Python to environment variables and Precompile standard library. Optionally,
you can customize the install location. I’ve used C:\Python37. You should see something like
this:
Press the Install button and in a few minutes, depending on the speed of your computer, you
should be ready. On the last page of the installer, you should also press the Disable path
length limit:
Now, to check if Python was correctly installed, open a Command Prompt (or a PowerShell)
window. Press and hold the SHIFT key and right click with your mouse somewhere on your
desktop, select Open command window here. Alternatively, on Windows 10, use the bottom
left search box to search for cmd.
Write python in the command window and press Enter, you should see something like this:
Exit from the Python interpreter by writing quit() and pressing the Enter key.
Now, open a cmd window like before. Use the next set of commands to install NumPy, SciPy
and Matplotlib:
After each of the above commands you should see Successfully installed ….
Launch Python from a cmd window and check the version of Scipy, you should see
something like this:
1 C:\>python
2 Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 22:20:52) [MSC v.1916
32 bit (Intel)] on win32
3 Type "help", "copyright", "credits" or "license" for more information.
4 >>> import scipy as sp
5 >>> sp.version.version
6 '1.2.1'
7 >>>
Let’s try something a bit more interesting now, let’s plot a simple function with Matplotlib.
First, we’ll import SciPy and Matplotlib with:
1 import scipy as sp
2 import matplotlib.pylab as plt
1 t = sp.linspace(0, 1, 100)
1 plt.plot(t, t**2)
2 plt.show()