Python Forum
Project structure with a virtual environment
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Project structure with a virtual environment
#1
[output]Hello to all,
Could you help me resolve the following issue: I'm having a project vscode where i created a folder containing a virtual environment and i added a python script that i'm trying to run, for reasons that i don't understand i can't run the script even after downloading the required packages in the project (after I activated the virtual environment). How should i structure the project to be able to run the script? Thank you for your help.
This how I structured the project (called trading):
1. virt (this the virtual environment folder)
2. __init__.py (an empty python file, which placed below the virt folder - not sure i should have put this file in there)
3. my_script.py (the script i'm trying to run, which placed below the __init__.py file, hence below the virt folder)
   
Reply


Messages In This Thread
Project structure with a virtual environment - by gdbengo - Jan-25-2022, 11:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Project Structure for Modularity and Reusability with Multiple Entry Points b19wh33l5 0 190 Apr-24-2024, 12:21 PM
Last Post: b19wh33l5
  Help with creating folder and "virtual environment" AudunNilsen 1 262 Mar-21-2024, 04:41 AM
Last Post: deanhystad
  Installing python packages in a virtual environment Led_Zeppelin 1 792 Aug-15-2023, 08:18 PM
Last Post: deanhystad
  Problem with virtual environment standenman 2 1,031 Feb-23-2023, 07:09 PM
Last Post: standenman
Question Virtual Environment (using VS Code) Ashcora 4 14,622 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,397 Feb-26-2022, 11:15 AM
Last Post: Larz60+
  Virtual environment path? Led_Zeppelin 1 2,325 Jul-22-2021, 01:40 PM
Last Post: snippsat
  virtual environment heye 4 2,502 Jul-04-2021, 06:47 AM
Last Post: ndc85430
  import statement in a virtual environment leodavinci1990 1 2,390 Mar-04-2021, 12:57 AM
Last Post: snippsat
  Virtual environment and upgrading python 3.5 to 3.9 NeilUK 4 12,216 Jan-24-2021, 01:02 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

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