Massive-Wiki / massivewikibuilder

Massive Wiki Builder
MIT License
3 stars 3 forks source link

modules not found or imported? #8

Closed band closed 3 years ago

band commented 3 years ago

Pete, this is a noobie breakdown. I followed the instructions in the Readme.md and the first time I ran mwb.py it failed on "No module name 'yaml'" error. So I installed pyyaml using pip3 and then got a "No module named 'jinja2'" error.

So there is some prerequisites that I need to take care of before running mwb.py. Or my python setup isn't correct. Or both. Or even more ....

One other thing, I am running in a venv and the version of python running there is 3.9.4.

Any suggestions?

peterkaminski commented 3 years ago

Thanks, Bill.

Assuming you've activated your venv, then you need to do this before running MWB:

pip install -r requirements.txt

(Sometimes that would be pip3, but if the venv is set up correctly, pip should work.)

Sort of a side note:

Usually, I like the venv to be in the same directory as the app, and that would totally work with MWB, putting a venv in .massivewikibuilder.

However, for MWB, so as not to put too much junk in the wiki repo, I actually have the main MWB repo somewhere else on my computer, and I activate the venv there, and then run mwb.py in .massivewikibuilder, where there is no venv.

Either way works, it would be fine to put a venv in .massivewikibuilder, but then you'd want to add it to .gitignore so the venv doesn't get checked into the repo.

band commented 3 years ago

Thanks for the response and further suggestions about how to use venv in a sensible way.

installing requirements.txt seemed to work.

peterkaminski commented 3 years ago

i've added a small to-do note in README.md, "(remember to pip install -r requirements.txt)"

with that, i'll close this issue.