Windows Python thingies
python-xx.xx.xx-amd64.exec:\program files\python39\lib\site-packagespy -m pip install packageNamepy -3.9 -m pip install packageNameWe need to reference the correct python executable ( & it's path ), here for example working with blender python env. Using pip list as an example, to get started:
C:\Program Files\Blender Foundation\Blender 4.5\4.5\python\bin>python.exe -m pip list"C:\Program Files\Blender Foundation\Blender 4.5\4.5\python\bin\python.exe" -m pip list (direct command)"C:\Program Files\Blender Foundation\Blender 4.5\4.5\python\bin\python.exe" -m pip show pipLocation: C:\Program Files\Blender Foundation\Blender 4.5\4.5\python\Lib\site-packages"C:\Program Files\Blender Foundation\Blender 4.5\4.5\python\bin\python.exe" -m pip install --upgrade pillow -t "C:\Program Files\Blender Foundation\Blender 4.5\4.5\python\Lib\site-packages"--tbc --upgrade command, also seems to create some issue with multiple versions of numpy.
pip list Shows package list
pip list -v Shows package list wPath
pip freeze Shows package list + version numbers
pip show packageName Shows package info and install path. (like pip show pillow)
Install virtualenv with pip ( cmd prompt as admin):
py -m pip install virtualenv
Create an Env, ( it will created at the current directory) for example:
cd PROJECTS/PONG
virtualenv venvpong #Create a virtual env named venvpong inside of the current folder.
To activate the virtual env: envppong\Scripts\activate or.\venvppong\Scripts\activate
To deactivate the virtual env: deactivate
#### TO DO:
~~1. Expand with virtual env ~~
2. Get python command to add path to TD / hack somewhere. "can't remember"
### --- OLD STUFF BELOW ---
### install package (request here for example)
pip install requests
#Check if pip works / installed modules: (in windows cmd)
pip freeze
pip list
#check python packages list: (python promot)
help("modules")
#1 Install Python (for windows & touchdesigner)
# download & install python 64bit v3.6.6 ( executable installer 64 or amd64 )
#--- >make sure the "add to ENV path " option is ticked/
#2 Go to env. variable
Copy the path something like
C:\Users\pk\AppData\Local\Programs\Python\Python35\
-
#3 In touch designer change the folder in preference | python 64 bit modules:
C:\Users\pk\AppData\Local\Programs\Python\Python35\Lib\site-packages
#4 MULTIPLE PYTHON VERSION:
check with py launcher witch version are installed:
py --list
then you can target specific version for installing / pip''ing ( start as admin)
py -3.7 -m pip install packagename
#5 User vs All User / Machine installs using pip
pip3.7 install --upgrade --user mediapipe
#6 Check PATH
echo %PATH%
echo %PATH:;=&echo.% ( outputs line by line )
#7 Backup PATH ( cmd as admin )
echo %PATH% > C:\path-backup.txt
#8 Add path to PATH
Permanently add a directory to the user PATH variable:
setx path "%PATH%;C:\path\to\directory\"
Permanently add a directory to the system PATH variable (for all users):
setx /M path "%PATH%;C:\path\to\directory\"
--- IN #99 / 2020
TD ython Version : Python 3.7.2 (heads/3.7-Derivative:052feb9e72, Mar 7 2019, 16:29:45) [MSC v.1900 64 bit (AMD64)]
Installing python version 3.7.
on HP:
deleted env Path:
C:\Users\PK\AppData\Local\Programs\Python\Python37\
C:\Users\PK\AppData\Local\Programs\Python\Python37\Scripts\