I am new to VS Code. I have created a virtual environment and selected that as the interpreter, in which I have run
pip install -r requirements
from the terminal which allowed for pandas to be installed in that virtual environment (I believe based on the docs
From that directory in the terminal, I ran
python myscript.py
It works. Generates the output as it should.
I then try to run the same script in the window above and I get the error, no module named pandas. I have not changed the interpreter.
UPDATE
When closing the terminal and then attempting to run the code from the explorer/deug window, I received a failure to run scripts notice. I therefore (based on this post changed my Execution Policies in Windows Shell (separate, not in VS terminal), and now it at least goes into the environment, however I still get the same error, pandas unknown.
UPDATE 2
I noticed in the tutorial that they created the directory and then created the environment within that. I moved my code to be under the virtual environment I created and then it works, both from the terminal and from the debug/explorer window. However here I noticed that the intrepetor is not characterised as a virtual environment but instead looks like the standard version- now there is no option for me to select working_env as an interpretor.
Running pip freeze shows the latest version of pandas which is not what I have installed elsewhere for instance. So this works, but I am now not sure if this is really how I should be using virtual environments.
**UPDATE 3
For whatever reason I can now update the interpreter. When I do however I am back to where I was. I can run the program in the terminal with the interpreteter selected, but running from the debug window I get the error that pandas is missing. Trying to install pandas I am told the requirement is satisfied. Running pip freeze confirms that this is installed. I have the feeling I am somehow installing pandas not in the environment I want
What have I missed in my vscode setup?