Conda packages in .local

Viewed 253

I am using miniconda to create several environments, all of which with Python 3.7. I found that for each env, the installed packages go to .local path, which means for different envs of Python 3.7, they share the same collections of packages.

For example:

Python 3.7.7 (default, May  7 2020, 21:25:33)  [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> np.__file__ '/home/my_name/.local/lib/python3.7/site-packages/numpy/__init__.py'

I suppose the installed packages should be in miniconda's directory, not my local .local directory.

1 Answers

How are you installing the packages? Are you using ‘conda env create’ for each new environment? You may need to check that the ‘base’ conda environment is running on your terminal, maybe you are using the default python interpreter instead of miniconda.

Also, if you are don’t have a specific reason to use conda, and just want it to manage virtual environments and packages, I would suggest that you try ‘pipenv’ instead. I found it to be simpler than conda and isolates pretty well the virtual environments.

Related