Environment
Conda virtual environment
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.
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).
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
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.
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.
Most helpful comment
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).