Help fixing the pandas error.

0 votes

I am unable to import pandas library even after uninstalling and installing python 3.7.1.
Getting the below error - 

ImportError: C extension: No module named 'parsing' not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace --force' to build the C extensions first.

Please let me know how this can be fixed.

Feb 13, 2019 in Python by Shiv
3,404 views

1 answer to this question.

0 votes

Try this:

Uninstall python with admin privileges.

Shut down your system.

Restart it.

Then, install python with admin privileges.

Add python to path by selecting the option during installation.

Once installation finishes:

Open a command prompt with admin privileges and then execute:

pip install numpy

pip install pandas

pip install matplotlib

pip install scikit-learn

After that, you will be able to import pandas.

answered Feb 13, 2019 by Saru
>>> pip install numpy
  File "<stdin>", line 1
    pip install numpy
        ^
SyntaxError: invalid syntax
>>>

Hi, @There,

pip is run from the command line, not the Python interpreter. It is a program that installs modules, so you can use them from Python.

The Python shell is not a command line, it is an interactive interpreter. You type Python code into it, not commands.

Related Questions In Python

–1 vote
1 answer
0 votes
1 answer

Need help writing a dataframe into a csv with the help of a loop

Using the following logic you can arrive ...READ MORE

answered Apr 17, 2018 in Python by anonymous
2,071 views
0 votes
1 answer

Can you help me understand the Global Interpreter Lock in Python

Suppose you have multiple threads which don't really touch ...READ MORE

answered Nov 23, 2018 in Python by aryya
• 7,380 points
116 views
0 votes
2 answers

Error: Speech to Text Codec cannot decode the bytes in position

import speech_recognition as sr r = sr.Recognizer() audio ='C\Users\Desktop\audiofile1.wav' with ...READ MORE

answered Nov 27, 2018 in Python by Nabarupa Das
832 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,478 views
0 votes
0 answers
+4 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,800 points
1,110 views
0 votes
1 answer

How to print a message or the error if a file is not found?

To print the message that file is not ...READ MORE

answered Jan 2, 2019 in Python by Omkar
• 69,030 points
167 views
0 votes
1 answer

Need help checking the validity of an image file in Python

I went through the Python documentation and ...READ MORE

answered Jan 18, 2019 in Python by Nymeria
• 3,520 points
355 views