How to Setup MyEMS Development Environment on macOS #12
Unanswered
guangyuzhang
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This answer is from @kuuyee
1.Python
MyEMS要求Python版本在3.5+,这里用brew来安装最新别的
Python3.9
版本,不过要先安装Xcode Command Line Tools
,否则安装python会报错。然后安装python3
国内网络可能会出现安装慢的问题,配置下国内的资源镜像
2.MySQL
MyEMS默认使用MySQL8.0,也是采用brew来安装
然后初始化数据库,克隆myems到本地。
3.部署mymes-api服务
安装一堆python依赖库
如果安装完整命令行还是提示找不到,就在
.zshrc
种配置下$PATH
4.运行myems-api服务
$ git clone https://github.com/myems/myems-api.git $ cd myems-api $ gunicorn -b 127.0.0.1:8000 app:api [2021-02-16 22:21:46 +0800] [3252] [INFO] Starting gunicorn 20.0.4 [2021-02-16 22:21:46 +0800] [3252] [INFO] Listening at: http://127.0.0.1:8000 (3252) [2021-02-16 22:21:46 +0800] [3252] [INFO] Using worker: sync [2021-02-16 22:21:46 +0800] [3253] [INFO] Booting worker with pid: 3253 //启动成功
5.验证myems-api服务
打开浏览器访问http://localhost:8000/version
如果看到如下输出就表示服务启动正常。
Beta Was this translation helpful? Give feedback.
All reactions