代码之家  ›  专栏  ›  技术社区  ›  ofey

运行现有Django项目

  •  0
  • ofey  · 技术社区  · 8 年前

    https://github.com/shanegibney/djangoForum.git

    自从一年多前发布到github后,我已经从linux迁移到mac,Fedora。

    我一直在遵循,

    How to run cloned Django project?

    $mkdir djangoForum

    $cd djangoForum

    $git克隆 https://github.com/shanegibney/djangoForum.git

    这就是我得到以下错误的地方,

    (env) shanegibney at Shanes-MacBook-Pro in ~/djangoForum/djangoForum on master*
    $ pip3 install -r requirements.txt
    Collecting arrow==0.7.0 (from -r requirements.txt (line 1))
      Using cached arrow-0.7.0.tar.gz
    Collecting beautifulsoup4==4.4.1 (from -r requirements.txt (line 2))
      Using cached beautifulsoup4-4.4.1-py3-none-any.whl
    Collecting disqus==0.0.4 (from -r requirements.txt (line 3))
      Using cached disqus-0.0.4.tar.gz
    Collecting Django==1.10.2 (from -r requirements.txt (line 4))
      Using cached Django-1.10.2-py2.py3-none-any.whl
    Collecting django-allauth==0.25.2 (from -r requirements.txt (line 5))
      Using cached django-allauth-0.25.2.tar.gz
    Collecting django-allauth-bootstrap==0.1 (from -r requirements.txt (line 6))
      Using cached django-allauth-bootstrap-0.1.tar.gz
    Collecting django-emoticons==1.1.2 (from -r requirements.txt (line 7))
      Using cached django_emoticons-1.1.2-py2.py3-none-any.whl
    Collecting django-forms-bootstrap==3.0.1 (from -r requirements.txt (line 8))
      Using cached django-forms-bootstrap-3.0.1.tar.gz
    Collecting django-tinymce==2.3.0 (from -r requirements.txt (line 9))
      Using cached django-tinymce-2.3.0.tar.gz
    Collecting evernote==1.25.1 (from -r requirements.txt (line 10))
      Using cached evernote-1.25.1.tar.gz
        Complete output from command python setup.py egg_info:
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/private/var/folders/8z/jqnd9kp531q6h12pj95z0kwc0000gn/T/pip-build-_kcvo5hn/evernote/setup.py", line 6
            exec x
                 ^
        SyntaxError: Missing parentheses in call to 'exec'
    
        ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/8z/jqnd9kp531q6h12pj95z0kwc0000gn/T/pip-build-_kcvo5hn/evernote/
    

    pip 9.0.1来自/Users/shanegibney/djangoForum/env/lib/python3.6/site-packages(python 3.6)

    $python--版本

    Python 3.6.3

    $哪个python2

    不返回任何内容

    要求。txt文件在这里,

    https://github.com/shanegibney/djangoForum/blob/master/requirements.txt

    有人知道我在尝试安装需求时出错的原因吗。txt?

    尝试将我的virtualenv更改为Python2,

    路径python2(来自--python=python2)不存在

    2 回复  |  直到 8 年前
        1
  •  0
  •   Alasdair    8 年前

    这个 Evernote SDK for Python 仅支持Python 2。出现错误是因为您的虚拟环境是Python 3。激活virtualenv后, pip 也将安装到Python 3 virtualenv中。

    experimental repository for Python 3

    如果您决定使用Python 2,那么请确保在创建virtualenv时使用Python 2,例如。

    virtualenv -p python2 v
    

    然后在安装需求之前激活virtualenv。

        2
  •  0
  •   Mohammed Rishad    8 年前

    再次检查该项目中是否使用了Python2。 如果是,请使用注释安装依赖项

     pip install -r requirements.txt
    

    使用注释使用Python3创建Virtualenv

    virtualenv -p python3 env
    

    并通过安装依赖项

     pip3 install -r requirements.txt