Colin Rowat
Colin Rowat

Reputation: 205

alternatives to conda install for quick experimenting?

Yesterday, I wanted to work through a tutorial that uses metaknowledge. (Python 3 under Anaconda; Win 10.)

So, conda install -c conda-forge metaknowledge into an almost fresh env and, a day later, I am 22% of my way through examining conflicts.

Is there a smarter way to proceed?

  1. how much faster would this be if I conda create every time I wanted to play with a new package?
  2. miniconda?
  3. mamba?

Upvotes: 5

Views: 5940

Answers (1)

Seb Wills
Seb Wills

Reputation: 842

You can install packages using pip inside conda even though it is not the preferred method for packages that exist in conda. This method may avoid whatever is causing your conda install to be unusably slow.

According to the docs:

  • There is no need to worry about creating a venv or virtualenv (older and newer styles of python virtual environments) for pip to install the package into because a conda environment is already a virtualenv
  • Once you are in the conda environment you want to install the package into, just pip install <package>

This question has some related tips.

Using a fresh conda environment also might help if the slowness is due to having a vast number of packages, or a problematic package, already in the environment. The purpose of virtual environments is to isolate the set of packages installed so other projects can't be impacted, and so you are clear which packages you are potentially using. Whether you create a fresh environment for each experiment, or do all your experiments in a common environment which gradually accumulates packages in it, is up to you.

Upvotes: 2

Related Questions