-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
PipEnv fails installs with TypeError ('LegacySpecifier' not iterable) #4681
Comments
Full log attached. ... |
This should be the number one issue. The current Pipenv is totally broken. It can hardly install anything if its internal requirements specification is using markers. This applies to PyPi packages and local requirements files. I have to revert back to a November 2018 version (2018.11.26) just to do anything. There was even a release after this bug report. Unacceptable. Here are other examples of NUMEROUS broken installs:
|
To hack around the problems ...
Then comment out lines in your Then, use a script to iterate through your
You can then hack/build/install anything that fails locally or maybe install it through an IDE. I'm almost at my wits end with this. I might try a different virtualization solution going forward. |
@jpl-jengelke I suspect that newer versions of |
I know this was just closed but it basically still does not work. So What it basically shows is that So it's not dumping on other syntax and this is obviously progress, but it's definitely not behaving line
|
@matteius Should I open a new issue? |
@jpl-jengelke Thanks for the reply, I have re-opened this issue and begun to investigate. I got the same original error as you for your example Pipfile, but you hypothesized:
So I don't think that is quite it, because to test that out, I made a requirements.txt with just:
I also tried: Digging a little further, it seems to be an issue with the package importing Cython before it can be installed in the install_requires: https://github.com/JohannesBuchner/UltraNest/blob/master/setup.py#L9 So I ran first this:
Next ensured Cython was installed (working around the issue that is caused by |
@jpl-jengelke Feel free to open a new issue if you believe there is still one with |
This ticket has nothing to do with Ultranest/Cython, which is a Red Herring. However, Cython does need to be installed preliminarily. A ticket was created in Ultranest to address this. From the last log posted, I should bring attention to the following line:
This is not the case. At the time this was tested (01/09/2022), Ultranest 3.3.3 had been released for four months. Bare minimum, the error message is misleading, whether there was a confounding Cython issue or not. The below logs shows the following:
There were some changes I see in the dependency resolver in late 2021 to try to cut over to I don't know. I don't see any commits against this ticket, and the problem still persists. I suppose I could create another ticket, but it would effectively be a clone. I haven't been able to use Pipenv for over a year now. Would cloning this serve any particular purpose to help the project?
|
@jpl-jengelke You may have tested it on |
Just to confirm, I retested just today with @matteius Do you mean the branch named |
@jpl-jengelke Yes that is the one, and fwiw I am trying it right now, just installed Cython first. Its still running ... not sure how long it should take. I'll edit this message hopefully soon.
|
@jpl-jengelke What needs to be determined now if this is a bug in requirementslib itself or how pipenv is using it. I will try to help with that, but it may take some time. |
@jpl-jengelke Worth noting that this has come up before in a different context I just noticed: okta/okta-sdk-python#124 (comment) |
So does work if you do install directly from the repository (I forked it in my example thinking I would need to edit setup.py because I see something odd there) but actually it just installs that way, some maybe something up with the whl file in pypi? I forget what causes it to use the LegacySpecifier over the Specifier.
|
This however does not work when you download the source from pypi and extract it and try to install it that way:
Seems that because that package won't run |
This comment was marked as resolved.
This comment was marked as resolved.
No errors with
|
My first hunch was that because pip is installing the whl file, but or some reason pipenv is trying to build it from source which we know fails with pip, but also pipenv fails to install it directly with the whl file, so its not that.
|
@jpl-jengelke Ok you are right about pip can install that directly, it just couldn't do so on my shared file system for the VM which is my own fault for cloning it there, when I moved it to my home directory pip installed it. Marking my past comment as resolved. |
@jpl-jengelke I do think it is the extra quotes in the setup.py file actually. See this: https://github.com/rzellem/EXOTIC/blob/main/setup.py#L105 There should not be single quotes inside the f'string.
|
@jpl-jengelke When I fix that it works. Going to push that change to my fork and open a PR with exotic I guess. You can try my branch here: https://github.com/matteius/EXOTIC
|
@jpl-jengelke We'll see if it gets accepted, but I also have a PR against pipenv that echos an error if the python specifier cannot be set, but continues on. Using that branch will also solve your issue in the interim:
|
Agreed that the version quotes provoked an issue in Just to clear some misunderstanding, the error manifested with installing the requirements file by itself, and the requirements file doesn't reference There may have been a component of system configuration cruft confounding this. Now I've completely reset my Here's how I reset the environment:
I think we can call this closed. I'm quite certain a year ago this was a problem with the older release. If any similar errors arise again in the context of a |
PipEnv fails some installs with an exception,
TypeError: 'LegacySpecifier' object is not iterable
:Installation should work or show an actual error related to a package. It fails on a TypeError exception without any legible problem report related to the install:
Verbose log is attached as a file.
I believe this is related to parsing markers, e.g.
importlib-metadata>=3.6 ; python_version<='3.7'
. However, I have not deep dived very far into the cause.Reproduce:
You could probably reproduce it by simply installing the EXOTIC product, which is a dependency of
somelocalappname
:IT WORKS WITH AN OLDER VERSION OF PIPENV:
pip3 uninstall pipenv ; pip3 install pipenv==2018.11.26
someorgs-MacBook-Pro:somelocalappname someuser$ pipenv --support
$ pipenv --support
Pipenv version:
'2020.11.15'
Pipenv location:
'/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pipenv'
Python location:
'/Library/Frameworks/Python.framework/Versions/3.7/bin/python3'
Python installations found:
3.7.3
:/Library/Frameworks/Python.framework/Versions/3.7/bin/python3
3.7.3
:/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7m
3.7.3
:/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7
3.7.3
:/usr/local/bin/python3
3.7.3
:/usr/local/bin/python3.7m
3.7.3
:/usr/local/bin/python3.7
PEP 508 Information:
System environment variables:
TERM_PROGRAM
TERM
SHELL
TESTRAIL_KEY
TMPDIR
TERM_PROGRAM_VERSION
OLDPWD
TERM_SESSION_ID
UID_GID
USER
TERM_SESSION_CLASS_ID
SSH_AUTH_SOCK
BASH_SILENCE_DEPRECATION_WARNING
MAVEN_OPTS
MAVEN_HOME
PATH
PWD
JAVA_HOME
LANG
ARTIFACTORY_PSW
TEST_PSW
PYTHONHOME
XPC_FLAGS
TESTRAIL_USER
XPC_SERVICE_NAME
ARTIFACTORY_USR
M2_HOME
HOME
SHLVL
TEST_USR
PYTHONPATH
LOGNAME
TESTRAIL_PSW
TESTRAIL_USR
_
__CF_USER_TEXT_ENCODING
PIP_DISABLE_PIP_VERSION_CHECK
PYTHONDONTWRITEBYTECODE
PIP_SHIMS_BASE_MODULE
PIP_PYTHON_PATH
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv�specific environment variables:
Debug�specific environment variables:
PATH
:/Library/Java/JavaVirtualMachines/jdk-1.8.0_232.jdk/Contents/Home/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Users/someuser/Library/Python/3.7/bin:/opt/maven/latest/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
SHELL
:/bin/zsh
LANG
:en_US.UTF-8
PWD
:/proj/survey-ws/source/somelocalappname
Contents of
Pipfile
('/System/Volumes/Data/proj/survey-ws/source/somelocalappname/Pipfile'):The text was updated successfully, but these errors were encountered: