配置AWS Cloud9以使用Anaconda Python环境 [英] Configure AWS Cloud9 to use Anaconda Python Environment

查看:166
本文介绍了配置AWS Cloud9以使用Anaconda Python环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望AWS Cloud9使用我的Anaconda Python环境中的Python版本和特定软件包。我该如何实现?我应该在哪里查看设置或配置?

I want AWS Cloud9 to use the Python version and specific packages from my Anaconda Python environment. How can I achieve this? Where should I look in the settings or configuration?

我当前的设置:我有一个带Ubuntu Linux的AWS EC2实例,并且我已经配置了AWS Cloud9与EC2一起使用实例。

My current setup: I have an AWS EC2 instance with Ubuntu Linux, and I have configured AWS Cloud9 to work with the EC2 instance.

我在EC2实例上安装了Anaconda,并创建了一个conda Python3环境供使用,但是Cloud9始终希望使用我的Linux系统安装的Python3版本。

I have Anaconda installed on the EC2 instance, and I have created a conda Python3 environment to use, but Cloud9 always wants to use my Linux system's installed Python3 version.

推荐答案

我终于找到了一些迫使AWS Cloud9在我的AWS EC2实例上使用Anaconda环境中安装的Python3版本的方法。

I finally found something that forces AWS Cloud9 to use the Python3 version installed in my Anaconda environment on my AWS EC2 instance.

为Python创建自定义AWS Cloud9运行程序的说明为此处

The instructions to create a custom AWS Cloud9 runner for Python are here:

{
    "cmd" : ["/home/ubuntu/anaconda3/envs/ijackweb/bin/python3.6", "$file", "$args"],
    "info" : "Running $project_path$file_name...",
    "selector" : "source.py"
}

我只是创建一个新的运行器并将上面的代码粘贴到其中,然后Cloud9使用Anaconda环境的Python3版本运行我的应用程序。

I just create a new runner and paste the above code in there, and Cloud9 runs my application with my Anaconda environment's version of Python3.

对于上述代码,我唯一不了解的是 selector: source.py行的作用。

The only thing I don't understand about the above code is what the "selector": "source.py" line does.

这篇关于配置AWS Cloud9以使用Anaconda Python环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆