Hi

I want to make use of GitHub-programs, and so I downloaded a bunch of Python-tools. When I run this command in "Python 3.12", which looks like CMD to me, I get a syntax error.

"To create a virtual environment, Python supplies a built in venv module which provides the basic functionality needed for the virtual environment. Running the command below will create a virtual environment named "openai-env" inside the current folder you have selected in your terminal / command line: python -m venv openai-env"

The instructions said nothing about how to "select" a folder, and I have no idea how to do that, so maybe that´s what´s going on. It says it´s included in the program, so..

Any clue?

P.S.

If you know of a good guide to this whole, general question of using Github-programs, that would be much appreciated. As I gather, it´s entire programs sometimes, sometimes just scripts, and sometimes just modules or snippets of code. How to put a general framework together would be awesome to learn, the dream being to have like a "test-program", as in a blank program with basic stuff in place, like a file menu on the top, keyboard and mouse-compatibility, and stuff like that; a program that looks just like a normal Windows-program, only you can put stuff in it. A GUI? Is that what it is? I guess the more relevant question is; is there a GUI like this that I can put in a website? Some sort of template code that you can shimmy into HTML ?

Thanks

Recommended Answers

All 2 Replies

I have an apps folder on D: where I keep all my portable/homegrown software. Let's say I want to create a virtual enviromnent in D:\apps\MyVirtual. To do this I open a command shell and do

D:\>cd apps
D:\apps>python -m venv MyVirtual

If I install any packages in this session, they will be installed in the virtual python.
This tkes a few seconds. Once done the D:\apps\MyVirtual folder contains a pile of python files (executables, packages, etc. You activate the virtual environment by typing

MyVirtual\scripts\activate.bat

and deactivate by either closing the command shell, or running

MyVirtual\scripts\deactivate.bat

They really just play with environment variables so that all required python stuff comes from MyVirtual. Any packages you install in this session will install into the virtual environment.

I have developed a number of GUI applications in python. I found that the wxpython package was far better than tkinter. wxpython is based on wxwidgets which is essentially windows controls. Because wxwidgets are compiled for each major system, controls rendered by wxpython look like the native controls for whatever system is hosting.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.