Why can I import a Python module from command line, but not from script? -


I have installed Python, which comes with it. I can use pdf2txt.py because the following comes from the command line:

  pdf2txt.py -o converted.html some-pdf.pdf  

Pdf2txt The Py file is located here:

  $ pdf2txt.py /usr/local/bin/pdf2txt.py  

I also import it from interactive Python command line, but to my surprise, I can not import it into a program that I am writing:

Does anyone know this Defense is why it is, and more importantly, I can do to solve it? Any suggestion will be appreciated!

Most likely because you have interpreted the interpreter from the same directory in pdf2txt.py, Put in the search path. Is your Pyro code file located in a different directory?


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -