hplgit / doconce

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

preprocess version error #129

Closed ricopicone closed 7 years ago

ricopicone commented 7 years ago

When running

doconce format pdflatex index  --no_abort

I get (and ignore with --no_abort)

ERROR: DocOnce requires preprocess >= 1.2.2

and yet

preprocess --version

returns

preprocess 1.2.3

I ran the suggested update, anyway, but to no avail.

KGHustad commented 7 years ago

Are you sure they are installed in the same Python environment?

What output do you get with the following commands?

python -c "import preprocess; print preprocess.__file__; print preprocess.__version__"
python -c "import doconce; print doconce.__file__; print doconce.__version__"
ricopicone commented 7 years ago

Ah, I think you're right.

I get the following.

/usr/local/lib/python2.7/site-packages/preprocess.pyc
1.1.0

and

/usr/local/lib/python2.7/site-packages/doconce/__init__.pyc
1.4.3

Sorry for my ignorance (I'm pretty new to Python), but how does one update a specific Python environment's packages?

KGHustad commented 7 years ago

On Linux, pip will usually install the packages for Python 2. So you should be able to do

sudo pip install --upgrade git+https://github.com/doconce/preprocess#egg=preprocess

But if that did not work for you, then you should check where pip installs the packages. Maybe pip is symlinked to pip3 (which installs Python 3 packages) on your machine.

ricopicone commented 7 years ago

Thanks, it worked (on macOS)! It seems there are two versions of 2.7 installed (one Homebrew, one apparently came with the system).

In any case, thanks!