Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/335.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Elastic Beanstalk错误地使用Python 2.7而不是3.7部署环境_Python_Amazon Web Services_Amazon Elastic Beanstalk - Fatal编程技术网

Elastic Beanstalk错误地使用Python 2.7而不是3.7部署环境

Elastic Beanstalk错误地使用Python 2.7而不是3.7部署环境,python,amazon-web-services,amazon-elastic-beanstalk,Python,Amazon Web Services,Amazon Elastic Beanstalk,在运行ebinit之后,我选择了一个使用Python 3.7和AL 2的环境。这是生成的配置文件: branch-defaults: default: environment: django-env group_suffix: null global: application_name: dashboard branch: null default_ec2_keyname: aws-eb default_platform: Python 3.7 running

在运行
ebinit
之后,我选择了一个使用Python 3.7和AL 2的环境。这是生成的配置文件:

branch-defaults:
  default:
    environment: django-env
    group_suffix: null
global:
  application_name: dashboard
  branch: null
  default_ec2_keyname: aws-eb
  default_platform: Python 3.7 running on 64bit Amazon Linux 2
  default_region: us-west-2
  include_git_submodules: true
  instance_profile: null
  platform_name: null
  platform_version: null
  profile: eb-cli
  repository: null
  sc: null
  workspace_type: Application
很明显,我应该在EC2实例中使用python 3.7,但事实似乎并非如此


当我SSH到实例中并运行
python
时,实例的默认值是2.7。这里怎么了?

您必须使用
python3
而不是
python

python3 -V
Python 3.7.6
但是

python -V
Python 2.7.16