textract.process works fine when called via terminal but fails when the same code is launched via launchctl The 2019 Stack Overflow Developer Survey Results Are InWhat sets up sys.path with Python, and when?import pymongo works in Python interpreter but not scriptNeed to Put all Modules in One Folder - 2 Sets of Python “Frameworks” Installed on Mac? (System/Library/Frameworks and Library/Frameworks)How can I see the current value of my $PATH variable on OS X?nose python27 and sklearnImportError: No module named ImageDifferent loadpaths in rubypython and pythonWhy won't modules in pycrypto work?“ImportError: No module named selenium”jupyter in virtualenviroment sys.path

Match Roman Numerals

Why can't devices on different VLANs, but on the same subnet, communicate?

How can I add encounters in the Lost Mine of Phandelver campaign without giving PCs too much XP?

Time travel alters history but people keep saying nothing's changed

Is there a way to generate a uniformly distributed point on a sphere from a fixed amount of random real numbers?

Can you cast a spell on someone in the Ethereal Plane, if you are on the Material Plane and have the True Seeing spell active?

How can I define good in a religion that claims no moral authority?

Mathematics of imaging the black hole

If my opponent casts Ultimate Price on my Phantasmal Bear, can I save it by casting Snap or Curfew?

I am an eight letter word. What am I?

Short story: child made less intelligent and less attractive

Is Cinnamon a desktop environment or a window manager? (Or both?)

Is it ok to offer lower paid work as a trial period before negotiating for a full-time job?

Old scifi movie from the 50s or 60s with men in solid red uniforms who interrogate a spy from the past

Why isn't the circumferential light around the M87 black hole's event horizon symmetric?

How do PCB vias affect signal quality?

Falsification in Math vs Science

How do I free up internal storage if I don't have any apps downloaded?

Why doesn't shell automatically fix "useless use of cat"?

Why does the nucleus not repel itself?

What do these terms in Caesar's Gallic Wars mean?

How to obtain a position of last non-zero element

How do you keep chess fun when your opponent constantly beats you?

writing variables above the numbers in tikz picture



textract.process works fine when called via terminal but fails when the same code is launched via launchctl



The 2019 Stack Overflow Developer Survey Results Are InWhat sets up sys.path with Python, and when?import pymongo works in Python interpreter but not scriptNeed to Put all Modules in One Folder - 2 Sets of Python “Frameworks” Installed on Mac? (System/Library/Frameworks and Library/Frameworks)How can I see the current value of my $PATH variable on OS X?nose python27 and sklearnImportError: No module named ImageDifferent loadpaths in rubypython and pythonWhy won't modules in pycrypto work?“ImportError: No module named selenium”jupyter in virtualenviroment sys.path



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















Summary :



I am trying to parse a PDF using textract. textract.process works fine when called via terminal but fails when the same code is launched via launchctl



(Note : xxxxxxxxxx is my username crossed out)


Error Message :



The command pdf2txt.py /Users/xxxxxxxxxx/Downloads/a.pdf failed because the executable
pdf2txt.py is not installed on your system. Please make sure the appropriate dependencies are installed before using textract: http://textract.readthedocs.org/en/latest/installation.html



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

$ ls -l /usr/local/bin/pdf2txt.py
-rwxrwxrwx 1 root admin 4181 Mar 1 07:56 /usr/local/bin/pdf2txt.py


Here is the path when (logged by sys.path in my python code) launched via terminal :



['/Users/xxxxxxxxxx/Dropbox/Google Drive/My Software/Project/python', '/Library/Python/2.7/site-packages/selenium-3.5.0-py2.7.egg', '/Library/Python/2.7/site-packages/ofxclient-2.0.3-py2.7.egg', '/Library/Python/2.7/site-packages/ofxparse-0.16-py2.7.egg', '/Library/Python/2.7/site-packages/ofxhome-0.3.3-py2.7.egg', '/Library/Python/2.7/site-packages/lxml-3.8.0-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/keyring-10.4.0-py2.7.egg', '/Library/Python/2.7/site-packages/argparse-1.4.0-py2.7.egg', '/Library/Python/2.7/site-packages/six-1.10.0-py2.7.egg', '/Library/Python/2.7/site-packages/rsa-3.4.2-py2.7.egg', '/Library/Python/2.7/site-packages/httplib2-0.10.3-py2.7.egg', '/Library/Python/2.7/site-packages/gspread-0.6.2-py2.7.egg', '/Library/Python/2.7/site-packages/certifi-2017.7.27.1-py2.7.egg', '/Library/Python/2.7/site-packages/urllib3-1.22-py2.7.egg', '/Library/Python/2.7/site-packages/idna-2.6-py2.7.egg', '/Library/Python/2.7/site-packages/PyPDF2-1.26.0-py2.7.egg', '/Library/Python/2.7/site-packages/simplejson-3.11.1-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/PyGoogleVoice-0.5.2-py2.7.egg', '/Library/Python/2.7/site-packages/configparser-3.5.0-py2.7.egg', '/Library/Python/2.7/site-packages/twilio-6.7.0-py2.7.egg', '/Library/Python/2.7/site-packages/PyJWT-1.5.3-py2.7.egg', '/Library/Python/2.7/site-packages/fpdf-1.7.2-py2.7.egg', '/Library/Python/2.7/site-packages/pytesseract-0.1.7-py2.7.egg', '/Library/Python/2.7/site-packages/Pillow-4.3.0-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/olefile-0.44-py2.7.egg', '/Library/Python/2.7/site-packages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC']


Here is the path when (logged by sys.path in my python code before I modify sys.path )launched via launchctl :



/usr/bin:/bin:/usr/sbin:/sbin


Here is the path when I log sys.path after I modify sys.path to have everything listed above :



['/Users/xxxxxxxxxx/Dropbox/Google Drive/My Software/Project/python', '/Library/Python/2.7/site-packages/selenium-3.5.0-py2.7.egg', '/Library/Python/2.7/site-packages/ofxclient-2.0.3-py2.7.egg', '/Library/Python/2.7/site-packages/ofxparse-0.16-py2.7.egg', '/Library/Python/2.7/site-packages/ofxhome-0.3.3-py2.7.egg', '/Library/Python/2.7/site-packages/lxml-3.8.0-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/keyring-10.4.0-py2.7.egg', '/Library/Python/2.7/site-packages/argparse-1.4.0-py2.7.egg', '/Library/Python/2.7/site-packages/six-1.10.0-py2.7.egg', '/Library/Python/2.7/site-packages/rsa-3.4.2-py2.7.egg', '/Library/Python/2.7/site-packages/httplib2-0.10.3-py2.7.egg', '/Library/Python/2.7/site-packages/gspread-0.6.2-py2.7.egg', '/Library/Python/2.7/site-packages/certifi-2017.7.27.1-py2.7.egg', '/Library/Python/2.7/site-packages/urllib3-1.22-py2.7.egg', '/Library/Python/2.7/site-packages/idna-2.6-py2.7.egg', '/Library/Python/2.7/site-packages/PyPDF2-1.26.0-py2.7.egg', '/Library/Python/2.7/site-packages/simplejson-3.11.1-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/PyGoogleVoice-0.5.2-py2.7.egg', '/Library/Python/2.7/site-packages/configparser-3.5.0-py2.7.egg', '/Library/Python/2.7/site-packages/twilio-6.7.0-py2.7.egg', '/Library/Python/2.7/site-packages/PyJWT-1.5.3-py2.7.egg', '/Library/Python/2.7/site-packages/fpdf-1.7.2-py2.7.egg', '/Library/Python/2.7/site-packages/pytesseract-0.1.7-py2.7.egg', '/Library/Python/2.7/site-packages/Pillow-4.3.0-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/olefile-0.44-py2.7.egg', '/Library/Python/2.7/site-packages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Frameworks/Python.framework/Versions/2.7/bin', '/opt/local/bin', '/opt/local/sbin', '/usr/local/bin', '/usr/bin', '/bin', '/usr/sbin', '/sbin', '/opt/X11/bin', '/usr/local/git/bin']


Here is the .plist :



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.Project.restartProject
</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/python</string>
<string>/Users/xxxxxxxxxx/Dropbox/Google Drive/My Software/Project/python/restartProject.py</string>
<string>/usr/bin/python</string>
<string>/usr/local/bin/pdf2txt.py</string>
</array>
<key>KeepAlive</key>
<true/>
</dict>
</plist>









share|improve this question




























    1















    Summary :



    I am trying to parse a PDF using textract. textract.process works fine when called via terminal but fails when the same code is launched via launchctl



    (Note : xxxxxxxxxx is my username crossed out)


    Error Message :



    The command pdf2txt.py /Users/xxxxxxxxxx/Downloads/a.pdf failed because the executable
    pdf2txt.py is not installed on your system. Please make sure the appropriate dependencies are installed before using textract: http://textract.readthedocs.org/en/latest/installation.html



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

    $ ls -l /usr/local/bin/pdf2txt.py
    -rwxrwxrwx 1 root admin 4181 Mar 1 07:56 /usr/local/bin/pdf2txt.py


    Here is the path when (logged by sys.path in my python code) launched via terminal :



    ['/Users/xxxxxxxxxx/Dropbox/Google Drive/My Software/Project/python', '/Library/Python/2.7/site-packages/selenium-3.5.0-py2.7.egg', '/Library/Python/2.7/site-packages/ofxclient-2.0.3-py2.7.egg', '/Library/Python/2.7/site-packages/ofxparse-0.16-py2.7.egg', '/Library/Python/2.7/site-packages/ofxhome-0.3.3-py2.7.egg', '/Library/Python/2.7/site-packages/lxml-3.8.0-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/keyring-10.4.0-py2.7.egg', '/Library/Python/2.7/site-packages/argparse-1.4.0-py2.7.egg', '/Library/Python/2.7/site-packages/six-1.10.0-py2.7.egg', '/Library/Python/2.7/site-packages/rsa-3.4.2-py2.7.egg', '/Library/Python/2.7/site-packages/httplib2-0.10.3-py2.7.egg', '/Library/Python/2.7/site-packages/gspread-0.6.2-py2.7.egg', '/Library/Python/2.7/site-packages/certifi-2017.7.27.1-py2.7.egg', '/Library/Python/2.7/site-packages/urllib3-1.22-py2.7.egg', '/Library/Python/2.7/site-packages/idna-2.6-py2.7.egg', '/Library/Python/2.7/site-packages/PyPDF2-1.26.0-py2.7.egg', '/Library/Python/2.7/site-packages/simplejson-3.11.1-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/PyGoogleVoice-0.5.2-py2.7.egg', '/Library/Python/2.7/site-packages/configparser-3.5.0-py2.7.egg', '/Library/Python/2.7/site-packages/twilio-6.7.0-py2.7.egg', '/Library/Python/2.7/site-packages/PyJWT-1.5.3-py2.7.egg', '/Library/Python/2.7/site-packages/fpdf-1.7.2-py2.7.egg', '/Library/Python/2.7/site-packages/pytesseract-0.1.7-py2.7.egg', '/Library/Python/2.7/site-packages/Pillow-4.3.0-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/olefile-0.44-py2.7.egg', '/Library/Python/2.7/site-packages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC']


    Here is the path when (logged by sys.path in my python code before I modify sys.path )launched via launchctl :



    /usr/bin:/bin:/usr/sbin:/sbin


    Here is the path when I log sys.path after I modify sys.path to have everything listed above :



    ['/Users/xxxxxxxxxx/Dropbox/Google Drive/My Software/Project/python', '/Library/Python/2.7/site-packages/selenium-3.5.0-py2.7.egg', '/Library/Python/2.7/site-packages/ofxclient-2.0.3-py2.7.egg', '/Library/Python/2.7/site-packages/ofxparse-0.16-py2.7.egg', '/Library/Python/2.7/site-packages/ofxhome-0.3.3-py2.7.egg', '/Library/Python/2.7/site-packages/lxml-3.8.0-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/keyring-10.4.0-py2.7.egg', '/Library/Python/2.7/site-packages/argparse-1.4.0-py2.7.egg', '/Library/Python/2.7/site-packages/six-1.10.0-py2.7.egg', '/Library/Python/2.7/site-packages/rsa-3.4.2-py2.7.egg', '/Library/Python/2.7/site-packages/httplib2-0.10.3-py2.7.egg', '/Library/Python/2.7/site-packages/gspread-0.6.2-py2.7.egg', '/Library/Python/2.7/site-packages/certifi-2017.7.27.1-py2.7.egg', '/Library/Python/2.7/site-packages/urllib3-1.22-py2.7.egg', '/Library/Python/2.7/site-packages/idna-2.6-py2.7.egg', '/Library/Python/2.7/site-packages/PyPDF2-1.26.0-py2.7.egg', '/Library/Python/2.7/site-packages/simplejson-3.11.1-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/PyGoogleVoice-0.5.2-py2.7.egg', '/Library/Python/2.7/site-packages/configparser-3.5.0-py2.7.egg', '/Library/Python/2.7/site-packages/twilio-6.7.0-py2.7.egg', '/Library/Python/2.7/site-packages/PyJWT-1.5.3-py2.7.egg', '/Library/Python/2.7/site-packages/fpdf-1.7.2-py2.7.egg', '/Library/Python/2.7/site-packages/pytesseract-0.1.7-py2.7.egg', '/Library/Python/2.7/site-packages/Pillow-4.3.0-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/olefile-0.44-py2.7.egg', '/Library/Python/2.7/site-packages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Frameworks/Python.framework/Versions/2.7/bin', '/opt/local/bin', '/opt/local/sbin', '/usr/local/bin', '/usr/bin', '/bin', '/usr/sbin', '/sbin', '/opt/X11/bin', '/usr/local/git/bin']


    Here is the .plist :



    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd >
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>com.Project.restartProject
    </string>
    <key>ProgramArguments</key>
    <array>
    <string>/usr/bin/python</string>
    <string>/Users/xxxxxxxxxx/Dropbox/Google Drive/My Software/Project/python/restartProject.py</string>
    <string>/usr/bin/python</string>
    <string>/usr/local/bin/pdf2txt.py</string>
    </array>
    <key>KeepAlive</key>
    <true/>
    </dict>
    </plist>









    share|improve this question
























      1












      1








      1








      Summary :



      I am trying to parse a PDF using textract. textract.process works fine when called via terminal but fails when the same code is launched via launchctl



      (Note : xxxxxxxxxx is my username crossed out)


      Error Message :



      The command pdf2txt.py /Users/xxxxxxxxxx/Downloads/a.pdf failed because the executable
      pdf2txt.py is not installed on your system. Please make sure the appropriate dependencies are installed before using textract: http://textract.readthedocs.org/en/latest/installation.html



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

      $ ls -l /usr/local/bin/pdf2txt.py
      -rwxrwxrwx 1 root admin 4181 Mar 1 07:56 /usr/local/bin/pdf2txt.py


      Here is the path when (logged by sys.path in my python code) launched via terminal :



      ['/Users/xxxxxxxxxx/Dropbox/Google Drive/My Software/Project/python', '/Library/Python/2.7/site-packages/selenium-3.5.0-py2.7.egg', '/Library/Python/2.7/site-packages/ofxclient-2.0.3-py2.7.egg', '/Library/Python/2.7/site-packages/ofxparse-0.16-py2.7.egg', '/Library/Python/2.7/site-packages/ofxhome-0.3.3-py2.7.egg', '/Library/Python/2.7/site-packages/lxml-3.8.0-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/keyring-10.4.0-py2.7.egg', '/Library/Python/2.7/site-packages/argparse-1.4.0-py2.7.egg', '/Library/Python/2.7/site-packages/six-1.10.0-py2.7.egg', '/Library/Python/2.7/site-packages/rsa-3.4.2-py2.7.egg', '/Library/Python/2.7/site-packages/httplib2-0.10.3-py2.7.egg', '/Library/Python/2.7/site-packages/gspread-0.6.2-py2.7.egg', '/Library/Python/2.7/site-packages/certifi-2017.7.27.1-py2.7.egg', '/Library/Python/2.7/site-packages/urllib3-1.22-py2.7.egg', '/Library/Python/2.7/site-packages/idna-2.6-py2.7.egg', '/Library/Python/2.7/site-packages/PyPDF2-1.26.0-py2.7.egg', '/Library/Python/2.7/site-packages/simplejson-3.11.1-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/PyGoogleVoice-0.5.2-py2.7.egg', '/Library/Python/2.7/site-packages/configparser-3.5.0-py2.7.egg', '/Library/Python/2.7/site-packages/twilio-6.7.0-py2.7.egg', '/Library/Python/2.7/site-packages/PyJWT-1.5.3-py2.7.egg', '/Library/Python/2.7/site-packages/fpdf-1.7.2-py2.7.egg', '/Library/Python/2.7/site-packages/pytesseract-0.1.7-py2.7.egg', '/Library/Python/2.7/site-packages/Pillow-4.3.0-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/olefile-0.44-py2.7.egg', '/Library/Python/2.7/site-packages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC']


      Here is the path when (logged by sys.path in my python code before I modify sys.path )launched via launchctl :



      /usr/bin:/bin:/usr/sbin:/sbin


      Here is the path when I log sys.path after I modify sys.path to have everything listed above :



      ['/Users/xxxxxxxxxx/Dropbox/Google Drive/My Software/Project/python', '/Library/Python/2.7/site-packages/selenium-3.5.0-py2.7.egg', '/Library/Python/2.7/site-packages/ofxclient-2.0.3-py2.7.egg', '/Library/Python/2.7/site-packages/ofxparse-0.16-py2.7.egg', '/Library/Python/2.7/site-packages/ofxhome-0.3.3-py2.7.egg', '/Library/Python/2.7/site-packages/lxml-3.8.0-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/keyring-10.4.0-py2.7.egg', '/Library/Python/2.7/site-packages/argparse-1.4.0-py2.7.egg', '/Library/Python/2.7/site-packages/six-1.10.0-py2.7.egg', '/Library/Python/2.7/site-packages/rsa-3.4.2-py2.7.egg', '/Library/Python/2.7/site-packages/httplib2-0.10.3-py2.7.egg', '/Library/Python/2.7/site-packages/gspread-0.6.2-py2.7.egg', '/Library/Python/2.7/site-packages/certifi-2017.7.27.1-py2.7.egg', '/Library/Python/2.7/site-packages/urllib3-1.22-py2.7.egg', '/Library/Python/2.7/site-packages/idna-2.6-py2.7.egg', '/Library/Python/2.7/site-packages/PyPDF2-1.26.0-py2.7.egg', '/Library/Python/2.7/site-packages/simplejson-3.11.1-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/PyGoogleVoice-0.5.2-py2.7.egg', '/Library/Python/2.7/site-packages/configparser-3.5.0-py2.7.egg', '/Library/Python/2.7/site-packages/twilio-6.7.0-py2.7.egg', '/Library/Python/2.7/site-packages/PyJWT-1.5.3-py2.7.egg', '/Library/Python/2.7/site-packages/fpdf-1.7.2-py2.7.egg', '/Library/Python/2.7/site-packages/pytesseract-0.1.7-py2.7.egg', '/Library/Python/2.7/site-packages/Pillow-4.3.0-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/olefile-0.44-py2.7.egg', '/Library/Python/2.7/site-packages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Frameworks/Python.framework/Versions/2.7/bin', '/opt/local/bin', '/opt/local/sbin', '/usr/local/bin', '/usr/bin', '/bin', '/usr/sbin', '/sbin', '/opt/X11/bin', '/usr/local/git/bin']


      Here is the .plist :



      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd >
      <plist version="1.0">
      <dict>
      <key>Label</key>
      <string>com.Project.restartProject
      </string>
      <key>ProgramArguments</key>
      <array>
      <string>/usr/bin/python</string>
      <string>/Users/xxxxxxxxxx/Dropbox/Google Drive/My Software/Project/python/restartProject.py</string>
      <string>/usr/bin/python</string>
      <string>/usr/local/bin/pdf2txt.py</string>
      </array>
      <key>KeepAlive</key>
      <true/>
      </dict>
      </plist>









      share|improve this question














      Summary :



      I am trying to parse a PDF using textract. textract.process works fine when called via terminal but fails when the same code is launched via launchctl



      (Note : xxxxxxxxxx is my username crossed out)


      Error Message :



      The command pdf2txt.py /Users/xxxxxxxxxx/Downloads/a.pdf failed because the executable
      pdf2txt.py is not installed on your system. Please make sure the appropriate dependencies are installed before using textract: http://textract.readthedocs.org/en/latest/installation.html



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

      $ ls -l /usr/local/bin/pdf2txt.py
      -rwxrwxrwx 1 root admin 4181 Mar 1 07:56 /usr/local/bin/pdf2txt.py


      Here is the path when (logged by sys.path in my python code) launched via terminal :



      ['/Users/xxxxxxxxxx/Dropbox/Google Drive/My Software/Project/python', '/Library/Python/2.7/site-packages/selenium-3.5.0-py2.7.egg', '/Library/Python/2.7/site-packages/ofxclient-2.0.3-py2.7.egg', '/Library/Python/2.7/site-packages/ofxparse-0.16-py2.7.egg', '/Library/Python/2.7/site-packages/ofxhome-0.3.3-py2.7.egg', '/Library/Python/2.7/site-packages/lxml-3.8.0-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/keyring-10.4.0-py2.7.egg', '/Library/Python/2.7/site-packages/argparse-1.4.0-py2.7.egg', '/Library/Python/2.7/site-packages/six-1.10.0-py2.7.egg', '/Library/Python/2.7/site-packages/rsa-3.4.2-py2.7.egg', '/Library/Python/2.7/site-packages/httplib2-0.10.3-py2.7.egg', '/Library/Python/2.7/site-packages/gspread-0.6.2-py2.7.egg', '/Library/Python/2.7/site-packages/certifi-2017.7.27.1-py2.7.egg', '/Library/Python/2.7/site-packages/urllib3-1.22-py2.7.egg', '/Library/Python/2.7/site-packages/idna-2.6-py2.7.egg', '/Library/Python/2.7/site-packages/PyPDF2-1.26.0-py2.7.egg', '/Library/Python/2.7/site-packages/simplejson-3.11.1-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/PyGoogleVoice-0.5.2-py2.7.egg', '/Library/Python/2.7/site-packages/configparser-3.5.0-py2.7.egg', '/Library/Python/2.7/site-packages/twilio-6.7.0-py2.7.egg', '/Library/Python/2.7/site-packages/PyJWT-1.5.3-py2.7.egg', '/Library/Python/2.7/site-packages/fpdf-1.7.2-py2.7.egg', '/Library/Python/2.7/site-packages/pytesseract-0.1.7-py2.7.egg', '/Library/Python/2.7/site-packages/Pillow-4.3.0-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/olefile-0.44-py2.7.egg', '/Library/Python/2.7/site-packages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC']


      Here is the path when (logged by sys.path in my python code before I modify sys.path )launched via launchctl :



      /usr/bin:/bin:/usr/sbin:/sbin


      Here is the path when I log sys.path after I modify sys.path to have everything listed above :



      ['/Users/xxxxxxxxxx/Dropbox/Google Drive/My Software/Project/python', '/Library/Python/2.7/site-packages/selenium-3.5.0-py2.7.egg', '/Library/Python/2.7/site-packages/ofxclient-2.0.3-py2.7.egg', '/Library/Python/2.7/site-packages/ofxparse-0.16-py2.7.egg', '/Library/Python/2.7/site-packages/ofxhome-0.3.3-py2.7.egg', '/Library/Python/2.7/site-packages/lxml-3.8.0-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/keyring-10.4.0-py2.7.egg', '/Library/Python/2.7/site-packages/argparse-1.4.0-py2.7.egg', '/Library/Python/2.7/site-packages/six-1.10.0-py2.7.egg', '/Library/Python/2.7/site-packages/rsa-3.4.2-py2.7.egg', '/Library/Python/2.7/site-packages/httplib2-0.10.3-py2.7.egg', '/Library/Python/2.7/site-packages/gspread-0.6.2-py2.7.egg', '/Library/Python/2.7/site-packages/certifi-2017.7.27.1-py2.7.egg', '/Library/Python/2.7/site-packages/urllib3-1.22-py2.7.egg', '/Library/Python/2.7/site-packages/idna-2.6-py2.7.egg', '/Library/Python/2.7/site-packages/PyPDF2-1.26.0-py2.7.egg', '/Library/Python/2.7/site-packages/simplejson-3.11.1-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/PyGoogleVoice-0.5.2-py2.7.egg', '/Library/Python/2.7/site-packages/configparser-3.5.0-py2.7.egg', '/Library/Python/2.7/site-packages/twilio-6.7.0-py2.7.egg', '/Library/Python/2.7/site-packages/PyJWT-1.5.3-py2.7.egg', '/Library/Python/2.7/site-packages/fpdf-1.7.2-py2.7.egg', '/Library/Python/2.7/site-packages/pytesseract-0.1.7-py2.7.egg', '/Library/Python/2.7/site-packages/Pillow-4.3.0-py2.7-macosx-10.12-intel.egg', '/Library/Python/2.7/site-packages/olefile-0.44-py2.7.egg', '/Library/Python/2.7/site-packages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Frameworks/Python.framework/Versions/2.7/bin', '/opt/local/bin', '/opt/local/sbin', '/usr/local/bin', '/usr/bin', '/bin', '/usr/sbin', '/sbin', '/opt/X11/bin', '/usr/local/git/bin']


      Here is the .plist :



      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd >
      <plist version="1.0">
      <dict>
      <key>Label</key>
      <string>com.Project.restartProject
      </string>
      <key>ProgramArguments</key>
      <array>
      <string>/usr/bin/python</string>
      <string>/Users/xxxxxxxxxx/Dropbox/Google Drive/My Software/Project/python/restartProject.py</string>
      <string>/usr/bin/python</string>
      <string>/usr/local/bin/pdf2txt.py</string>
      </array>
      <key>KeepAlive</key>
      <true/>
      </dict>
      </plist>






      python macos launchd launchctl






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 8 at 11:06









      Alternate JonesAlternate Jones

      63




      63






















          0






          active

          oldest

          votes












          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55061906%2ftextract-process-works-fine-when-called-via-terminal-but-fails-when-the-same-cod%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55061906%2ftextract-process-works-fine-when-called-via-terminal-but-fails-when-the-same-cod%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

          Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

          Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved