V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
Hualin
V2EX  ›  Python

使用 MacPorts 安装 ipython 及 py-pip 后 如何在命令行执行?

  •  
  •   Hualin · 2012-10-05 08:23:49 +08:00 · 3839 次点击
    这是一个创建于 4227 天前的主题,其中的信息可能已经有所发展或是发生改变。
    如题。
    我使用 Macport 安装了包后,在 cmd 中还是找不到该命令,请教一下,如何才能执行?

    网上看到有太多的安装方法,我就想知道用 macport 怎么装。但对于 macport 安装了包后如何执行还没找到文档提到,或者我看不懂,我不会设 mac 系统的 path,也不敢确定 pip 和 ipython 的 bin 现在到底在哪,应该把哪个目录加进去?

    我感觉没人提这种问题,只能说明这个问题是显而易见的,或者是常识。
    2 条回复    1970-01-01 08:00:00 +08:00
    Hualin
        1
    Hualin  
    OP
       2012-10-05 08:28:06 +08:00
    还有 我注意到 port installed 命令后有 py27-nose 这个包,我在 python 下执行测试用例仍然蹦出 找不到 nose 这个包,说明 python 解释器找不到 macport 安装的包。肯定有那个目录或者命令我遗漏了。
    Livid
        2
    Livid  
    MOD
       2012-10-05 08:34:04 +08:00
    MacPorts 安装的 Python 位于 /opt/local/bin/python2.7

    如果你想使用 MacPorts 版本的 Python,你需要执行:

    sudo port select python python27
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2296 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 08:58 · PVG 16:58 · LAX 01:58 · JFK 04:58
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.