Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
395 views
in Technique[技术] by (71.8m points)

I can't install graphene-django in GitHub actions

I am building a Django project, and I am using GitHub actions to run python manage.py test whenever I push. The problem is that in the project, I am using the graphene-django package, which's available to install via pip install graphene-django. The problem is that, for some reason, this doesn't seem to work (it outputs an error). I have tried everything:

  • pip install graphene-django
  • pip install "graphene-django>=2.0"
  • pip install --user graphene-django
  • pip install --user "graphene-django>=2.0"
  • pip3 install graphene-django
  • pip3 install "graphene-django>=2.0"
  • pip3 install --user graphene-django
  • pip3 install --user "graphene-django>=2.0"

Some of these commands display a different error, but the most common is this:

Collecting promise>=2.1 (from graphene-django>=2.0)
  Downloading https://files.pythonhosted.org/packages/cf/9c/fb5d48abfe5d791cd496e4242ebcf87a4bb2e0c3dcd6e0ae68c11426a528/promise-2.3.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ModuleNotFoundError: No module named 'setuptools'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-5vr1pems/promise/

Here is my YAML file for the Action (with the last intslling attempt):

name: Testing
on: push

jobs:
  test_vote:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Run Django unit tests
      run: |
        pip3 install --user django
        pip3 install --user "graphene-django>=2.0"
        python3 manage.py test
      env:
        # Random key
        SECRET_KEY: '!nj1v)#-y)e21t^u@-6tk+%+#vyzn30dp+)xof4q*y8y&%=h9l'

Any help would be really appreciated, since I've been in this for like an hour, when in the course, the teacher took like 5 minutes.

Thanks!

question from:https://stackoverflow.com/questions/65866250/i-cant-install-graphene-django-in-github-actions

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Install the module setuptools before installing graphene-django.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...