I\'m on a Mac, and I installed numpy and sklearn in that order. Now, I\'m faced with these errors that have already been mentioned on SO several t
To solve this, I did the following: (note that it is not entirely clear to me which of these solved the problem, since I didn't test thoroughly).
1) Installed python at Python.org instead of Mac's stupid version
2) re-installed all of the modules like numpy, scipy, matplotlib, sklearn and ran this:hash -r python according to this source: Symbol not found: __PyCodecInfo_GetIncrementalDecoder, because it doesn't make python use the cached versions of the modules.
3) Then, I realized that I had this issue: https://github.com/scipy/scipy/issues/5093. To solve it, I had to make sure I installed the scipy module using python -m pip install scipy='0.15.0' instead of just pip install scipy='0.15.0', because this solved the issue based on this source: Can't load Python modules installed via pip from site-packages directory.
So, in conclusion it turns out there really is a big different between what is installed by pip, and what is imported when python is executed from the terminal. So, to ensure that you are using the pip to install the modules into a particular python, you can use python -m pip install .