I tried some guides that I found but nothing works. I need this virtual env for a telegram bot. I| use Visual studio code
Question posted in Telegram API
A comprehensive official documentation can be found here.
A comprehensive official documentation can be found here.
3
Answers
How to install virtualenv:
Install pip first
Then install virtualenv using pip3
Now create a virtual environment
you can use any name insted of venv
You can also use a Python interpreter of your choice
Active your virtual environment:
Using fish shell:
To deactivate:
Create virtualenv using Python3
Instead of using virtualenv you can use this command in Python3
.venv
is the name of the environment folder:This will add the path to the Python interpreter from the new virtual environment to your workspace settings. That environment will then be used when installing packages and running code through the Python extension.
You can switch environments at any time at the bottom left corner of VS Code window or using the Python: Select Interpreter command from the Command Palette
(Ctrl+Shift+P)
.Its looks like your problem is activating the virtual environment.
or just type
activate
in your terminal.If you are using windows try:-