0

So I've been trying to fix this for an hour and a half (I'm basically a beginner here) and I think it's because the packages, in my case pandas folium and geojson, are not in the same place as python when I try to run my code? Just saying import pandas as pd gives me the ModuleNotFoundError.

I ran in the windows command prompt pip install pandas, the same for folium and geojson (json didn't work although the code I'm trying to run just has import json), and running which python and which pip gave the same path, but running which pandas gave a much longer return that I can't make sense of.

Additionally, running python and then import pandas as pd yields a return message that starts with some illegal values in parameter numbers and ends with The current Numpy installation fails to pass a sanity check due to a big in the windows runtime. Following the provided tinyurl in the prompt, I'm led to believe this is some kind of Windows error with numpy?

Any help would be greatly appreciated.

av581038
  • 1
  • 1
  • which OS are you using? how did you insatall the package? – Jeril Dec 09 '20 at 06:19
  • Just using a windows laptop, in windows command prompt I entered ```pip install pandas```. I tried pip3 install pandas as many google searches prompted to do so, but it just returns 'requirement already satisfied' – av581038 Dec 09 '20 at 06:22
  • 1
    which version of python are you using? – Jeril Dec 09 '20 at 07:07
  • ...and which version of numpy (there was a microsoft bug recently that meant you had to pin numpy - but I thought it had been fixed in the latest release...) – thebjorn Dec 09 '20 at 07:09
  • @thebjorn this seems to be my issue honestly, I ran ```py -m pip install pandas``` which seemed to (re)install pandas, pytz, numpy, six, but also said ```WARNING: You are using pip version 20.2.1; however, version 20.3.1 is available.``` What do I need to do in order to pin numpy? – av581038 Dec 09 '20 at 07:17
  • You need to find the correct version (sorry not in front of PC right now), then issue `py -m pip install -U numpy==xxx` where xxx is the version number. (the warning about pip version can be ignored) – thebjorn Dec 09 '20 at 07:19
  • @thebjorn wow, that worked! Thank you so much! Now I just have to figure out what to code. – av581038 Dec 09 '20 at 07:30

1 Answers1

0

Try to use

pip3 install [PACKAGE_NAME]
Boken
  • 4,062
  • 9
  • 31
  • 41
  • Thanks for your response - this unfortunately didn't help, just returned ```requirement is fulfilled``` for several lines, but if you look above there was a solution. – av581038 Dec 09 '20 at 07:31