I have a problem in VS code similar to what people had in pycharm (see here, same code throws the error).
import requests
def Earlybird(daycount):
url = 'https://msft.com'
response = requests.get(url)
print(response)
Earlybird(1)
raise SSLError(
urllib3.exceptions.SSLError: Can't connect to HTTPS URL because the SSL module is not available.
The suggested solution was to append the PATH variable. I have created a separate virtual environment by conda create --name v_env anaconda
and using it as the interpreter for the project. How do I append the PATH variable for this particular project only, with it's special environment, in VS code? Or are there other fixes for this issue in VS code? BTW Pycharm throws no error for the code and the same virtual environment. I assume this has already been fixed in pycharm by the developers.
When I run the same code from jupyter notebook in VS code it works fine with no issue.