- Use
uv!
- Windows: miniconda. Check also WSL on Windows.
- macOS: Check DS & ML with Mac M-chip and use miniconda.
- Linux: miniconda.
Use
uv instead!Install packages with requirement file,
Other packages to use: python3-venv, pyenv.
uv!uv instead!1python -m pip install --user --upgrade pip # install for current user only
2python -m pip install --upgrade pip # need to run cmder as administrator1# INSTALL A PACKAGE
2pip install <package> # admin <-- SHOULDN'T!!!
3pip install --user <package> # current user only
41# LIST ALL INSTALLED PACKAGES
2pip freeze1# REMOVE
2pip uninstall <package>
3pip uninstall --user <package1# CHECK VERSION OF A PACKAGE
2pip show <package>1# version <=
2pip3 install -U "pillow<7"1# Install a package from a git repository
2pip install git+https://github.com/TimeSynth/TimeSynth.git1pip install -r requirements.txt1# UPDATE CONDA
2conda --version # check version
3conda update -n base -c defaults conda1# Create a new environment with python version 3.7
2conda create -n env_name python=3.101# activate this env
2source activate env_name
3# on macos
4conda activate env_name1# Rename an env (conda >= 4.14)
2conda rename -n old_name -d new_name1# remove an env
2conda remove --name env_name --all1# list all env
2conda info --envs
3# or
4conda env list1# EXPORT env list TO A ENV FILE
2conda env export -f <file>.yml1# Update packages listed in an env file to current env,
2conda env update -n <env> -f /path/to/<file>.yml --prune1# UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 975: ordinal not
2# solution: instead of
3pip3 install sesd
4# use
5LC_ALL=C.UTF-8 pip3 install sesd1# conda: The following packages are not available from current channels:
2# Solution 1: One can use pip in this case (the same env with conda)
3# Solution 2:
4conda install -c anaconda <package>1# The following required packages can not be built: * freetype (from matplotlib)
2# try to use conda to install matplotlib
3conda install matplotlib
4# it actually install the same thing as pip does on the same env1# dtaidistance: C-library is not available
2pip install -vvv --upgrade --force-reinstall dtaidistance1# zsh: command not found: conda
2# Make sure your installation folder is already
3# in the $PATH
4export PATH="/home/thi/miniconda3/bin:$PATH"