Setting anaconda Flashcards

1
Q

How to install a package with anaconda?

A
  • conda install package_name

- To install package with the version numpy=1.10

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to delete, update, search packages with anaconda?

A
  • conda remove package_name
  • conda update package_name
  • conda update –all
  • conda search beautifulsoup
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How to create and delete an environment?

A
  • conda create -n env_name list of packages

- conda env remove -n env_name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to enter an environment?

A
  • source activate my_env

- to exit environment source deactivate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to list all environments?

A

conda env list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Tips for using anaconda?

A
  • separate environments for Python 2 and Python 3. I used conda create -n py2 python=2 and conda create -n py3 python=3
  • create environments for each project I’m working on
  • When sharing your code on GitHub, it’s good practice to make an environment file
  • I also usually include a pip requirements.txt file using pip freeze for people not using conda
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Why use conda?

A
  • solved a lot of issues I had dealing with packages and multiple Python versions
  • Environments allow you to separate and isolate the packages you are using for different projects. Often you’ll be working with code that depends on different versions of some library.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly