You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Introduction/Virtual_env.md
+43-39
Original file line number
Diff line number
Diff line change
@@ -4,18 +4,21 @@
4
4
5
5
Today, we will work in our machines, **not in the google colab or kaggle** and see how to do that.
6
6
7
-
To install libraries, we will use `Pip`. Other ways of doing that will be using `conda` (personally I use this method much more than `pip`).
7
+
Now, we will create a `virtual environment`. A virtual environment is a Python tool for `dependency management` and `project isolation`. They allow Python third party libraries to be installed locally in an isolated directory for a particular project. *So it works like an isolated box insode your machine for python.*
8
8
9
+
<!-- We will create **virtual environments** inside our machine so that different projects and versions of the packages do not get mmixed up. Virtual environments are like separate boxes inside your machine which do not intearct between each other. -->
9
10
10
-
## Conda
11
-
========
11
+
To install libraries, we will use `conda`, which will also be used to create virtual environments. Other ways of doing that will be using `Pip` to install packages and `venv` or some other method to create virtual environment,
12
12
13
-
Search `conda cheatsheet` and something like this will follow: https://docs.conda.io/projects/conda/en/latest/_downloads/843d9e0198f2a193a3484886fa28163c/conda-cheatsheet.pdf
13
+
After that, we will try to run n example repository from github (about nanoGPT).
14
14
15
+
# Conda
15
16
16
-
For windows user, go there https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html#regular-installation and install conda (miniconda for smaller size)
Goto https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html#regular-installation and install conda (miniconda for smaller size)
19
22
20
23
Install Anaconda or Miniconda normally, and let the installer add the conda installation of Python to your PATH environment variable. There is no need to set the PYTHONPATH environment variable.
21
24
@@ -25,51 +28,50 @@ To see if the conda installation of Python is in your PATH variable:
25
28
26
29
27
30
28
-
### After Installation
29
-
We will try `nanoGPT` (https://github.com/karpathy/nanoGPT) - not create code but use another person's code.
30
-
31
+
## After Installation, create virtual environement
32
+
We will try `nanoGPT` (https://github.com/karpathy/nanoGPT) and run somse of the examples - we will not create new code but use another person's code.
31
33
34
+
To do that, we will create a new virtual environment:
35
+
* Create environment
32
36
```bash
33
-
## Create environment
34
37
conda create --name ENVNAME
35
-
36
-
## Activate that environment
38
+
```
39
+
* Activate that environment
40
+
```bash
37
41
conda activate ENVNAME
38
42
```
39
43
40
-
###Install packages:
44
+
## Install packages:
41
45
42
-
* First, pytorch
46
+
* First, install pytorch according to this website: https://pytorch.org/get-started/locally/
Now, we will create a `virtual environment`. A virtual environment is a Python tool for `dependency management` and `project isolation`. They allow Python third party libraries to be installed locally in an isolated directory for a particular project. *So it works like an isolated box insode your machine for python.*
120
-
121
-
129
+
We will create **virtual environments** inside our machine so that different projects and versions of the packages do not get mmixed up.
0 commit comments