I checked the method of importing this package on the Internet, and I also entered the pip command in cmd, but it still cannot be imported. May I ask why?
Asked
Active
Viewed 62 times
2 Answers
0
Probably because the kernel of your jupyterhub has not the right environment.
Try to reinstall the package using the terminal of jupyter hub (see new drop box) it will do the trick once you have installed the package and refreshed the kernel.

jlandercy
- 7,183
- 1
- 39
- 57
0
Try this on your Jupyter cell:
pip install git+https://github.com/ematvey/pybacktest.git
Link to github https://github.com/ematvey/pybacktest
Edit for your comment:
run the below command on your Jupyter cell.
pip install pandas_datareader

Talha Tayyab
- 8,111
- 25
- 27
- 44
-
Hello, I tried to enter the command you said, but another error message popped up, how can I debug ? ImportError: No module named 'pandas_datareader' – Jeff Hung Jun 12 '22 at 15:51
-
what is the message? – Talha Tayyab Jun 12 '22 at 15:52
-
@JeffHung now check if `data_reader` works for you? – Talha Tayyab Jun 12 '22 at 16:37
-
@TalhaTayyab, please don't recommend using an exclamation point with `pip` or `conda` any longer. Always suggest using the magic indicator in front of pip, so `%pip install ...`. Your advice is outdated if you are suggesting the exclamation point. Magics were added recently so that installations from within a notebook get installed to **the correct** environment backing the notebook. Exclamation point was causing all sorts of problems. See [here](https://discourse.jupyter.org/t/why-users-can-install-modules-from-pip-but-not-from-conda/10722/4?u=fomightez) about these modern magic commands. – Wayne Jun 12 '22 at 17:52
-
@TalhaTayyab , often no symbol is also better in front of `pip` or `conda` than an exclamation point these days inside a cell in a notebook because automagics are usually on by default in modern installations these days. And so without any symbol, the modern magic command gets used by default. – Wayne Jun 12 '22 at 17:54