2017-05-20 3 views
0

Ich bin neu in AWS CLI USAGE. Also erkläre mir den Fehler klar, damit ich den Fehler beim nächsten Mal nicht mache.Fehler: Ihre Anforderungen.txt ist ungültig. Snapshot Ihrer Protokolle für Details

Here is my requirements.txt file :

appdirs==1.4.3 
    cssselect==1.0.1 
    dj-database-url==0.4.2 
    Django==1.11 
    django-ckeditor==5.2.2 
    Markdown==2.6.8 
    packaging==16.8 
    psycopg2==2.5.4 
    pyparsing==2.2.0 
    pytz==2017.2 
    six==1.10.0 

Here are my files inside .ebextensions directory :

  • django.config

    option_settings: 
        "aws:elasticbeanstalk:application:environment": 
        DJANGO_SETTINGS_MODULE: "awsbean.settings" 
        aws:elasticbeanstalk:container:python: 
        WSGIPath: cv_web/wsgi.py 
    
  • packages.config

    packages: 
        yum: 
        git: [] 
    
  • python.config

    container_commands: 
        01_migrate: 
        command: "python src/manage.py migrate --noinput" 
        leader_only: true 
    

And here is my config.yml file inside .ebextensions/.elasticbeanstalk :

branch-defaults: 
    default: 
     environment: environment 
    environment-defaults: 
     environment: 
     branch: null 
     repository: null 
    global: 
     application_name: cv_web 
     default_ec2_keyname: aws-eb2 
     default_platform: Python 3.4 
     default_region: ap-south-1 
     instance_profile: null 
     platform_name: null 
     platform_version: null 
     profile: eb-cli 
     sc: null 
     workspace_type: Application 
+0

Vielleicht relevant: http://stackoverflow.com/questions/18554666/invalid-requirements-txt-on-deploying-django-app-to-aws- Bohnenstange – jarmod

+0

Ich versuchte es, aber half nicht :-(@jarmod –

Antwort

0

Es ist ein bekanntes Problem mit psycopg2 auf AWS. Sie müssen es manuell sudo installieren.

Was ich in der Regel tun ist, schließe ich die psycopg2 installiert in .ebextensions (reqires postgressql-devel erste Installation) so sicherstellen, dass es vor requirements.txt Kicks off zur Verfügung steht.

Fügen Sie diese in Ihrer Konfigurationsdatei:

container_commands: 
    01_postgresql: 
    command: sudo yum -y install gcc python-setuptools python-devel postgresql-devel 
    02_postgresql: 
    command: sudo easy_install psycopg2 
Verwandte Themen