The Python Virtual Environments system denotes a tool that is used to keep different packages in different spaces to avoid conflicting issues. Such environments remain isolated from the other Python projects or environments and ensure that the environment comes with its dependencies to stay independent.
Installing Python in different operating systems like Windows, and Linux needs to follow different installation methods. Check out the installation steps here.
Install Python First
If you are using an ENGINEERING Windows Desktop, you can install Python using the 2.7 through the software center.
Go for Adding Python to the Path
These steps involve:
The next step would be opening a new CMD prompt by using Windows Key + R, cmd.exe
In this step, use the command pip install virtualenv and install virtualenv. If you are not the administrator, avoid updating even if you get the prompt.
At the last step, make sure virtualenv gets installed through the pip –version command.
Bash Shell
Start working on it by activating the command source my_project/bin/activate
csh /tcsh:
In csh /tcsh, use the command source my_project/bin/activate.csh to start the virtual environment.
You can use pip as usual for installing packages
If you are running ‘python‘ it will be the version specified in Step 1
Running ‘pip‘ means running the current version
Be sure all modules are installed inside that environment
After you are done with working in the environment, use the deactivate command to exist.
Go after these steps for a successful virtual environment installation and make sure to set up the environment correctly.
© 2024 Euphoriagenx. All Rights Reserved