Alterando o padrão para python3.6 de python2.7 para Herku

0

Eu tenho tentado executar o heroku local no ubuntu16.04. Por padrão, o comando usa pacotes python2.7. Requer django que é instalado em python3 usando pip3. Como faço para alterar o caminho padrão para python3.6 de python2.7

$ heroku local
[OKAY] Loaded ENV .env File as KEY=VALUE Format
01:53:43 web.1   |  [2017-12-30 01:53:43 +0000] [13114] [INFO] Starting      gunicorn 19.4.5
01:53:43 web.1   |  [2017-12-30 01:53:43 +0000] [13114] [INFO] Listening at: http://0.0.0.0:5000 (13114)
01:53:43 web.1   |  [2017-12-30 01:53:43 +0000] [13114] [INFO] Using worker: sync
01:53:43 web.1   |  [2017-12-30 01:53:43 +0000] [13119] [INFO] Booting worker with pid: 13119
01:53:43 web.1   |  [2017-12-30 01:53:43 +0000] [13119] [ERROR] Exception in worker process:
01:53:43 web.1   |  Traceback (most recent call last):
01:53:43 web.1   |    File "/usr/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 515, in spawn_worker
01:53:43 web.1   |      worker.init_process()
01:53:43 web.1   |    File "/usr/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 122, in init_process
01:53:43 web.1   |      self.load_wsgi()
01:53:43 web.1   |    File "/usr/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 130, in load_wsgi
01:53:43 web.1   |      self.wsgi = self.app.wsgi()
01:53:43 web.1   |    File "/usr/lib/python2.7/dist-packages/gunicorn/app/base.py", line 67, in wsgi
01:53:43 web.1   |      self.callable = self.load()
01:53:43 web.1   |    File "/usr/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 65, in load
01:53:43 web.1   |      return self.load_wsgiapp()
01:53:43 web.1   |    File "/usr/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
01:53:43 web.1   |      return util.import_app(self.app_uri)
01:53:43 web.1   |    File "/usr/lib/python2.7/dist-packages/gunicorn/util.py", line 366, in import_app
01:53:43 web.1   |      __import__(module)
01:53:43 web.1   |    File "/home/palak/python-getting-started/gettingstarted/wsgi.py", line 13, in <module>
01:53:43 web.1   |      from django.core.wsgi import get_wsgi_application
01:53:43 web.1   |  ImportError: No module named django.core.wsgi
01:53:43 web.1   |  Traceback (most recent call last):
01:53:43 web.1   |    File "/usr/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 515, in spawn_worker
01:53:43 web.1   |      worker.init_process()
01:53:43 web.1   |    File "/usr/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 122, in init_process
01:53:43 web.1   |      self.load_wsgi()
01:53:43 web.1   |    File "/usr/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 130, in load_wsgi
01:53:43 web.1   |      self.wsgi = self.app.wsgi()
01:53:43 web.1   |    File "/usr/lib/python2.7/dist-packages/gunicorn/app/base.py", line 67, in wsgi
01:53:43 web.1   |      self.callable = self.load()
01:53:43 web.1   |    File "/usr/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 65, in load
01:53:43 web.1   |      return self.load_wsgiapp()
01:53:43 web.1   |    File "/usr/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
01:53:43 web.1   |      return util.import_app(self.app_uri)
01:53:43 web.1   |    File "/usr/lib/python2.7/dist-packages/gunicorn/util.py", line 366, in import_app
01:53:43 web.1   |      __import__(module)
01:53:43 web.1   |    File "/home/palak/python-getting-started/gettingstarted/wsgi.py", line 13, in <module>
01:53:43 web.1   |      from django.core.wsgi import get_wsgi_application
01:53:43 web.1   |  ImportError: No module named django.core.wsgi
01:53:43 web.1   |  [2017-12-30 01:53:43 +0000] [13119] [INFO] Worker exiting (pid: 13119)
01:53:43 web.1   |  [2017-12-30 01:53:43 +0000] [13114] [INFO] Shutting down: Master
01:53:43 web.1   |  [2017-12-30 01:53:43 +0000] [13114] [INFO] Reason: Worker failed to boot.
01:53:43 web.1   Exited with exit code 3
    
por Palak 31.12.2017 / 05:52

0 respostas