Python Interpreter
Python Interpreter
http:/ / www. python. org/ download/ releases/ 3. 0/ and download the latest version
• Open the installer as administrator
• Check the box “Add to Python X to PATH”
• To access from any where, like in command prompt using “python”
syntax
• Comes with IDLE
python --version
Windows Traceback (most recent call last): File Unix/macOS
, line 1, in <module> NameError: name 'python' is not
defined
Windows Unix/macOS
• If that
Windows still doesn’t allow you Unix/macOS
• Download the script, from https://bootstrap.pypa.io/get-pip.py.
• Open a terminal/command prompt, cd to the folder containing the get-pip.py file and
run:
> py get-pip.py python get-pip.py
Windows
Unix/macOS
• Upgrading pip
<path>:> py -m pip install --upgrade pip $ python -m pip install --upgrade pip
DEPARTMENT OF APPLIED PHYSICS,
EVEN SEMESTER
Windows UNIVERSITY OF CALCUTTA
Unix/macOS
Install Packages
• The most common usage of pip is to install from the Python
Package Index (PyPI) using a requirement specifier
• requirement specifier: package name followed by version specifier
C:> py -m pip install <project name == version>
[...]
Successfully installed <project> "SomeProject"
"SomeProject==1.4"
"SomeProject>=1,<2"
$ python -m pip install <project name == version> "SomeProject~=1.4.2"
[...]
Successfully installed <project>