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
meteor2013
V2EX  ›  Python

从 python 2.7 升级 pyhton3 之后,安装 Pip, Numpy 的问题, Pip, Numpy 继续在以前的 2.7 上安装。我怎么才能装在新的 pyhton3 上呢?

  •  
  •   meteor2013 · 2015-01-29 04:41:32 +08:00 · 7804 次点击
    这是一个创建于 3375 天前的主题,其中的信息可能已经有所发展或是发生改变。
    $ sudo easy_install pip
    Searching for pip
    Best match: pip 1.5.6
    Processing pip-1.5.6-py2.7.egg
    pip 1.5.6 is already the active version in easy-install.pth
    Installing pip script to /usr/local/bin
    Installing pip2.7 script to /usr/local/bin
    Installing pip2 script to /usr/local/bin

    Using /Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg
    Processing dependencies for pip
    Finished processing dependencies for pip


    我怎么才能装在新的pyhton3上呢?
    4 条回复    2015-01-29 09:30:43 +08:00
    Valyrian
        1
    Valyrian  
       2015-01-29 04:48:22 +08:00
    pip3 install numpy
    meteor2013
        2
    meteor2013  
    OP
       2015-01-29 04:59:55 +08:00
    @Valyrian

    谢谢啊,现在已经装上了。




    但是执行help( )的时候,遇到这样的问题:

    >>> help()

    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/_sitebuiltins.py", line 102, in __call__
    import pydoc
    File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/pydoc.py", line 58, in <module>
    import inspect
    File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/inspect.py", line 37, in <module>
    import linecache
    File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/linecache.py", line 10, in <module>
    import tokenize
    ImportError: bad magic number in 'tokenize': b'\x03\xf3\r\n'



    我的系统还差什么东西呢,还是需要怎么设置呢?
    meteor2013
        3
    meteor2013  
    OP
       2015-01-29 05:32:46 +08:00
    谢谢大家,重新安装了一遍之后,


    所有问题都解决了。
    est
        4
    est  
       2015-01-29 09:30:43 +08:00
    anaconda 不折腾。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1769 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 16:47 · PVG 00:47 · LAX 09:47 · JFK 12:47
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.