简体   繁体   中英

How to install chartify on jupyter notebook?

I am unable to install and use spotify's visualization module which is called chartify. https://github.com/spotify/chartify

In the installation it claims I only need to pip3 install it which I did using cmd. Now I have opened my jupyter notebook, and when I try to import the module it can not find it.

import chartify

I expect the module to be imported but instead i get the following

--------ModuleNotFoundError         Traceback (most recent call last)
<ipython-input-32-e4ea3e2db907> in <module>()
----> 1 import chartify

ModuleNotFoundError: No module named 'chartify'

Open a notebook, and enter

import sys
!{sys.executable} -m pip install chartify

into a code cell, execute it, and see how it goes.

It might not work due to missing permissions, but that is fixable.

we get ModuleNotFoundError: No module named 'chartify' error when the library is not installed .... so i request you to run

pip install chartify

or

conda install chartify

... and then try to import it...... I guess you dont have it installed or downloaded it yet

Although the question is old, just for the sake of anyone else who may be reading this: The recommended way of using pip is

python -m pip install <packagename>

Also if you are on Linux (which I'm guessing coz you are typing pip3 and not specified the os) it is recommended that you create a virtual environment to avoid having packages installed for your system python installation.

The reason you do this, on Linux specially is if you have programs which run on python will install a specific version of python for your system. In cases like this where either the package on version of python changes which causes incompatibility between packages, python or the installed program will become a mess to fix.

Always make a virtual enviornment with:

python -m venv <ENV_NAME>
cd <ENV_NAME>
.\bin\activate
python -m pip install <packagename>

When you are done working on the project just do:

deactivate

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM