mgedmin / restview

ReStructuredText viewer

Home Page:https://pypi.python.org/pypi/restview

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not a directory: '//anaconda/lib/python2.7/site-packages/readme/__about__.py'

scls19fr opened this issue · comments

Hello,

I'm trying to install restview msabramo/setuptools-markdown#5 (comment)

using

pip install restview

but I'm facing the following error:

Collecting restview
  Downloading restview-2.3.0.tar.gz
Requirement already satisfied (use --upgrade to upgrade): docutils in /anaconda/lib/python2.7/site-packages (from restview)
Collecting readme (from restview)
  Downloading readme-0.5.1-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): pygments in /anaconda/lib/python2.7/site-packages (from restview)
Requirement already satisfied (use --upgrade to upgrade): six in /anaconda/lib/python2.7/site-packages (from readme->restview)
Requirement already satisfied (use --upgrade to upgrade): bleach in /anaconda/lib/python2.7/site-packages (from readme->restview)
Requirement already satisfied (use --upgrade to upgrade): html5lib>=0.999 in /anaconda/lib/python2.7/site-packages (from bleach->readme->restview)
Installing collected packages: readme, restview
  Exception:
  Traceback (most recent call last):
    File "//anaconda/lib/python2.7/site-packages/pip/basecommand.py", line 246, in main
      status = self.run(options, args)
    File "//anaconda/lib/python2.7/site-packages/pip/commands/install.py", line 352, in run
      root=options.root_path,
    File "//anaconda/lib/python2.7/site-packages/pip/req/req_set.py", line 693, in install
      **kwargs
    File "//anaconda/lib/python2.7/site-packages/pip/req/req_install.py", line 817, in install
      self.move_wheel_files(self.source_dir, root=root)
    File "//anaconda/lib/python2.7/site-packages/pip/req/req_install.py", line 1018, in move_wheel_files
      isolated=self.isolated,
    File "//anaconda/lib/python2.7/site-packages/pip/wheel.py", line 237, in move_wheel_files
      clobber(source, lib_dir, True)
    File "//anaconda/lib/python2.7/site-packages/pip/wheel.py", line 215, in clobber
      shutil.copyfile(srcfile, destfile)
    File "//anaconda/lib/python2.7/shutil.py", line 83, in copyfile
      with open(dst, 'wb') as fdst:
  IOError: [Errno 20] Not a directory: '//anaconda/lib/python2.7/site-packages/readme/__about__.py'

Any idea ?

Kind regards

Looks like a bug in pip to me.

Any idea to fix it ?

I was having a similar issue. In my case, a file called README existed already in site-packages. Removing this and replacing it with a directory called readme allowed me to install restview via pip.

Oh my. Any idea where the README came from?

The README is coming from the Anaconda installation. Since I'd just installed Anaconda last week (switching from ActiveState) I went ahead and uninstalled, rebooted, cleaned everything up, and reinstalled. The file exists once the installation completes and before I install anything else.

I am installing "Just for me" so the file is C:\Users{username}\Continuum\Anaconda\Lib\site-packages\README

The full text of the file is:

This directory exists so that 3rd party packages can be installed
here. Read the source for site.py for more details.

It looks like restview uses the readme library, which of course installs in site-packages inside a readme directory. An unfortunate naming choice and conflict.

Readme is a library that will safely render arbitrary README files into HTML.

Interesting!

So it looks like anyone with a in-case-sensitive filesystem (hello Mac OS X) who uses Anaconda will have problems pip installing the readme package.

It also looks like this is not a pip bug after all: there's nothing pip can do about it.

Can you file an Anaconda bug and ask them to rename the 'README' file to 'README.txt', since currently it conflicts with a PyPI package on case-insensitive filesystems?

Thanks guys about this.
I've post on Anaconda public support group
https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/AGHXzB1sN0I

According Ilan (from Continuum - editor of Anaconda) they did nothing special with README file. He suggest to rename readme package. See https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/AGHXzB1sN0I

Oh, so it's not Anaconda, but Python's own "make install"! Amazing.

I've never seen a README in site-packages because I tend to use virtualenvs, which don't copy it over. You may try that as a workaround: instead of pip installing things into your global Python, create a virtualenv. Or perhaps try pip install --user.

Anyway, there's nothing restview can do about this, so I'm closing this bug.

Thanks but caution.... Stay tuned you may have to change

install_requires=['docutils', 'readme', 'pygments']

in setup.py

you can check dependencies using https://requires.io/

readme was renamed readme_renderer to avoid this issue and I should update my setup.py.

Fixed via #42.