如何获得python 3.5.1与heroku本地运行? [英] How to get python 3.5.1 running with heroku local?
问题描述
我一直在关注这个快速入门: https://devcenter.heroku。 com / articles / getting-started-with-python
但想知道如何让'heroku local'使用python 3.5.1运行?我已经将runtime.txt设置为python 3.5.1,但仍然会加载2.7的依赖项。
谢谢!
解决!
你也可以定义你的本地proc文件并每次启动 heroku local -f local.procfile
但这很无聊。
所以我要求在Github上的heroku本地回购支持( here ),我非常喜欢他给我的解决方案。
基本上你在PATH中添加/ bin文件夹,如下所示: export PATH =。/ bin:$ PATH
和那么在你的项目的根目录下,你只需要在你的项目范围内创建一个符号链接 ln -s $(which python3)./bin/python
/ p>
I have been following this quick start: https://devcenter.heroku.com/articles/getting-started-with-python
but was wondering how I could get 'heroku local' to run with python 3.5.1? I already changed runtime.txt to set it to python 3.5.1, but still it would load up 2.7's dependencies.
Thanks!
Solved!
You could also have defined your local procfile and launch everytime heroku local -f local.procfile
but that's boring.
So I asked for support in heroku local repo on Github (here) and I liked a lot the solution he gave me.
Basically you add /bin folder in your PATH like this: export PATH=./bin:$PATH
and then in the root of your project you do ln -s $(which python3) ./bin/python
in order to create a symlink only in the scope of your project!
这篇关于如何获得python 3.5.1与heroku本地运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!