-
Notifications
You must be signed in to change notification settings - Fork 0
Python Install Tips
Joey Kleiner edited this page Jan 10, 2023
·
16 revisions
python installs:
# display all python installs on ubuntu
ls -ls /usr/bin/python*
# display all python installs on windows
py -0p
# display python version being used
python -V
python --versionpip install
- pip is the recommended package-management system written in Python used to install and manage software package
pip -V
pip --version
package installs:
# see location(s) of installed packages
python -m site
# show all installed packages
pip list
# see location of individual package
pip show pandas
# see where python installs your local packages
python -m site --user-siteinstall packages:
pip install matplotlib
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org pip matplotlib
C:\Users\jklei\AppData\Local\Programs\Python\Python310\Scripts\pip3 install pandasql
C:\users\nrf46657\appdata\local\programs\python\python310\Scripts\pip3 install virtualenvSetting up Remote-SSH for VS Code
- Create config file in this location:
C:\Users\nrf46657\.ssh\config- Can see this by F1 -> Remote-SSH: Settings
- Populate file with the following
Host deq1.bse.vt.edu
HostName deq1.bse.vt.edu
Port 311
User jkleiner
Host deq2
HostName deq2
User jkleiner
ProxyCommand ssh jkleiner@deq1.bse.vt.edu -W %h:%p
- F1 -> Close Remote Connection to close
Getting set up with python on windows:
- Install VS Code Desktop (User Installer 64 bit)
- Install Python extension in VS Code
- Install latest version of python from web browser (e.g. 3.10.5)
- Select this interpreter in VS Code
Set Up Virtual Environments
- Open a Windows PowerShell
- Navigate to your home directory
PS C:\Users\nrf46657>
- Navigate to your home directory
- Install the python package
virtualenvPS C:\Users\nrf46657> py -m pip install --user virtualenv
- Confirm install was successful
PS C:\Users\nrf46657> pip show virtualenv
Name: virtualenv Version: 20.17.1 Summary: Virtual Python Environment builder Home-page: https://virtualenv.pypa.io/ Author: Bernat Gabor Author-email: gaborjbernat@gmail.com License: MIT Location: c:\users\nrf46657\appdata\roaming\python\python310\site-packages Requires: distlib, filelock, platformdirs Required-by: