Notepad/enter/Coding Tips (Classical)/Terminal Tips/Languages/Python/tools/Environments/conda/Conda.md

51 lines
2.4 KiB
Markdown
Raw Normal View History

2023-07-05 18:29:11 +00:00
So basically conda has a lot of stuff...
It is the virtual environment of choice used by machine learning and data science people and it can even be compatible with other languages such as R, Julia, and many more. So it has a lot of packages that it comes built in with like a whole UI called Ananconda which is all pretty nifty.
###### About Conda
This is what my "conda" looks like when I open the full anaconda:
![[Pasted image 20221117183151.png]]
So much stuff! So it is of no curiosity to see why those that want to get computations done choose Anaconda as it is a full system that compiles programs in an easy to read manner.
A bit of a pitfall is the whole anaconda app may take up a significant portion of space on your laptop, which for my Macbook Air, I am also always wary of in order to get as much as I can in a simple way through it.
---
Regardless, I've needed to use it multiple times now so I'll add helpful tips here:
## Helpful tips!
- Conda is its own project thats unrelated to `pip`. You can set it up on your system using the [Miniconda installer](https://docs.conda.io/en/latest/miniconda.html), which brings along the minimal requirements for running `conda` on your system.
- how to [create](https://docs.conda.io/projects/conda/en/latest/commands/create.html) environments after installation
- the official docs on maintaining a conda environment is found here
Create a conda environment
```
conda create -n <venv-name>
```
Via `conda create` there's a bunch of options actually too:
~~~
usage: conda create [-h] [--clone ENV] (-n ENVIRONMENT | -p PATH) [-c CHANNEL]
[--use-local] [--override-channels]
[--repodata-fn REPODATA_FNS] [--strict-channel-priority]
[--no-channel-priority] [--no-deps | --only-deps]
[--no-pin] [--copy] [-C] [-k] [--offline] [-d] [--json]
[-q] [-v] [-y] [--download-only] [--show-channel-urls]
[--file FILE] [--no-default-packages]
[--solver {classic} | --experimental-solver {classic}]
[--dev]
[package_spec [package_spec ...]]
~~~
Create an environment (env2) as a clone of an existing environment (env1):
~~~
conda create -n env2 --clone path/to/file/env1
~~~
Create an environment containing the package 'sqlite':
~~~
conda create -n myenv sqlite
~~~