Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'explicitly': 0.05; 'root': 0.05; 'variables': 0.07; '__init__': 0.09; 'executable': 0.09; 'reinstall': 0.09; 'url:github': 0.09; 'suggest': 0.14; 'windows': 0.15; '#this': 0.16; '39,': 0.16; '66,': 0.16; 'exe': 0.16; 'fails.': 0.16; 'latter,': 0.16; 'list)': 0.16; 'skip:" 70': 0.16; 'spit': 0.16; 'subject:fails': 0.16; 'subject:windows': 0.16; 'sys.path': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'entered': 0.20; 'import': 0.22; 'install': 0.23; 'header:User-Agent:1': 0.23; 'error': 0.23; 'exists': 0.24; 'module,': 0.24; 'specify': 0.24; 'fine': 0.24; 'looks': 0.24; 'environment': 0.24; 'script': 0.25; 'header:In-Reply-To:1': 0.27; 'installed': 0.27; 'robert': 0.30; '(which': 0.31; 'url:wiki': 0.31; '"",': 0.31; '>>>>': 0.31; 'loading': 0.31; 'file': 0.32; 'figure': 0.32; '(most': 0.33; 'mac': 0.33; 'there,': 0.34; "i'd": 0.34; 'but': 0.35; 'add': 0.35; 'doing': 0.36; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'rather': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'either': 0.39; 'skip:p 20': 0.39; 'called': 0.40; 'read': 0.60; 'subject: ': 0.61; 'full': 0.61; 'skip:* 10': 0.61; 'received:74.208': 0.68; 'home': 0.69 Date: Fri, 31 Oct 2014 13:02:01 -0400 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Implementing pdfkit and wkhtmltopdf on windows fails References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:qqesf9RJVXKBk/3REh/We3/+BPqVEXoAKs/t2y7HIf/ PWKDULfott1JXytKhaK9GM7wkQ8J0EqSOBEg/n/mD9Ylxr8ORY pDLILhdTaszI1QWgAhQv2QTgvY+aUFm9jOPd8QYWEIti83T2Gq XM8/oPy1svVCpvLWmHDXEmIY3Z9EMYOviGo/sFwuZzv9cC9iC4 xcQhHFpKumG1AjYJLyQXMOQ2G2DHatHI+s1umiv6T1u+smlEq0 CZBUyp9kozez+QTXt6dknWiKYmB8b7BRvBG0IBp8SNvC91RB5I Cnp4mM4RpSAIoB2/Z5SQdY92UJKocWdikL3sGqoYnP3uqqQMnI ZuU0cTTzkmd3SxP//MGU= X-UI-Out-Filterresults: notjunk:1; X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 44 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1414774933 news.xs4all.nl 2963 [2001:888:2000:d::a6]:58570 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:80027 On 10/31/2014 12:46 PM, robert brook wrote: > I am able to install both of these packages on my mac at home and it works well. > > I am trying to install on windows 7 at work and it fails. PDFKit is trying to find the wkh package and it cannot. I have entered the full path to the exe for the environment variables and the error below is spit out. > > If I explicitly cd into the directory that has the executable the script works fine > >>>> import os >>>> path='C:\\wkhtmltopdf\\bin\\' >>>> os.chdir(path) >>>> pdfkit.from_string('Hello!', 'out.pdf') > Loading pages (1/6) #this works after cd into the exe directory > > > Where can I specify the path to the executable? > > ************* > Traceback (most recent call last): > File "", line 1, in > File "C:\Applications\python_33_32_bit\lib\site-packages\pdfkit-0.4.1-py3.3.eg > g\pdfkit\api.py", line 66, in from_string > File "C:\Applications\python_33_32_bit\lib\site-packages\pdfkit-0.4.1-py3.3.eg > g\pdfkit\pdfkit.py", line 39, in __init__ > File "C:\Applications\python_33_32_bit\lib\site-packages\pdfkit-0.4.1-py3.3.eg > g\pdfkit\configuration.py", line 27, in __init__ > OSError: No wkhtmltopdf executable found: "b''" > If this file exists please check that this process can read it. Otherwise please > install wkhtmltopdf - https://github.com/JazzCore/python-pdfkit/wiki/Installing > -wkhtmltopdf > > ********************** > I don't know your particular module, but generally, you want modules installed on your sys.path. Either install it there, or add the directory to sys.path (which is a list) I'd suggest doing the latter, then figure whether a reinstall is called for. It looks like you installed it in the root directory of C:, rather than in the site-packages. -- DaveA