0

i've spend the past hour or so trying to import this package but no joy, wonder if anyone knows a solution/hack to force the import?

Tried, all the obvious after researching here/google. eg:

pip install pandas-datareader conda install pandas-data-reader conda install -c conda.anaconda.org/anaconda pandas-datareader

Weirdly if I run conda list:

# packages in environment at /Users/Student/miniconda3:
#
asn1crypto                0.22.0           py36hb705621_1  
ca-certificates           2017.08.26           ha1e5d58_0  
certifi                   2017.7.27.1      py36hd973bb6_0  
cffi                      1.10.0           py36h880867e_1  
chardet                   3.0.4            py36h96c241c_1  
conda                     4.3.30           py36h173c244_0  
conda-env                 2.6.0                h36134e3_0  
cryptography              2.0.3            py36h22d4226_1  
cycler                    0.10.0                    <pip>
et_xmlfile                1.0.1            py36h1315bdc_0  
html5lib                  0.999999999      py36h79312fd_0  
idna                      2.6              py36h8628d0a_1  
intel-openmp              2018.0.0             h8158457_8    anaconda
jdcal                     1.3              py36h1986823_0  
libcxx                    4.0.1                h579ed51_0  
libcxxabi                 4.0.1                hebd6815_0  
libedit                   3.1                  hb4e282d_0  
libffi                    3.2.1                hd939716_3  
libgfortran               3.0.1                h93005f0_2    anaconda
matplotlib                2.1.0                     <pip>
mkl                       2018.0.1             hfbd8650_4    anaconda
ncurses                   6.0                  ha932d30_1  
numpy                     1.13.3           py36h2cdce51_0    anaconda
numpy                     1.13.3                    <pip>
openpyxl                  2.4.9            py36h70dedc0_0  
openssl                   1.0.2l               h57f3a61_2  
pandas                    0.21.0                    <pip>
pandas                    0.21.0           py36hfed917e_1    anaconda
pandas-datareader         0.5.0                     <pip>
pandas-datareader         0.5.0                    py36_0  
pip                       9.0.1            py36hbd95645_3  
pycosat                   0.6.2            py36h1486600_0  
pycparser                 2.18             py36h724b2fc_1  
pygame                    1.9.3                     <pip>
pyopenssl                 17.2.0           py36h5d7bf08_0  
pyparsing                 2.2.0                     <pip>
pysocks                   1.6.7            py36hfa33cec_1  
python                    3.6.3                h6804ab2_0  
python-dateutil           2.6.1            py36h86d2abb_1    anaconda
python-dateutil           2.6.1                     <pip>
python.app                2                py36h54569d5_7  
pytz                      2017.3           py36hf0bf824_0    anaconda
pytz                      2017.3                    <pip>
readline                  7.0                  h81b24a6_3  
requests                  2.18.4           py36h4516966_1  
requests-file             1.4.1                    py36_0    anaconda
requests-file             1.4.2                     <pip>
requests-ftp              0.3.1                     <pip>
requests-ftp              0.3.1                    py36_0    anaconda
ruamel_yaml               0.11.14          py36h9d7ade0_2  
scikit-learn              0.19.1                    <pip>
scipy                     1.0.0                     <pip>
seaborn                   0.8.1                     <pip>
setuptools                36.5.0           py36h2134326_0  
six                       1.11.0           py36h0e22d5e_1  
sqlite                    3.20.1               h900c3b0_1  
tabula-py                 1.0.0                     <pip>
tk                        8.6.7                hcdce994_1  
urllib3                   1.22             py36h68b9469_0  
webencodings              0.5.1            py36h3b9701d_1  
wheel                     0.29.0           py36h3597b6d_1  
xlrd                      1.1.0            py36h336f4a2_1  
xz                        5.2.3                ha24016e_1  
yaml                      0.1.7                hff548bb_1  
zlib                      1.2.11               h60db283_1 

Two instances appear, indicating it definitely is installed, but when I try the import in jupyter I still get:

----> 1 from pandas_datareader import data, wb

ModuleNotFoundError: No module named 'pandas_datareader'

Also tried killing the jupyter notebook entirely at the command line and then restarting it but still no dice? Any words of wisdom?

Thanks!

MJV_2017
  • 25
  • 7
  • @BradSolomon is correct, hyphens create syntax errors, thanks for trying though! :) – MJV_2017 Dec 14 '17 at 16:16
  • https://stackoverflow.com/a/35835617/9063564 – MJV_2017 Dec 18 '17 at 23:26
  • Above comment fixes it if anyone runs into this or other issues, also if anyone knows @Alexander, someone buy the man a pint, STAT – MJV_2017 Dec 18 '17 at 23:27
  • I am having the same proble,how did you fix it @ MJV_2017 – dm5 Dec 31 '17 at 20:08
  • 1
    Honestly, it's not pretty in the slightest i'm afraid. I got it to work by completely removing all python packages and distributions (including the anaconda one) until I was down to base (i'm on OSX so a version comes preinstalled) Then I upgraded to Python 3 and pip3 installed everything again via the command line including jupyter notebook. However, since, everything has worked flawlessly I must admit, it'll probably take about an hour depending on your connection, sorry I don't have a more elegant solution for you! I really am, i tried everything before resorting to it myself. – MJV_2017 Jan 03 '18 at 00:43
  • However, my technique is somewhat draconian I must admit. I noticed on your profile you use tensorflow and big libraries like that will be a pain to reinstall (have played myself), I hypothesise the issue is that jupyter does not play nicely with packages installed by other managers, specifically the datareader module. I think you could probably get away with just uninstalling any trace of it you have (conda uninstall or pip equivalent) and jupyter notebook and then just reinstalling those two via pip3, don't forget the sudo command! May hopefully save you some time. Good luck! – MJV_2017 Jan 03 '18 at 00:49

0 Answers0