Comments (3)
OS X下Python解释器默认是/usr/bin/python2.*
什么的
from zhao.
@gaocegege
多谢反馈 bug
俺手头没有 Mac OS 的环境,俺这个脚本是在 Linux 上开发的,没有考虑到对 Mac OS 的兼容性。
最好能找到某种“两边都兼容”的写法
from zhao.
@programthink
我写了一个脚本,新建一个scripts目录,目录下新建build.sh:
#!/bin/sh
RED='\033[0;31m'
NC='\033[0m'
ROOT=$(dirname "${BASH_SOURCE}")/..
cd ${ROOT}/bin
if [[ $(which python1) ]]; then
echo "Use python to build."
$(which python) ./make.py $1
cd - > /dev/null
exit 1
fi
echo "${RED}Warnning${NC}: No python found, try to locate python2..."
if [[ $(which python2) ]]; then
echo "Use python2 to build."
$(which python2) ./make.py $1
cd - > /dev/null
exit 1
fi
echo "${RED}Warnning${NC}: No python2 found, try to locate python3..."
if [[ $(which python3) ]]; then
echo "Use python3 to build."
$(which python3) ./make.py $1
cd - > /dev/null
exit 1
fi
echo "${RED}Warnning${NC}: No python3 found... Abort."
用which python的方法来得到,三段逻辑重复,之后可以写的更加好看一点
from zhao.
Related Issues (20)
- 本文档是否还会更新呢 HOT 5
- 永远记住你阮晓寰!
- 最新进展 HOT 2
- Democracy: the proletariat is in charge; Liberty: public ownership replaces private ownership
- Be wary of the false "liberty" and "democracy" that the bourgeoisie calls. HOT 4
- 反动势力可以否定**现任权力集团但不能否定共产主义事业 HOT 31
- Reactionary forces can negate China's current power bloc but cannot negate the cause of communism HOT 3
- 免翻墙查看李老师不是你老师推文 - 拆墙运动 - 软件最新版本同步密码 HOT 1
- 中文油管频道推荐列表
- 没有共产党 才有新** HOT 2
- 感谢你
- 道行还是浅了 HOT 1
- 太子党
- 只有**才能救** HOT 6
- 他的名字是阮晓寰
- 当局对阮晓寰的**不能阻止ccp的倒台,真理是杀不完的 HOT 2
- 活下去,等着解放的那一天
- **是有言论自由的 HOT 1
- 哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈 HOT 1
- 呃呃,连毛都辱我只能说贱中好似,**深蓝闹麻了😅
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zhao.