jmbejara / comp-econ-sp19

Main Course Repository for Computational Methods in Economics (Econ 21410, Spring 2019)
48 stars 26 forks source link

Installed scikit-misc but cannot be found #45

Closed jonhelium closed 5 years ago

jonhelium commented 5 years ago

Whenever I try to use 'method = loess' within geom_smooth() I receive the error "For loess smoothing, install 'scikit-misc'", but I already used the terminal to install 'scikit-misc' via 'pip install scikit-misc'. Is there something I'm missing such that 'loess' doesn't run?

jmbejara commented 5 years ago

That's strange. Try restarting jupyter completely. I can't say for sure. Maybe you could share the terminal output you get after you install 'scikit-misc'. We could try some other things after that

jonhelium commented 5 years ago

I tried restarting Jupyter and the kernel but the same error keeps appearing. Here is a screenshot of my terminal output after trying install 'scikit-misc' again:

pip scikit-misc

jmbejara commented 5 years ago

Hmm. You might have an issue of having multiple installations of python. Try running the following commands in the command line: which pip and which python. Do this in the regular command prompt and the anaconda command prompt. Copy and paste the results for each.

jonhelium commented 5 years ago

I've tried using which pip and which python in both the regular command prompt and Anaconda command prompt but neither seem to recognize whichas a command. which_error

jmbejara commented 5 years ago

Could you try the same thing with where ? If that doesn't work, it might be best to try to work through the issue in Ari's office hours tomorrow.

jonhelium commented 5 years ago

I tried using where and it does tell me where my installation of pip and python are... I don't think this indicates that I have multiple installs of Python but I wouldn't sure of that. where_pip_python

jmbejara commented 5 years ago

I'm assuming that you installed Anaconda and are using Anaconda. The path that is returned is not the default path for an Anaconda installation. It looks like you have a second installation of Python on your computer. (https://xkcd.com/1987/ :) ) Try these things:

jonhelium commented 5 years ago

I've tried the above after uninstalling a non-Anaconda version of Python but it doesn't seem like anything was resolved - there is now another more urgent issue of a Kernel error I am now receiving in every jupyter notebook: "FileNotFoundError: [WinError 2] The system cannot find the file specified" :(

Do I have to re-install Python again? Edit: Or could this possibly be an error with my PATH variables?

jmbejara commented 5 years ago

Oh no! Sorry this is such a pain. Ok. It seems like the issue is that Jupyter notebook has been configured to run with a different Python installation than the one that was installed by Anaconda. You need to change the settings to let Jupyter know to use the Anaconda one. Try this.

Here are my references:

jonhelium commented 5 years ago

Hooray!!! I followed the 1st four bullet points from above and now everything is working fine (including calling scikit-misc)! Thanks so much for helping out so much with these issues, really appreciate! :)