title: Run python script with specified libraries from a specific folder path
body: <p>I created a "virtual" environment without using virtualenv library.</p>
  
  <p>I have this structure.</p>
  
  <pre><code>./default_env
  ├── .venv
  ├── main.py
  </code></pre>
  
  <p>And inside the folder .venv, I have libraries installed.<br /></p>
  
  <p>To install packages in .venv, I simply ran </p>
  
  <pre><code>&gt;&gt;&gt; pip install --target=path\to\.venv package_to_install
  </code></pre>
  
  <p>which is ok and works fine.</p>
  
  <p>However my problem is when I try to run python. <br />
  I do not want to run python that uses the global site-packages, I want it to point to my .venv folder. I have read about USER_SITE, but I wasn't able to understand properly how to change it and use it. </p>
  
  <p>When I run python main.py, I get an error (because I have purged all installed libraries). However, I have requests and its dependent packages installed in .venv. </p>
  
  <p>So I am trying to understand how I can run </p>
  
  <pre><code>&gt;&gt;&gt; python main.py 
  </code></pre>
  
  <p>(with arguments, or changing something ...) but to tell python that the "site-packages" are to be pointed to .venv folder.</p>
  
  <p>This is my main.py script. </p>
  
  <pre><code>import requests
  def main():
      try:
          import requests
          r = requests.get('https://api.github.com/user')
          print("get request sent")
      except:
          print("get request not sent")
  
  if __name__ == "__main__":
      main()
  </code></pre>
  
  <p>So when I run it, I get the obvious </p>
  
  <pre><code>λ python main.py
  Traceback (most recent call last):
    File "main.py", line 1, in &lt;module&gt;
      import requests
  ModuleNotFoundError: No module named 'requests'
  </code></pre>
  
  <p>because requests is not installed in the global site-packages.</p>