0

Using the latest miniconda2 I created a conda environment & then did all my conda package installs. Then when I finished I realized I had FORGOT TO ACTIVATE the environment (I'm dizzy) with the command

source activate myenv

so all my conda installs went into the local/system wide environment. I simply did

conda uninstall package-name

for all the packages but I'm certain not all the dependencies were removed. For example, conda install of matplotlib showed

The following NEW packages will be INSTALLED:

cycler:           0.10.0-py36_0    
dbus:             1.10.20-0        
expat:            2.1.0-0          
fontconfig:       2.12.1-3         
freetype:         2.5.5-2          
glib:             2.50.2-1         
gst-plugins-base: 1.8.0-0          
gstreamer:        1.8.0-0          
icu:              54.1-0           
jpeg:             9b-0             
libffi:           3.2.1-1          
libgcc:           5.2.0-0          
libiconv:         1.14-0           
libpng:           1.6.30-1         
libxcb:           1.12-1           
libxml2:          2.9.4-0          
matplotlib:       2.0.2-np113py36_0
pcre:             8.39-1           
pyparsing:        2.2.0-py36_0     
pyqt:             5.6.0-py36_2     
qt:               5.6.2-5          
sip:              4.18-py36_0

which conda shows

/home/cargo/miniconda2/bin/conda

First I created the environment

conda create -n myenv python=3

Then I did all the conda installs

conda install numpy
conda install pandas
.
.
conda install statsmodels

Then I realized I failed to activate the environment b/c the terminal prompt was

cargo@cargo-VirtualBox:~$  INSTEAD OF (myenv)cargo@cargo-VirtualBox:~$

The terminal prompt is what got my attention before I even tried to do anything else; I'm 110% certain I didn't activate the environment as I can't find the command in the bash history. Next I did uninstalls for all the conda packages as stated above. I guess it's good now that I no longer see the python3 packages in the local/root environment but I can't explain/understand why?

conda list
# packages in environment at /home/cargo/miniconda2:
#
asn1crypto                0.22.0                   py27_0  
beautifulsoup4            4.6.0                     <pip>
cairo                     1.14.8                        0  
cffi                      1.10.0                   py27_0  
.
.
wheel                     0.29.0                   py27_0  
yaml                      0.1.6                         0  
zlib                      1.2.8                         3  
cargo@cargo-VirtualBox:~$ 
JC23
  • 1,248
  • 4
  • 18
  • 28
  • What is the output of `which conda`? – darthbith Sep 15 '17 at 10:38
  • Thanks @darthbith, see my edit above. – JC23 Sep 15 '17 at 14:38
  • I'm very confused why you have Python 3.6 packages being installed into Miniconda 2. Did you create and activate a new environment before running the install matplotlib command? – darthbith Sep 15 '17 at 20:44
  • Miniconda2 supports python 2 and 3 @darthbith, all you need to do is add python=3 to the end when creating an environment. No I did NOT activate the conda environment so all the conda installs went into the local environment. – JC23 Sep 16 '17 at 00:18
  • Right, that's exactly my question. If you're using the default (root) environment for Miniconda 2, that is a Python 2 install. So why is it installing Python 3 packages? So, you must either have activated the environment, or you're not using Miniconda 2 (but you installed it in `/home/cargo/miniconda2` for some reason). Can you please edit in (to the best of your memory) what commands you ran from the beginning of this install/uninstall process? – darthbith Sep 17 '17 at 14:30
  • Just added the edits @darthbith. – JC23 Sep 18 '17 at 16:53
  • Your `conda install matplotlib` command *must* have been after you activated your Python 3 environment, otherwise it would not select Python 3 packages for install. Regardless, your root Python 2 environment looks normal, so I don't think you have any problems at all. Simply create your new environment, remember to activate it, and you're on your way! :-) – darthbith Sep 18 '17 at 18:21

0 Answers0