How to install packages
- Using brew, Homebrew/Linuxbrew
- Download Github Repository Homebrew from Link
- Install it under
~/.homebrew
- Write the file location to the
bashrc
fileexport PATH="[home path]/.homebrew/bin:$PATH"
- Install like:
brew install [package name]
Create Python venv for development
-
Install python and python3-venv Package:
Use the following command to install the python3-venv package:sudo apt-get install python3.8-venv
-
Recreate the Virtual Environment:
Once you've installed the necessary package, try creating your virtual environment again:python3.8 -m venv ml-isa-env [or] pip3 install virtualenv virtualenv -p /usr/bin/python3.6 venv
-
Activate the Virtual Environment:
After successfully creating the virtual environment, you can activate it using:Copy code source ml-isa-env/bin/activate
Your command prompt should change to indicate that you are now working inside the
ml-isa-env
virtual environment. -
Deactivate Virtual Environment:
Once you're done working in the virtual environment and want to go back to the global Python, you can deactivate it by simply typing:deactivate
-
if in the system there is no global python is installed, create a local python version to create the virtual env
[home name]@lance:~/PyEnv/ml-isa-env$ pyenv install 3.10
Downloading Python-3.10.13.tar.xz...
-> https://www.python.org/ftp/python/3.10.13/Python-3.10.13.tar.xz
Installing Python-3.10.13...
Installed Python-3.10.13 to /home/[home name]/.pyenv/versions/3.10.13
标签:Development,13,rootless,3.10,enviroment,python,Python,venv,install
From: https://www.cnblogs.com/holylandofdora/p/18007332