oliviano
10/6/2018 - 12:38 AM

Python Windows

Windows Python thingies

Install Python

  1. download installer like: python-xx.xx.xx-amd64.exe
  2. In the installer check:
  • Customize installation
  • Install for all user
  • Add Python to environment variables
  • Customize install location should read c:\program files\python39\lib\site-packages

install packages ( multiple python env )

  1. launch cmd as administror
  2. install package: py -m pip install packageName
  3. Specify python version: py -3.9 -m pip install packageName

verify tools

pip list Shows package list
pip freeze Shows package list + version numbers
pip show packageName Shows package info and install path.

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\