Python Forum
sys.path for virtual environment
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
sys.path for virtual environment
#3
I know that I am in the right environment because a pip or conda list sows the modules or libraries that I installed for this project. The modules and the python version are not the same as in the basic environment.

They are different which is why I created the virtual environment in the first place.

A simple command like:

python -V

will reveal which environment I am in. I installed numpy in my VE, and it installed fine. However, the python interpreter can not find numpy when i run my program in the VE because it is not in the sys.path.

I do not know if each VE has its own sys.path or if there is one global sys.path and that is it.

Any help appreciated. thanks in advance.

Respectfully,

ErnestTBass
Reply


Messages In This Thread
sys.path for virtual environment - by ErnestTBass - Sep-10-2020, 05:45 PM
RE: sys.path for virtual environment - by bowlofred - Sep-10-2020, 06:29 PM
RE: sys.path for virtual environment - by ErnestTBass - Sep-10-2020, 06:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with creating folder and "virtual environment" AudunNilsen 1 251 Mar-21-2024, 04:41 AM
Last Post: deanhystad
  Installing python packages in a virtual environment Led_Zeppelin 1 776 Aug-15-2023, 08:18 PM
Last Post: deanhystad
  Problem with virtual environment standenman 2 1,017 Feb-23-2023, 07:09 PM
Last Post: standenman
Question Virtual Environment (using VS Code) Ashcora 4 14,192 Feb-15-2023, 07:17 PM
Last Post: snippsat
  How do I link the virtual environment of that project to the 3.9.2 version of python? Bryant11 1 1,382 Feb-26-2022, 11:15 AM
Last Post: Larz60+
  Project structure with a virtual environment gdbengo 1 1,453 Jan-26-2022, 03:22 PM
Last Post: snippsat
  WebDriverException: Message: 'PATH TO CHROME DRIVER' executable needs to be in PATH Led_Zeppelin 1 2,225 Sep-09-2021, 01:25 PM
Last Post: Yoriz
  Virtual environment path? Led_Zeppelin 1 2,315 Jul-22-2021, 01:40 PM
Last Post: snippsat
  virtual environment heye 4 2,491 Jul-04-2021, 06:47 AM
Last Post: ndc85430
  import statement in a virtual environment leodavinci1990 1 2,379 Mar-04-2021, 12:57 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020