Closed Tiwari1812 closed 2 years ago
Hi @Tiwari1812, can you try updating the version of setuptools in your build environment (to the latest version)? I think this was solved in v61.1.0.
Hi @Tiwari1812, can you try updating the version of setuptools in your build environment (to the latest version)? I think this was solved in v61.1.0.
pip install --upgrade pip setuptools==61.1.0 wheel did this but still having the same issue
Can you share the requirements/test.txt
you are using for this?
Also note that 61.1.0
is not the latest version.
Can you share the
requirements/test.txt
you are using for this? Also note that61.1.0
is not the latest version.
sure but setuptools dependency is in a static file in python and its not manually added in requirements -r base.txt pylama isort==4.3.21 pytest==5.4.1 pylint==2.4.4 pycodestyle==2.7.0 mypy mccabe pylint_django==2.3.0 pytest-django factory-boy==2.12.0 Faker==4.0.1 coverage freezegun~=0.3.15 requests_mock==1.8.0 responses moto[all] django-database-view==0.2.1 and my base.txt is Django==2.2.24 psycopg2==2.8.5 djangorestframework==3.12.4 celery==4.4.6 boto3==1.14.39 django-allauth==0.42.0 dj-rest-auth==1.1.0 djangorestframework-simplejwt==4.4.0 django-cors-headers==3.3.0 django-redis==4.12.1 razorpay==1.2.0 requests==2.24.0 pillow==8.2.0 drf-nested-routers==0.91 django-enumfields==2.0.0 pyyaml==5.4 sendgrid==6.4.5 django-fsm==2.7.0 django-dirtyfields==1.4 user_agents==2.1 djangorestframework-gis==0.15 django-filter==2.3.0 django-ipware==2.1.0 pydash==4.7.6 google-api-python-client==1.10.0 firebase-admin==4.3.0 django-health-check==3.12.1 pycryptodome==3.9.7 mixpanel==4.6.0 PyJWT~=1.7.1 cryptography==3.3.2 django-typed-models~=0.10.0 pytz~=2020.1 django-database-view==0.2.1 python-dotenv==0.10.5 coloredlogs==15.0.1 django-debug-toolbar==3.2.2 django-extensions==3.1.3 nplusone==1.0.0
Thank you Tiwari.
I created a req.txt
file with the contents of those two files and tried to install them in a virtual environment with the latest version of setuptools.
Things seem to work fine.
Can you do a pip list
and make sure the setuptools version is 62.0.0? Otherwise can you provide a simple script that reproduces the failure you are getting? For example, I tried the following and it seems to be fine:
virtualenv .venv
.venv/bin/python -m pip install -U pip 'setuptools==62.0.0'
.venv/bin/python -m pip install 'django-allauth==0.42.0'
Please not that PyPI is currently facing some problems, it might be the case you are getting old versions of the packages: https://status.python.org
setuptools==62.0.0
sorry man still having same issue or either i am not able to get you so can we connect some where?
Sorry @Tiwari1812 I don't think a call would work for me.
To be able to investigate this issue, I think what is missing is a minimal reproducer. There are some guides on the internet, discussing how to do it.
For example, based on your description, I would expect the following snippet to be such a reproducer:
virtualenv .venv
.venv/bin/python -m pip install -U pip 'setuptools==62.0.0'
.venv/bin/python -m pip install 'django-allauth==0.42.0'
However, that works completely fine.
Can you provide a simple example similar to the 3 lines above that results in the same error you are facing?
FWIW, django-allauth has fixed this (too). https://github.com/pennersr/django-allauth/commit/e91b89fea4608ae65d2025144bc43a42f4ce0501
Sorry @Tiwari1812 I don't think a call would work for me.
To be able to investigate this issue, I think what is missing is a minimal reproducer. There are some guides on the internet, discussing how to do it.
For example, based on your description, I would expect the following snippet to be such a reproducer:
virtualenv .venv .venv/bin/python -m pip install -U pip 'setuptools==62.0.0' .venv/bin/python -m pip install 'django-allauth==0.42.0'
However, that works completely fine.
Can you provide a simple example similar to the 3 lines above that results in the same error you are facing?
on local its working fine but on github checks its failing so thats why i am not able to reproduce it
Hi @Tiwari1812, without a reproducer it is almost impossible to analyse this problem.
With v62.0.0 of setuptools
you should not reach this error: ImportError: cannot import name 'convert_path' from 'setuptools'
: if you open the setuptools/__init__.py
file you are going to find the function defined there.
So my conclusion is that your CI somehow ends up with an older version of setuptools on the PYTHONPATH. That might be caused for a plethora of factors and some of them might very well be external to setuptools.
@Tiwari1812, I think I will close this issue for now since there seems to be no reproduction that we can use to investigate the problem. And without being able to reproduce the problem there is not much we can do.
If you manage to create a minimal reproducer following the tutorials I listed above, please let me know and I will more than happy to re-open this issue.
If you have problems trying to reproduce the issue in a virtual environment, you can also use a docker container or a docker file to simulate a global installation.
setuptools version
setuptools==57.0.0 in ide but not sure which version github uses to run checks
Python version
python3.8
OS
ubuntu
Additional environment information
When github checks are running build.yml
Description
When github is trying to load build.yml file its failing on the line pip install --upgrade pip setuptools wheel and checks are not even starting
i have even tried upgrading pip and changing the setuptools version but no progress
Expected behavior
its coming from past 10days before that checks were loading succesfully
How to Reproduce
runs-on: ubuntu-18.04
Output
Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'error' error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [6 lines of output] Traceback (most recent call last): File "", line 2, in
File "", line 34, in
File "/tmp/pip-install-401qhgiu/django-allauth_5c477dffa46b40b5983e966a17fbf0e0/setup.py", line 8, in
from setuptools import convert_path, find_packages, setup
ImportError: cannot import name 'convert_path' from 'setuptools' (/home/runner/work/betterhalf-backend/betterhalf-backend/.tox/py38/lib/python3.8/site-packages/setuptools/init.py)
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed
× Encountered error while generating package metadata. ╰─> See above for output.
note: This is an issue with the package mentioned above, not pip. hint: See above for details.