2017-05-29 47 views
0

我正在使用OpenEdx,我想添加新的库来创建新的功能。向Edx Studio添加新的python库

我有正常的DevStack Edx环境(在Docker工作)。

我想补充google-api-python-client我的项目,所以我说这个包: enter image description here

重建后的图像,并运行容器我在各自的容器审查这一程序包:enter image description here

哪里是我的图书馆? 它只发生在Studio,在LMS一切都很好。

因此: - 哪个是正确的外部python软件包安装方式?

谢谢!

回答

0

我明白了,原来像安装了不是所有的包,并且之后在原始图像的副本运行LMS命令的新图像与其他图像的不同:在CMS副本,我们有没有一个初始图像其他变化,因为不存在其他变化。

所以,安装了新的要求,我们创建一个新的文件,它在我们申请的命令用于安装和迁移包:

set -e 
set -o pipefail 
set -x 

# Bring Studio online 
docker-compose $DOCKER_COMPOSE_FILES up -d studio 

docker-compose exec studio bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform && NO_PYTHON_UNINSTALL=1 paver install_prereqs' 

#Installing prereqs crashes the process 
docker-compose restart studio 

# Run edxapp migrations first since they are needed for the service users and OAuth clients 
docker-compose exec studio bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform && NO_PREREQ_INSTALL=1 paver update_db --settings devstack_docker' 

docker-compose exec studio bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform && paver update_assets --settings devstack_docker' 

这一切。