V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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 · Oct 5, 2012 · 4387 views
    This topic created in 4965 days ago, the information mentioned may be changed or developed.
    如题。
    我使用 Macport 安装了包后,在 cmd 中还是找不到该命令,请教一下,如何才能执行?

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

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

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

    sudo port select python python27
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3028 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 09:33 · PVG 17:33 · LAX 02:33 · JFK 05:33
    ♥ Do have faith in what you're doing.