Reputation: 1
I've been working in Jupyter IPython notebook (using Python 2.7) and haven't had any issues before this importing and installing packages. Most of my packages were installed via Anaconda. Now I'm randomly having problems importing packages that I've always been able to import. I have an example below. Please help. I'm pretty new to Python so I'm completing stuck on what the problem is and how to fix it.
ImportError Traceback (most recent call last) in () ----> 1 import pandas as pd
C:\Users\IBM_ADMIN\Anaconda2\lib\site-packages\pandas__init__.py in () 11 "pandas from the source directory, you may need to run " 12 "'python setup.py build_ext --inplace' to build the C " ---> 13 "extensions first.".format(module)) 14 15 from datetime import datetime
ImportError: C extension: No module named numpy not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace' to build the C extensions first.
Upvotes: 0
Views: 1479
Reputation: 1
Running this solved the problem: pip install scipy-0.16.1-cp27-none-win_amd64.whl After doing this, all other packages were able to be re-installed and successfully imported.
Upvotes: 0
Reputation: 8152
conda
virtual environments will help you a lot. It's good practice to use environments for your projects. And it'll help you avoid causing potential problems with your system's Python.
Try this on the command line:
conda create -n myenv anaconda
source activate myenv
jupyter notebook
That default env will already have pandas
; you can install most other things with conda install <package>
or, if that doesn't work, pip install <package>
.
Upvotes: 2