5

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?
Colin Rowat
  • 205
  • 2
  • 7
  • 1
    try pipenv, for quick experimentation virtualenv is also good – Vikas Mulaje May 20 '20 at 05:19
  • Thanks both! Can either of you recommend a search term e.g. "docker/pipenv/virtualenv and _prototyping_" or an introductory article/tutorial? I've been hacking around with Python for a bit, but want to start to understand the context for what I'm doing. – Colin Rowat May 20 '20 at 05:35

1 Answers1

2

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.

Seb Wills
  • 834
  • 9
  • 11