Maybe I need to export paths but not sure
I'm trying to use the check-html flag with linkchecker. It gives an error that the tidy module is not installed. If I say tidy at a command line I can use it. I have MacPorts installed and have installed just about every option for libt开发者_StackOverflow社区idy or tidy that has to do with python. I'm thinking it has to do with a $PATH issue or something.
So if I am using python26 and I go into python and then say import tidy there are no errors and all is well. If I use python27 I get errors when I say import tidy. I'm assuming because I installed py26-utidylib py26-pytidylib. There were no py27s. I don't mind being in python26. So it appears if I am in python26 I should be able to run tidy.
But when I run linkchecker it says the tidy module is not installed. When I say which python it says my location is /opt/local/bin/python. Do I need to export the $PATH or $PYTHONPATH or something for it to work?
if you have 2 python compilers running, be sure you use the right one with the "python"-command. you can see the used interpreter-version if you access the interactive-console with "python".
and you're right, the py26-...-library is for the python2.6 version. if there is no precompiled version you can always compile the library from the source for the required python-version. or at least, you can try. but here you have to be sure to choose the right python-interpreter to execute the setup-process. if you want the library for the 2.7-version you have to build it with 2.7-version.
you can also always check the used paths in which the current running python-interpreter is looking for modules, through the interactive python console:
python
>>> import sys
>>> sys.path
i assume you have the library installed for the wrong version, has import the wrong module ... or using it wrong :/.
maybe you could supply your code example!?
精彩评论