mpastell / Pweave

Pweave is a scientific report generator and a literate programming tool for Python. It can capture the results and plots from data analysis and works well with numpy, scipy and matplotlib.
http://mpastell.com/pweave
Other
435 stars 64 forks source link

pweave script with python in virtualenv breaks #127

Open scfrank opened 6 years ago

scfrank commented 6 years ago

I set up a new virtualenv using python -m venv venv today, and then did pip install pweave. I then tried to pweave -f tex DOC.texw. This failed:

Traceback (most recent call last):
  File "PATH/venv/bin/pweave", line 11, in <module>
    from pweave.scripts import weave
ModuleNotFoundError: No module named 'pweave'

I was able to import pweave from within the python interpreter, so this was fairly confusing.

I managed to fix this by changing the shebang on the pweave script (in venv/bin/pweave) from #!/usr/local/opt/python/bin/python3.7 to #!/usr/bin/env python. Now pweave compiles the document as expected.

I'm using pweave version 0.30.3; python 3.7 on a Mac using homebrew python.

Thank you - I find pweave really useful!

piccolbo commented 6 years ago

Deleted my previous comment as my problem was unrelated. Sorry.