Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'ParsedRequirement' object has no attribute 'req' when installing django-microsoft-auth==2.3.1 #8188

Closed
goranbs opened this issue May 4, 2020 · 4 comments
Labels
resolution: wrong project Should be reported elsewhere

Comments

@goranbs
Copy link

goranbs commented May 4, 2020

Environment
Conda virtual environment

  • pip version: 20.1
  • Python version: 3.8.2
  • OS: Microsoft Windows Server 2016 Standard

Description
Setting up an virtual environment using conda and installing specific package

How to Reproduce

conda create -n test_ python pip
conda activate test_
pip install pip==20.1
pip install django-microsoft-auth

Output

Collecting django-microsoft-auth
  Using cached django_microsoft_auth-2.3.1.tar.gz (63 kB)
    ERROR: Command errored out with exit status 1:
     command: 'c:\applications\envs\test_\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'\path\to\\django-microsoft-auth\\setup.py'"'"'; __file__='"'"'path\to\\pip-install-_2xbfubh\\django-microsoft-auth\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'path\to\pip-pip-egg-info-hd3fbwge'
         cwd: path\to\pip-install-_2xbfubh\django-microsoft-auth\
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "path\to\pip-install-_2xbfubh\django-microsoft-auth\setup.py", line 39, in <module>
        requirements[req] = [str(req.req) for req in reqs]
      File "path\to\pip-install-_2xbfubh\django-microsoft-auth\setup.py", line 39, in <listcomp>
        requirements[req] = [str(req.req) for req in reqs]
    AttributeError: 'ParsedRequirement' object has no attribute 'req'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

#########################

Installing the same package using pip==20.0.2 works fine.

@triage-new-issues triage-new-issues bot added the S: needs triage Issues/PRs that need to be triaged label May 4, 2020
@pfmoore
Copy link
Member

pfmoore commented May 4, 2020

django-microsoft-auth is using pip's internals in its setup.py here.

That's not supported - you'll need to report this issue to them. (Pip changed its internal implementation recently, which is probably why this broke).

@pfmoore pfmoore added the resolution: wrong project Should be reported elsewhere label May 4, 2020
@triage-new-issues triage-new-issues bot removed the S: needs triage Issues/PRs that need to be triaged label May 4, 2020
sa3eed3ed added a commit to sa3eed3ed/cloud-forensics-utils that referenced this issue May 11, 2020
…tion blocking functions. Implementing create Image from Disk and export Image functionalities for GCP. pip 20.1 runs into some error while running setup.py: AttributeError: 'ParsedRequirement' object has no attribute 'req' Limiting to version 20.0.2 as a workaround until this issue is solved: pypa/pip#8188
@sergey-zakharov
Copy link

Met this case during pip-compile --output-file=requirements.txt requirements.in

pip==20.1.1 with pip-tools==2.0.2 solve the issue

@uranusjr
Copy link
Member

uranusjr commented Jun 16, 2020

This has been fixed in AngellusMortis/django_microsoft_auth#405 (not released yet; follow AngellusMortis/django_microsoft_auth#416 for further information). There is nothing more pip can do here.

@colegatron
Copy link

colegatron commented Jun 18, 2020

tried @sergey-zakharov workaround, tried upgrading only pip, no luck, with pip-tools either.
Any other workaround avail?

Note: I am using the legacy 1.3.3 version of django_microsoft_auth, but upgraded to 2.3.1 and do not works either.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution: wrong project Should be reported elsewhere
Projects
None yet
Development

No branches or pull requests

5 participants