IOError: [Errno 2] No such file or directory: 'README.rst'

IOError: [Errno 2] No such file or directory: 'README.rst'

我尝试用pip安装django_comments,然后出现这个错误(运行 in virtualenv @Windows): 回溯:

(env) E:\mdknowledge>pip install django-comments
Collecting django-comments
  Using cached django-comments-1.0.0.b.tar.bz2
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "c:\users\dell\appdata\local\temp\pip-build-pi1rwb\django-comments\setup.py", line 18, in <module> long_description = open('README.rst').read(),
    IOError: [Errno 2] No such file or directory: 'README.rst'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\dell\appdata\local\temp\pip-build-pi1rwb\django-comments

您可以使用以下命令直接从 github 安装此软件包:

$ pip install -e git+https://github.com/marazmiki/django-comments.git#egg=django-comments

我通过将我的 django-contrib-comments 模块版本从 1.6 降级到 1.5 解决了这个问题:

pip uninstall django-contrib-comments
pip install django-contrib-comments==1.5