[PYTHON] The story that the Homebrew environment was blown away when Anaconda was installed

When I built the python environment with Anaconda, there was a problem with the environment created with homebrew. I did a lot of research before putting it in, but I didn't know it, so I'll leave it as a rut.

environment

MacOS X Yosemite homebrew, Anaconda ← Danger of mixing

Originally, an environment where you built an environment such as Node.js using homebrew and played with hubot. Recently, I created a Python environment in Anaconda to try out the topic TensorFlow, and started running the tutorial a little.

After a long time hitting the npm command ...

-bash: npm: command not found



 What! ??


## help! brew doctor!
 A brew doctor in case of trouble. There is a warning.

Warning: Anaconda is known to frequently break Homebrew builds, including Vim and MacVim, due to bundling many duplicates of system and Homebrew-available tools.

If you encounter a build failure please temporarily remove Anaconda from your $PATH and attempt the build again prior to reporting the failure to us. Thanks!

Warning: "config" scripts exist outside your system or Homebrew directories. ./configure scripts often look for *config scripts to determine if software packages are installed, and what additional flags to use when compiling and linking.

Having additional scripts in your path can confuse software installed via Homebrew if the config script overrides a system or Homebrew provided script of the same name. We found the following "config" scripts: /Users/spiky00/anaconda/bin/curl-config /Users/spiky00/anaconda/bin/freetype-config /Users/spiky00/anaconda/bin/libdynd-config /Users/spiky00/anaconda/bin/libpng-config /Users/spiky00/anaconda/bin/libpng16-config /Users/spiky00/anaconda/bin/python-config /Users/spiky00/anaconda/bin/python2-config /Users/spiky00/anaconda/bin/python2.7-config /Users/spiky00/anaconda/bin/xml2-config /Users/spiky00/anaconda/bin/xslt-config

 Apparently Anaconda uses a config with the same name as Homebrew, which seems to break the build. eh

## solved!
 Remove Anaconda from the environment variables and reset the originally set $ PATH.

vi ~/.bash_profile


added by Anaconda2 2.4.1 installer

export PATH="/Users/spiky00/anaconda/bin:$PATH"


 Found a snake. And my Node environment is here ...

 this…

added by Anaconda2 2.4.1 installer

export PATH="/Users/spiky00/anaconda/bin:$PATH"

 thus…

export PATH=HOME/.nodebrew/current/bin:PATH

added by Anaconda2 2.4.1 installer

export PATH="/Users/spiky00/anaconda/bin:$PATH"

 This is it!


 A neat solution. I haven't tried it yet, but if you change your PATH, you should still be able to use the Anaconda environment.
 I was wondering what to do when the environment broke, but I'm glad it was surprisingly easy!
 Speaking of which, I think there was some warning when I put in Anaconda ... maybe that ...?


Recommended Posts

The story that the Homebrew environment was blown away when Anaconda was installed
The story that XGBoost was finally installed
The story that the guard was confined when the laboratory was converted to IoT
A story that was convenient when I tried using the python ip address module
Solved the problem that MacVim installed by Homebrew was not built by python of pyenv
The story that the return value of tape.gradient () was None
The story that Japanese output was confused with Django
A story about PHP that was okay in the development environment but buggy in the production environment LEVEL 1-3 + 1
How to delete "(base)" that appears in the terminal when Anaconda is installed on Mac
The story that my pull request was incorporated into Scipy
The story that the new drawing library "HiPlot" was pretty good
A story that stumbled when using pip in a proxy environment
[Anaconda] Activate the virtual environment
The story that the version of python 3.7.7 was not adapted to Heroku
The story that a hash error came out when using Pipenv
Jupyter Notebook 6.0.2 cannot be installed in the Python 2.7 environment created in Anaconda
[Windows + anaconda] Automatically activate the environment when the command prompt is started
Commands that were important when building the Laravel environment in the Apache environment (Note)
Asynchronous API that combines API Gateway and Step Functions was the strongest story
What to do when the warning "The environment is in consistent ..." appears in the Anaconda environment
The story that Apache dealt with because it was down at AH00144