Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module not found error #69

Closed
vhkrish opened this issue Apr 24, 2018 · 5 comments
Closed

Module not found error #69

vhkrish opened this issue Apr 24, 2018 · 5 comments

Comments

@vhkrish
Copy link

vhkrish commented Apr 24, 2018

I keep getting this error message on jupyter notebook while running python 3.6. I stopped the kernel and restarted to check, but it won't. And suggestions?


ModuleNotFoundError Traceback (most recent call last)
in ()
----> 1 import missingno as msno
2 get_ipython().magic('matplotlib inline')
3 msno.matrix(collisions.sample(250))

ModuleNotFoundError: No module named 'missingno'

@ResidentMario
Copy link
Owner

The module is not installed in your environment. Run pip install missingno at the command line to fix that.

@vpolimenov
Copy link

This looks like a really cool package.
I just installed it in an Anaconda env:

(env)  me@mine-MacBook-Pro  ~  pip install missingno
Collecting missingno
  Downloading https://files.pythonhosted.org/packages/57/eb/9d7d55ceec57e0e374e70e9ad8d16795ba91960a3c987f3b5ee71d3e8e4d/missingno-0.4.1-py3-none-any.whl
Requirement already satisfied: scipy in /anaconda3/envs/bp/lib/python3.6/site-packages (from missingno) (1.1.0)
Requirement already satisfied: numpy in /anaconda3/envs/bp/lib/python3.6/site-packages (from missingno) (1.15.4)
Collecting seaborn (from missingno)
  Downloading https://files.pythonhosted.org/packages/a8/76/220ba4420459d9c4c9c9587c6ce607bf56c25b3d3d2de62056efe482dadc/seaborn-0.9.0-py3-none-any.whl (208kB)
    100% |████████████████████████████████| 215kB 3.2MB/s
Collecting matplotlib (from missingno)
  Downloading https://files.pythonhosted.org/packages/82/7e/184d995d711e3401722769cd6982b46d42aee14a82ba54a3a79425f939c9/matplotlib-3.0.3-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (14.3MB)
    100% |████████████████████████████████| 14.3MB 1.9MB/s
Requirement already satisfied: pandas>=0.15.2 in /anaconda3/envs/bp/lib/python3.6/site-packages (from seaborn->missingno) (0.23.4)
Collecting cycler>=0.10 (from matplotlib->missingno)
  Using cached https://files.pythonhosted.org/packages/f7/d2/e07d3ebb2bd7af696440ce7e754c59dd546ffe1bbe732c8ab68b9c834e61/cycler-0.10.0-py2.py3-none-any.whl
Collecting kiwisolver>=1.0.1 (from matplotlib->missingno)
  Downloading https://files.pythonhosted.org/packages/fb/96/619db9bf08f652790fa9f3c3884a67dc43da4bdaa185a5aa2117eb4651e1/kiwisolver-1.0.1-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (108kB)
    100% |████████████████████████████████| 112kB 23.2MB/s
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 (from matplotlib->missingno)
  Downloading https://files.pythonhosted.org/packages/de/0a/001be530836743d8be6c2d85069f46fecf84ac6c18c7f5fb8125ee11d854/pyparsing-2.3.1-py2.py3-none-any.whl (61kB)
    100% |████████████████████████████████| 71kB 13.1MB/s
Requirement already satisfied: python-dateutil>=2.1 in /anaconda3/envs/bp/lib/python3.6/site-packages (from matplotlib->missingno) (2.8.0)
Requirement already satisfied: pytz>=2011k in /anaconda3/envs/bp/lib/python3.6/site-packages (from pandas>=0.15.2->seaborn->missingno) (2018.9)
Requirement already satisfied: six in /anaconda3/envs/bp/lib/python3.6/site-packages (from cycler>=0.10->matplotlib->missingno) (1.12.0)
Requirement already satisfied: setuptools in /anaconda3/envs/bp/lib/python3.6/site-packages (from kiwisolver>=1.0.1->matplotlib->missingno) (40.8.0)
Installing collected packages: cycler, kiwisolver, pyparsing, matplotlib, seaborn, missingno
Successfully installed cycler-0.10.0 kiwisolver-1.0.1 matplotlib-3.0.3 missingno-0.4.1 pyparsing-2.3.1 seaborn-0.9.0

And when I get into python shell:

(env)  me@mine-MacBook-Pro  ~  python
Python 3.6.8 |Anaconda, Inc.| (default, Dec 29 2018, 19:04:46)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import missinggno as msno
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'missinggno'
>>> import missingno as msno
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/anaconda3/envs/bp/lib/python3.6/site-packages/missingno/__init__.py", line 1, in <module>
    from .missingno import matrix
  File "/anaconda3/envs/bp/lib/python3.6/site-packages/missingno/missingno.py", line 4, in <module>
    import matplotlib.pyplot as plt
  File "/anaconda3/envs/bp/lib/python3.6/site-packages/matplotlib/pyplot.py", line 2372, in <module>
    switch_backend(rcParams["backend"])
  File "/anaconda3/envs/bp/lib/python3.6/site-packages/matplotlib/pyplot.py", line 207, in switch_backend
    backend_mod = importlib.import_module(backend_name)
  File "/anaconda3/envs/bp/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/anaconda3/envs/bp/lib/python3.6/site-packages/matplotlib/backends/backend_macosx.py", line 14, in <module>
    from matplotlib.backends import _macosx
ImportError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are using (Ana)Conda please install python.app and replace the use of 'python' with 'pythonw'. See 'Working with Matplotlib on OSX' in the Matplotlib FAQ for more information.
>>>

It's the first time I saw this error.
However, it was an easy fix - https://stackoverflow.com/a/44912322/5094841

Now I can import the package in a python shell, but cannot in a Jupyter Notebook. Am I missing something?

@ResidentMario
Copy link
Owner

ResidentMario commented Mar 21, 2019 via email

@vpolimenov
Copy link

Yes.

I believe it's something with the environment, though.

@vpolimenov
Copy link

Managed to solve the issue thanks to this thread

  1. Activate your environment
  2. Make sure you have jupyter installed in that environment - pip install jupyter
  3. source deactivate
  4. source activate <your_environment>

You should be fine. ❤️

Thanks for the great package!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants