Python: Difference between revisions
Appearance
	
	
NickPGSmith (talk | contribs)  | 
				NickPGSmith (talk | contribs)  | 
				||
| Line 13: | Line 13: | ||
or Linux:  | or Linux:  | ||
  . py-env/demo/bin/activate  | |||
Install within a venv:  | Install within a venv:  | ||
| Line 20: | Line 20: | ||
Deactivate an env:  | Deactivate an env:  | ||
  deactivate  |   deactivate  | ||
== Python Installer ==  | == Python Installer ==  | ||
Revision as of 16:04, 5 April 2024
PIP
On Windows, start pip with:
py -m pip
Virtual Environments
Create a virtual environment:
python -m venv py-env/demo
Activate a virtual environment on Windows:
py-env\demo\Scripts\activate
or Linux:
. py-env/demo/bin/activate
Install within a venv:
python -m pip install novas
Deactivate an env:
deactivate
Python Installer
pip install pyinstaller
Add C:\Users\<user>\AppData\Roaming\Python\Python312\Scripts to PATH:
pyinstaller --onefile file.py
and the resultant executable will be in the dist directory.