Python 3.X
Python 3
install python
Set environment Variables
open "environment Variables"
set at System Variables New variable "PYTHONPATH"
Add paths like on first screen
Create on Variable Path (System variables) a new variable named %PYTHONPATH%
The Paths of PYTHONPATH will be use in Path by %PYTHONPATH%
At command prompt / powershell just try command to check if python is correctly installed
python -V
>Python 3.8.5
Pycharm (IDE)
Install Pycharm
Download and install Pycharm Community version - it is for free.
Create first project
File > New Project 1. set a location and new folder name 2. set a New environment (it's better option, because sometimes we forgot to tell someone what to install in his environment to this project could be work)
Install pip to Python Interpreter
File > Settings
Project: "gitbookProject" > Python Interpreter
Click "+" icon > to install
4. search and install package
5. Package 'selenium' installed successfully
Pip and Venv by console
Package manager
pip is the reference Python package manager. It’s used to install and update packages. You’ll need to make sure you have the latest version of pip installed.
Virtual environment
Virtual environment is used to manage Python packages for different projects. Using virtualenv allows you to avoid installing Python packages globally which could break system tools or other projects. You can install virtualenv using pip.
Creating a venv
(we could do it by pycharm by option New environment)
Activating a virtual environment
Leaving a virtual environment
Pip install
e.g. selenium
How to use venv and pip
requirements.txt
Save all the packages in the file
Install packages from file requirements.txt
Last updated