question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing required dependencies ['numpy'] on pandas 0.24.1

See original GitHub issue

Code Sample with obtained output

import pandas as pd
# --------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-7dd3504c366f> in <module>
----> 1 import pandas as pd

~/.local/lib/python3.6/site-packages/pandas/__init__.py in <module>
     17 if missing_dependencies:
     18     raise ImportError(
---> 19         "Missing required dependencies {0}".format(missing_dependencies))
     20 del hard_dependencies, dependency, missing_dependencies
     21 

ImportError: Missing required dependencies ['numpy']

pip3 show outputs

➜ pip3 show pandas
Name: pandas
Version: 0.24.1
Summary: Powerful data structures for data analysis, time series, and statistics
Home-page: http://pandas.pydata.org
Author: None
Author-email: None
License: BSD
Location: /home/skeletrox/.local/lib/python3.6/site-packages
Requires: numpy, python-dateutil, pytz

➜ pip3 show numpy
Name: numpy
Version: 1.16.1
Summary: NumPy is the fundamental package for array computing with Python.
Home-page: https://www.numpy.org
Author: Travis E. Oliphant et al.
Author-email: None
License: BSD
Location: /home/skeletrox/.local/lib/python3.6/site-packages
Requires: 

System

  • Linux Mint 19.1 Tessa
  • pip3 --version output: pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)

Problem description

Recently updated pandas using pip3 install -U pandas and tried running the code again, leading to the above issue.

Attempted Fixes

Tried reinstalling both numpy and pandas, and cleared cache so as to force pip3 to pull from remote.

➜ pip3 uninstall pandas && pip3 uninstall numpy && pip3 install numpy && pip3 install pandas

yet the issue remains consistent.

Expected result

Successful import of pandas

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:6

github_iconTop GitHub Comments

19reactions
Skeletroxcommented, Feb 14, 2019

Issue fixed; was an issue with multiple instances of numpy installed. Resolving that issue by repeatedly running pip3 uninstall numpy until none remained and then running pip3 install numpy allowed pandas to import it without any issues

4reactions
helco88commented, Mar 26, 2019

I fixed it!

First I had to uninstall pandas and numpy: $ pip3 uninstall numpy && pip3 uninstall pandas

and then I went to the folder: /home/helder/.local/lib/python3.6/site-packages/ and removed all folders of pandas and numpy.

Finally I installed all them again: $ pip3 install numpy && pip3 install pandas

After that everything is working!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python Pandas - Missing required dependencies ['numpy'] 1
How? Go to 'Environments' and type on the Search Packages box 'pandas'. Afterwards, check the version (if that column shows a blue number ......
Read more >
importerror: missing required dependencies ['numpy'] ( Lets Fix )
importerror: missing required dependencies ['numpy'] error occurs mainly because of incompatibility of numpy module in any python library.
Read more >
How to resolve Python error: missing required dependencies ...
Install numpy from the terminal · Install numpy using Anaconda and Conda · Upgrade both pandas and numpy to the latest version.
Read more >
AWS Lambda with Pandas and NumPy
Unable to import module 'lambda_function': Missing required dependencies ['numpy']. What? As you can see below, zip.zip archive includes NumPy.
Read more >
ImportError: Missing required dependencies ['numpy'] の対処
概要. windows10上のAnaconda3(python3系)環境でpandasを使用しようとしたところ、以下のエラーが出たため対処法についてメモしました。
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found