From request import PandaRequest ImportError: No module named 'request'
Asked Answered
C

4

19

I am trying to use panda. When I import it as

import panda as pd

I get this error

  File "/usr/local/lib/python3.5/dist-packages/panda/__init__.py", line 1, in <module>
from request import PandaRequest ImportError: No module named 'request'

'request' seems to be already installed:

  Requirement already satisfied: request in /usr/local/lib/python3.5/dist-packages

I am using Python 3.5. I read around and the problem appears to exist only with 2.7. Do you have an idea of why it does not work?

Thanks

Bruno

Cotonou answered 27/7, 2017 at 12:59 Comment(2)
Don't you mean to have installed and used module "pandas" instead of panda? (AFAIK the error you see is because panda doesn't support python 3)Knowhow
Try to change panda to pandasSulphurate
M
35

I think you mean the pandas library, in which case you use

import pandas as pd
Merman answered 27/7, 2017 at 13:5 Comment(0)
O
14

Indeed its confusing when there are 2 libraries with similar name like panda and pandas.

  • Panda is a cloud-based platform that provides video and audio encoding infrastructure, and as error suggests, it looks for request module.
  • Pandas provides easy-to-use data structures and data analysis tools.
Outgrow answered 25/9, 2020 at 16:6 Comment(0)
J
7

use this:

pip install pandas

now import:

import pandas as pd
Jitters answered 5/3, 2019 at 11:36 Comment(0)
V
1

I faced the same problem, indeed panda package has import issue because of the relative import lines in __ init __.py.

In your python lib directory, go to "site-packages/panda/__ init __.py" and change the first import lines as follows (To fix relative import statements):

from . request import PandaRequest
from . models import Video, Cloud, Encoding, Profile, Notifications, PandaDict
from . models import GroupRetriever, SingleRetriever
from . models import PandaError
from . upload_session import UploadSession

and in upload_session.py (Same directory):

from . models import Video

This worked for me, but then I realized that I wanted to use pandas not panda :)

Good luck.

Vano answered 21/4 at 20:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.