hplgit / doconce

Lightweight markup language - document once, include anywhere
http://hplgit.github.io/doconce/doc/web/index.html
Other
310 stars 60 forks source link

Problem with updating after change to setuptools #110

Closed KGHustad closed 7 years ago

KGHustad commented 7 years ago

In d41f1d0, distutils was replaced by setuptools. Users who installed doconce prior to this and later try to update to a more recent version, will have to remove their old installation first since distutils does not have an uninstall command.

KGHustad commented 7 years ago

Solution

Step 1: Uninstall DocOnce via pip

Run the following command several times

$ sudo pip uninstall doconce

until pip states that there is nothing to uninstall

Step 2: Verify that the DocOnce executable has also been removed

$ doconce
bash: doconce: command not found...

In some cases, the DocOnce executable survives pip uninstall, and a different error message is printed:

$ doconce
Traceback (most recent call last): 
File "/usr/bin/doconce", line 4, in <module> __import__('pkg_resources').run_script('Doconce==1.3', 'doconce') 
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 719, in run_script self.require(requires)[0].run_script(script_name, ns) 
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1502, in run_script raise ResolutionError("No script named %r" % script_name) pkg_resources.ResolutionError: No script named 'doconce'

We must then find and remove the DocOnce executable manually:

$ which doconce
PATH_TO_DOCONCE
$ rm PATH_TO_DOCONCE

Step 3: Reinstalling DocOnce

In the root of the doconce repo:

$ sudo pip install .