#πŸ”’ Manually adding python to PATH

20 messages Β· Page 1 of 1 (latest)

sage dust
#

The new install manager doesn't come with the option to autimatically add to path. Plus the folder structure seems a little different than what I'm seeing on tutorials, that either use the terminal or follow a different folder structure in older versions.

I already found how to add to path in windows 11. Any other folder I should be adding? It has so far:
AppData\Local\Python\bin
AppData\Local\Python\pythoncore-3.14-64\

Should this script folder be added?
AppData\Local\Python\pythoncore-3.14-64\Lib\venv\scripts

Part of my folder structure is in the image.

bold cedarBOT
#

@sage dust

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

full plover
#

Lib/venv/scripts is NOT a venv you made, it's literally just venv module's file stubs.
You also should never actually add venvs to global PATH settings, just activate them (which adds them to PATH for the current session only, but also adds a command deactivate to remove them from PATH in that session)

sage dust
#

I read somewhere, don't remember in what site, that the scripts path is needed to use pyinstaler or some such -- I might have read wrong though.

#

I only need it to compile a few exes for windows in an easier way

full plover
#

Activating the venv is enough to add to PATH in the current session, so that the libs that add their own executables work

sage dust
#

ah ok

full plover
#

If the lib is installed inside that venv, of course

#

I prefer running the libs with -m

sage dust
#

when you say activating you mean "opening" it on the terminal right?

#

I'm meganoob in this

manic locust
#

no, running the activate script that is inside your venv scripts folder (that is created after you make a new venv)

#

your venv should be in the same folder as your code. Your code should not be inside the venv

full plover
#

If you don't know what venv and activating a venv are, you shouldn't build any exes. They'll end up huge (because you don't have dependency separation between projects and pyinstaller will just pack everything, instead of the libs that are needed for this one project)

sage dust
full plover
#

Source file being small doesn't mean the exe will end up small if your environment has a shitton on libs

#

That's the point

bold cedarBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.