0

So I had lots of stuff working well for Python on a Mac OSX. But matplotlib was out of date. I tried to update, failed. So I uninstalled anaconda, and reinstalled. That was not my brightest idea. Several things have changed. Most obviously (base) now appears before my terminal prompt. But more significantly, my installation of sphinx seems to not be working:

(base) MU00062871X:~ me$ sphinx-autobuild . _build/html

-bash: sphinx-autobuild: command not found

Okay, that's problematic because I kind of depend on sphinx for handling some documentation. So, let's try reinstalling it with pip: nope, sphinx is already there:

Requirement already satisfied: pytz>=2015.7 in /opt/anaconda3/lib/python3.7/site-packages (from babel!=2.0,>=1.3->sphinx) (2019.3)

Alright, perhaps something happened to my .bash_profile... Oh yeah, it looks like my Anaconda and Canopy installations are at war.

# added by Anaconda 2.1.0 installer
export PATH="/Users/me/anaconda/bin:$PATH"


# Added by Canopy installer on 2016-08-08
# VIRTUAL_ENV_DISABLE_PROMPT can be set to '' to make the bash prompt show that Canopy is active, otherwise 1
#alias activate_canopy="source '/Users/jomiller/Library/Enthought/Canopy_64bit/User/bin/activate'"
#VIRTUAL_ENV_DISABLE_PROMPT=1 source '/Users/me/Library/Enthought/Canopy_64bit/User/bin/activate'

# added by Anaconda3 4.3.1 installer
export PATH="/Applications/anaconda/bin:$PATH"

export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/Cellar/libffi/3.2.1/lib/pkgconfig/"
# added by Anaconda3 2019.10 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/opt/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
    \eval "$__conda_setup"
else
    if [ -f "/opt/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/opt/anaconda3/etc/profile.d/conda.sh"
        CONDA_CHANGEPS1=false conda activate base
    else
        \export PATH="/opt/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda init <<<

My main concern is how to get sphinx working again. But secondarily, I'd like (base) to no longer appear.

Suggestions?

edit I've discovered that I also had sphinx at

./anaconda/lib/python2.7/site-packages

I've now used pip to upgrade. So now it sits at:

/usr/local/lib/python3.7/site-packages

But if I type sphinx at the command prompt, I get

-bash: sphinx: command not found

I haven't worked with paths etc in years, so I don't know what's going on here. It really seems that it's all there, but I can't figure out how to get it to run. I just need one of these to work...

Community
  • 1
  • 1
Joel
  • 22,598
  • 6
  • 69
  • 93
  • If you just don't want Conda to edit the PS1, then [see this question](https://stackoverflow.com/q/55171696/570918) (OP has solution for stopping it generally; accepted answer has solution for conditionally preventing for **base**). If you don't want auto-activation, then [see this question](https://stackoverflow.com/a/54560785/570918). Either way, you should remove the `export PATH` commands left behind by the previous Anaconda installs. The new bash code handles that. Not sure about the Sphinx stuff. – merv Jan 21 '20 at 15:08

0 Answers0