0

I am new to Python and am facing the below issue.

When I am trying to install the 'request' module by using command PIP install request, I got the error:

RuntimeError: maximum recursion depth exceeded

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
C:\users\sandeep_kumar39\appdata\local\temp\pip-build-gzzphx\setupfiles\

The Python version is 2.7.12.

And I already upgraded the distribution package by using command pip install --upgrade distribute.

And upgraded the pip version too by using command pip install --upgrade pip

Complete output of error:

C:\Python27\Scripts>pip install request
Collecting request
  Using cached request-0.0.12.tar.gz
Collecting get (from request)
  Using cached get-0.0.20.tar.gz
Collecting post (from request)
  Using cached post-0.0.12.tar.gz
Collecting setupfiles (from request)
  Using cached setupfiles-0.0.16.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\sandeep_kumar39\appdata\local\temp\pip-build-3gsgdg\setupfiles\setup.py", line 4, in <module>
        from setupfiles import setup
      File "setupfiles.py", line 18, in <module>
        import setupfiles # nopep8
      File "setupfiles.py", line 18, in <module>
        import setupfiles # nopep8
      File "setupfiles.py", line 18, in <module>
        import setupfiles # nopep8
            File "setupfiles.py", line 18, in <module>
        import setupfiles # nopep8
      File "setupfiles.py", line 18, in <module>
        import setupfiles # nopep8
      File "setupfiles.py", line 18, in <module>
        import setupfiles # nopep8
      File "setupfiles.py", line 18, in <module>
        import setupfiles # nopep8
      File "setupfiles.py", line 18, in <module>
        import setupfiles # nopep8
      File "setupfiles.py", line 18, in <module>
        import setupfiles # nopep8
      File "setupfiles.py", line 18, in <module>
        import setupfiles # nopep8
      File "setupfiles.py", line 18, in <module>
        import setupfiles # nopep8
      File "setupfiles.py", line 18, in <module>
        import setupfiles # nopep8
      File "setupfiles.py", line 18, in <module>
        import setupfiles # nopep8
      File "setupfiles.py", line 18, in <module>
        import setupfiles # nopep8
      File "setupfiles.py", line 18, in <module>
        import setupfiles # nopep8
      File "setupfiles.py", line 18, in <module>
        import setupfiles # nopep8
      File "setupfiles.py", line 18, in <module>
        import setupfiles # nopep8
      File "setupfiles.py", line 18, in <module>
        import setupfiles # nopep8
      File "setupfiles.py", line 11, in <module>
        dirname = os.path.abspath(os.path.dirname(__file__))
      File "c:\python27\lib\ntpath.py", line 215, in dirname
        return split(p)[0]
      File "c:\python27\lib\ntpath.py", line 180, in split
        d, p = splitdrive(p)
    RuntimeError: maximum recursion depth exceeded

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\sandeep_kumar39\appdata\local\temp\pip-build-3gsgdg\setupfiles\
7
  • give the full output of the error and the line that you execute, it will help Commented Jun 1, 2017 at 19:45
  • i have edited the question with complete output error. Commented Jun 1, 2017 at 20:44
  • 2
    Do you actually mean to install request and not requests? Commented Jun 1, 2017 at 20:57
  • Yes..i want to install request Commented Jun 1, 2017 at 21:02
  • Candidate canonical question: Python error when attempting to install 'request' package using pip Commented Jun 20, 2023 at 19:25

1 Answer 1

2

This appears to be due to a bug in recent versions of setupfiles, upon which request depends. You can work around this by first installing version 0.0.14 of setupfiles with pip install setupfiles==0.0.14 before trying to install request.

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks..its installed now :)
The first link is broken (404).
A bug? You don't say. It is related to this (my emphasis): "...a dependency on a package which might have been put in PyPi maliciously". The blog post link is also broken, but its title was probably "What is the story behind russianidiot on PyPI?". The larger issue is: PyPI Python repository hit by typosquatting sneak attack. It is a problem to this day. -
cont' - Gibson talked about it in February 2023 (episode 912).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.