Win a copy of Create an Uber Clone in 7 Days: Build a real world full stack mobile app in Java this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Default Pycharm Project Structure  RSS feed

 
Ranch Hand
Posts: 174
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created a new Python project in the JetBrains PyCharm IDE and I see a few folders  which don't really make much sense to me as someone who is new to Python.

I see venv, Include, Lib, Scripts, in which I see pyvenv.cfg.

What do all of these mean?

And where do I place my code in?

In Java, it's usually the src folder - how are projects structured in Python?
 
Bartender
Posts: 9501
12
Linux Mac OS X Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not familiar with PyCharm (I usually use a text editor and the command line) so I downloaded it and took a look.  The "venv" directory is the "virtual environment", which I assume is a virtual machine where PyCharm executes one's code see here.  The other directories, Include, Lib, Scripts and tcl, appear to mirror the directories in a Python install.  This makes sense that the virtual environment would contain a Python install. 
Since I don't use an IDE, I always put Python files in the same directory (you don't need a "src" directory because there's nothing to compile so there won't be a "build" dir).  If you right-click on a project name and click New -> File, it puts the file under "venv", which I assume is the root directory of the project.
There's a guided tour here which may help with your understanding of the GUI and get you off on the right foot.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI @mark

venv directory the contains the virtual environment. A virtual environment is simply a sandbox where you can install packages and test things without polluting global Python installation.

You can place your code next to venv directory.

I hope this helps
 
Villains always have antidotes. They're funny that way. Here's an antidote disquised as a tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!