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.

Numpy 1.11.2 fails as a pandas dependency.

See original GitHub issue

Numpy fails to serve as a dependency for pandas.

I was trying to use pandas (installed the binaries and dependencies using conda, then using pip, then built then using no-binaries option); still getting error.

Numpy is available (1.11.2). I understand some interface is not provided by numpy anymore. Python version I am using is 2.7.11. List of packages installed are bellow.

Error message: C:…Miniconda2\lib\site-packages\numpy\core__init__.py:14: Warning: Numpy built with MINGW-W64 on Windows 64 bits is experimental, and only available for testing. You are advised not to use it for production.

CRASHES ARE TO BE EXPECTED - PLEASE REPORT THEM TO NUMPY DEVELOPERS from . import multiarray Traceback (most recent call last): File “io.py”, line 2, in <module> from data import support File “…\support.py”, line 3, in <module> import pandas File “…Miniconda2\lib\site-packages\pandas__init__.py”, line 18, in <module> raise ImportError(“Missing required dependencies {0}”.format(missing_dependencies)) ImportError: Missing required dependencies [‘numpy’]

Code that generates the error is really simple:

import cPickle as pickle
import pandas
from sklearn import preprocessing

def loadDataset(filename = '../../../../data_scaled.csv'):
    data_scaled = pandas.read_csv(filename)
    data_scaled = pandas.DataFrame(data_scaled)
    data_scaled.drop('Unnamed: 0', 1, inplace=True)
    return data_scaled

def scale(data):
    df = data.copy()
    df.drop('IDELSA', 1, inplace=True, errors='ignore')
    column_names = df.columns
    scaler = preprocessing.StandardScaler()
    df = scaler.fit_transform(df)
    df = pandas.DataFrame(df)
    df.columns = column_names

    return [df, scaler]


def scale_min_max(data, min_p=0, max_p=1):
    df = data.copy()
    df.drop('IDELSA', 1, inplace=True)
    column_names = df.columns
    scaler = preprocessing.MinMaxScaler(feature_range=[min_p,max_p])
    df = scaler.fit_transform(df)
    df = pandas.DataFrame(df)
    df.columns = column_names

    return [df, scaler]


def openFile(filename):
    with open(filename, "rb") as input_file:
        f = pickle.load(input_file)
    return f


def save_object(obj, filename):
    with open(filename, 'wb') as output:
        pickle.dump(obj, output, pickle.HIGHEST_PROTOCOL)

packages installed (conda and pip) C:>pip list appdirs (1.4.0) backports-abc (0.4) backports.ssl-match-hostname (3.4.0.2) BeautifulSoup (3.2.1) beautifulsoup4 (4.5.1) Bottleneck (1.1.0) bs4 (0.0.1) cffi (1.8.3) colorama (0.3.7) conda (4.2.9) cryptography (1.5.2) cycler (0.10.0) Cython (0.24.1) deap (1.0.2) decorator (4.0.9) enum34 (1.1.6) hyperopt (0.0.2) idna (2.1) imbalanced-learn (0.1.8) inflection (0.3.1) ipaddress (1.0.17) ipykernel (4.3.1) ipython (4.1.2) ipython-genutils (0.1.0) ipywidgets (4.1.1) Jinja2 (2.8) jsonschema (2.4.0) jupyter (1.0.0) jupyter-client (4.2.2) jupyter-console (4.1.1) jupyter-core (4.1.0) MarkupSafe (0.23) matplotlib (1.5.3) menuinst (1.3.2) mistune (0.7.2) more-itertools (2.2) nbconvert (4.1.0) nbformat (4.0.1) ndg-httpsclient (0.3.3) nose (1.3.7) notebook (4.1.0) numexpr (2.6.1) numpy (1.11.2) Optunity (1.1.1) pandas (0.19.0) path.py (0.0.0) pickleshare (0.5) pip (8.1.2) plotly (1.12.2) py (1.4.31) pyasn1 (0.1.9) pycosat (0.6.1) pycparser (2.14) pycrypto (2.6.1) pycuda (2016.1.2+cuda7518) pydot (1.2.2) Pygments (2.1.1) pyOpenSSL (0.14) pyparsing (2.1.9) pyreadline (2.1) pytest (2.9.2) python-dateutil (2.5.1) pytools (2016.2.1) pytz (2016.3) PyYAML (3.11) pyzmq (15.2.0) qtconsole (4.2.1) requests (2.11.1) ruamel-yaml (-VERSION) scikit-learn (0.18) scipy (0.18.1) selenium (2.53.6) setuptools (20.3) simplegeneric (0.8.1) singledispatch (3.4.0.3) six (1.10.0) Theano (0.8.2) tornado (4.3) TPOT (0.4.1) tqdm (4.8.3) traitlets (4.2.1) update-checker (0.12) urllib3 (1.18) wheel (0.29.0)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
MuffintopBikinicommented, Feb 13, 2018

I’m having the exact same issue.

1reaction
aniketanvitcommented, Jun 5, 2018

Same issue…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Numpy fails to serve as a dependency for pandas
Show activity on this post. I was trying to use pandas (installed the binaries and dependencies using conda, then using pip, then built...
Read more >
pip install panadas fails on numpy version · Issue #20697
With pip 9.0.3 it seems to download pandas 0.22 (via xarray dependency of >0.18.0). I guess my question on the pandas side is...
Read more >
Installation — pandas 1.1.1 documentation
Installing pandas and the rest of the NumPy and SciPy stack can be a little difficult for inexperienced users. The simplest way to...
Read more >
NumPy 1.22.0 Release Notes
NumPy now sets the -ftrapping-math option on clang to enforce correct floating point error handling for universal functions. Clang defaults to non-IEEE and...
Read more >
Python Extension Packages for Windows - Christoph Gohlke
Refer to the documentation of the individual packages for license restrictions and dependencies. If downloads fail, reload this page, ...
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