and we know according to the lecture that when I run the command pipenv shell
Ok, so to be able to run it globally without running the above comman I have added the path to python entry in the settings.json file as follows after extracting the full path by another command… see as follows:
this create env if not created and also activate at the same time;
once you activated env you can import libraries which you have installed in this env using command pipenv install requests
if you work outside of this env then requests module is not be available
Thank you so much. That is exactly what I understood but confusion started when Mosh introduced the extension of (code-runner). If, we could at the the VS code, execute a program from either the Terminal or from the menu (Ctrl+F5) why should we use code-runner and even have to modify the settings.json. However, I will go back to the env topic and review it more thoroughly and I will apprreciate any other additions from you if you have.
Thank you for having the time to answer my queries. Now i could do it. The code runner at first could not see the path to the virtual environment until i discovered that that this path contained two separated words (sarmad alsaadi) then i only surriunded them with quotes and voila it worked.
One thing remains confusing a red underline is still appearing under the word (requests)
despite the fact that the package is installed in the ve and code run normally