请在Django补丁教程中安装py3.txt

时间:2016-02-21 19:16:04

标签: python django python-3.x pip

我在做

时遇到了麻烦
pip install -r requirements/py3.txt

以下打印出终端

  "/private/var/folders/gv/xb_pvkg104x9y3w5cwc978qh0000gp/T/pip-build-4GjEZA/python3-memcached/memcache.py", line 1251
            print("Testing set/get {'%s': %s} ..." % (to_s(key), to_s(val)), end=' ')
                                                                                ^
        SyntaxError: invalid syntax

        ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/gv/xb_pvkg104x9y3w5cwc978qh0000gp/T/pip-build-4GjEZA/python3-memcached

教程的链接:https://docs.djangoproject.com/en/dev/intro/contributing/

1 个答案:

答案 0 :(得分:4)

看起来你正在运行python2点试图安装python3包。尝试pip -V查看它正在使用的python版本。