[英]python installation path
I've tried making a package for my python project, and this has an sh script that does some post install python setup.py install for some dependencies/subprojects.我已经尝试为我的 python 项目制作一个 package,并且这有一个 sh 脚本,可以为一些依赖项/子项目安装 python setup.py 安装。 But turns out that MacOS installer creates it's own context and screws up some paths so going simply:
但事实证明,MacOS 安装程序创建了它自己的上下文并搞砸了一些路径,所以很简单:
python setup.py install - won't work
One solution that seems to help is to do:一种似乎有帮助的解决方案是:
usr/local/bin/python setup.py install
Now I'm kind of a newbie to MacOS so here are my questions:现在我是 MacOS 的新手,所以这是我的问题:
Regards, Bogdan问候, 博格丹
You most certainly can not assume that python is installed there.您当然不能假设 python 安装在那里。 If python is properly installed, it should be in the
$PATH
, otherewise you just can't know.如果 python 安装正确,它应该在
$PATH
中,否则你无法知道。 I could have installed it at /whatever/snake-program/
, if it wasn't in the path, how could you guess?我可以将它安装在
/whatever/snake-program/
,如果它不在路径中,你怎么能猜到?
EDIT: What do you mean $PATH
contains a lot more by the way?编辑:你是什么意思
$PATH
顺便说一句包含更多? As long as there aren't more than one python install, that shouldn't matter.只要安装的 python 不超过一个,那没关系。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.