Simply removing the python
symlink from ~/miniconda3/bin/
appears to do the job.
$ which python
/home/naught101/miniconda3/bin/python
$ rm /home/naught101/miniconda3/bin/python
$ which python
/usr/bin/python
$ source activate science
discarding /home/naught101/miniconda3/bin from PATH
prepending /home/naught101/miniconda3/envs/science/bin to PATH
(science)$ which python
/home/naught101/miniconda3/envs/science/bin/python
(science)$ source deactivate
discarding /home/naught101/miniconda3/envs/science/bin from PATH
$ which python
/usr/bin/python
So far, this doesn't seem to have caused me any problems. Unfortunately the same doesn't work for ~/miniconda/bin/python3
, because conda requires it when switching to other envs that use the same python version. However, that one hasn't caused as many problems in the first place.
If this does cause problems, it's easy enough to undo, just cd ~/miniconda/bin/; ln -s python3 python
(or what ever version of python you're using in your conda root env). You may need to activate/deactivate an env to get that version of python back on your PATH.
!#/bin/env python
at the start of the main script will fail if run from the command line (because it's expecting python 2, which is still the default). My.profile
and.zshrc
both have the lines# added by Miniconda3 3.9.1 installer ; export PATH="/home/naught101/miniconda3/bin:$PATH"
in them, so conda is enabled in all shells by default. – Aubinegrep -Hn 'env python' /usr/bin/*
. For examplefslint-gui
. Yes, it's probably better that those packages specify the python version, but I suspect that there are a lot of packages that don't in the ubuntu repos, on the basis that python2 is default and can be expected. I feel like it should be possible to completely disable conda, and use only the system python install. I guess I could probably just/home/naught101/miniconda3/bin/python
, but I'm not sure if that has other consequences. – Aubine