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 14, 2019 in Python by Shiv
9,315 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 14, 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
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
3,379 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,460 points
695 views
0 votes
2 answers
+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 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,434 views
0 votes
1 answer
+5 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,790 points
4,067 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,220 points
2,865 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,560 points
2,288 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP