-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMiniConda_Install
More file actions
50 lines (33 loc) · 1.36 KB
/
Copy pathMiniConda_Install
File metadata and controls
50 lines (33 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#How to Install Miniconda on Ubuntu
sudo apt update
sudo apt upgrade
#Download Miniconda
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o Miniconda3-latest-Linux-x86_64.sh
chmod +x Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
#Hit the Enter key to start the installation process. Soon, the installer will ask to accept the License, press q, and then type Yes to accept it.
export PATH=$PATH:/home/cyberithub/miniconda3/bin
echo $PATH
conda --version
conda install boto3
conda -h
conda create -n CondaName
conda env list
conda activate CondaName
2. Create a virtual environment using venv or virtualenv
Make sure venv is installed by running:
sudo apt install python3-venv
To create a new virtual environment in a directory named env, run:
python3 -m venv env
To activate this virtual environment (which modifies the PATH environment variable), run this:
source env/bin/activate
Now you can install a library like requests in this virtual environment:
pip install requests
The files will get installed under the env/ directory.
If you want to leave the virtual environment, you can run:
deactivate
If you don't want to run source env/bin/activate and deactivate, then you can run the executable by prefixing its path, like this:
$ env/bin/pip install requests
$ env/bin/python3
>>> import request
>>> help(requests)