Answer the question
In order to leave comments, you need to log in
Virtual environment not working in vscode?
venv virtual environment not working in VSCode on Win10.
I create a project, a folder, I try to run the Activate.ps1 script, but it does not work. Activate.bat works, but it doesn't help and the whole pip install goes to a non-virtual environment. + the terminal does not ask to update pip. What's my mistake? What have I not done or done but not right?
VSCode terminal:
Windows PowerShell
PS C:\Users\99622> cd .\Documents\Python\TG_Bot_f_server\
PS C:\Users\99622\Documents\Python\TG_Bot_f_server> New-Item -ItemType directory DarkBot
Каталог: C:\Users\99622\Documents\Python\TG_Bot_f_server
Mode LastWriteTime Length Name
PS C:\Users\99622\Documents\Python\TG_Bot_f_server> cd .\DarkBot\
PS C:\Users\99622\Documents\Python\TG_Bot_f_server\DarkBot> py.exe -m venv env
PS C:\Users\99622\Documents\Python\TG_Bot_f_server\DarkBot> cd .\env\Scripts\
PS C:\Users\99622\Documents\Python\TG_Bot_f_server\DarkBot\env\Scripts> .\Activate.ps1
.\Activate.ps1 : Невозможно загрузить файл C:\Users\99622\Documents\Python\TG_Bot_f_server\DarkBot\env\Sc
ripts\Activate.ps1, так как выполнение сценариев отключено в этой системе. Для получения дополнительных с
ведений см. about_Execution_Policies по адресу https:/go.microsoft.com/fwlink/?LinkID=135170.
строка:1 знак:1
+ .\Activate.ps1
+ ~~~~~~~~~~~~~~
+ CategoryInfo : Ошибка безопасности: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
PS C:\Users\99622\Documents\Python\TG_Bot_f_server\DarkBot\env\Scripts> .\activate.bat
PS C:\Users\99622\Documents\Python\TG_Bot_f_server\DarkBot\env\Scripts> pip list
Package Version
----------------- ----------
astroid 2.3.3
beautifulsoup4 4.9.0
bs4 0.0.1
certifi 2020.4.5.1
chardet 3.0.4
colorama 0.4.3
get 2019.4.13
idna 2.9
lazy-object-proxy 1.4.3
mccabe 0.6.1
pip 20.1
post 2019.4.13
public 2019.4.13
pylint 2.4.4
pyTelegramBotAPI 3.6.7
query-string 2019.4.13
request 2019.4.13
requests 2.23.0
setuptools 41.2.0
six 1.14.0
soupsieve 2.0
urllib3 1.25.9
wrapt 1.11.2
PS C:\Users\99622\Documents\Python\TG_Bot_f_server\DarkBot\env\Scripts> pip install pyTelegramBotAPI
Requirement already satisfied: pyTelegramBotAPI in c:\users\99622\appdata\local\programs\python\python38-32\lib\site-packages (3.6.7)
Requirement already satisfied: requests in c:\users\99622\appdata\local\programs\python\python38-32\lib\site-packages (from pyTelegramBotAPI) (2.23.0)
Requirement already satisfied: six in c:\users\99622\appdata\roaming\python\python38\site-packages (from pyTelegramBotAPI) (1.14.0)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\99622\appdata\local\programs\python\python38-32\lib\site-packages (from requests->pyTelegramBotAPI) (2020.4.5.1)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\99622\appdata\local\programs\python\python38-32\lib\site-packages (from requests->pyTelegramBotAPI) (1.25.9)
Requirement already satisfied: chardet<4,>=3.0.2 in c:\users\99622\appdata\local\programs\python\python38-32\lib\site-packages (from requests->pyTelegramBotAPI) (3.0.4)
Requirement already satisfied: idna<3,>=2.5 in c:\users\99622\appdata\local\programs\python\python38-32\lib\site-packages (from requests->pyTelegramBotAPI) (2.9)
Could not build wheels for pyTelegramBotAPI, since package 'wheel' is not installed.
Could not build wheels for requests, since package 'wheel' is not installed.
Could not build wheels for six, since package 'wheel' is not installed.
Could not build wheels for certifi, since package 'wheel' is not installed.
Could not build wheels for urllib3, since package 'wheel' is not installed.
Could not build wheels for chardet, since package 'wheel' is not installed.
Could not build wheels for idna, since package 'wheel' is not installed.
PS C:\Users\99622\Documents\Python\TG_Bot_f_server\DarkBot\env\Scripts>
Answer the question
In order to leave comments, you need to log in
In the project folder in the console you write
python -m venv vi (where 'vi' is the name of the virtual machine)
Then in the console you write vi/scripts/activate
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question