I'm using 64 bit Ubuntu 12.04. When i'm installed wkhtmltopdf package. When I print web kit report it's show following error.
Wkhtmltopdf library path is not set
Please install executable on your system (sudo apt-get install wkhtmltopdf) or download it from here: http://code.google.com/p/wkhtmltopdf/downloads/list and set the path in the ir.config_parameter with the webkit_path key.Minimal version is 0.9.9
Please Help me to configure the webkit package
I had the same issue, i solved mine using this one
http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.11.0_rc1-static-amd64.tar.bz2
everything else is same as #Adrian Merrall explained.
Easiest is to just head to http://wkhtmltopdf.org/ and grab the 64 bit download rather than use the deb package (although that should work too).
Unpack it somewhere and ensure the same user running OpenERP has execute rights on it.
Test from bash with wkhtmltopdf --version
In OpenERP - Settings -> Parameters -> System Parameters -> webkit_path
Set to the full path, e.g.
/usr/local/bin/wkhtmltopdf
and you should be in business
Related
I am trying to extract tabular data from pdf using camelot and I am getting the following error.
Code:
tables = camelot.read_pdf(file_name)
Error:
GhostscriptNotFound: Please make sure that Ghostscript is installed and available on the PATH environment variable
I have already installed Ghostscript and I have it available on the PATH environment variable.
Please find below version details:
Windows-10-10.0.17134-SP0
Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)]
NumPy 1.14.3
openCV 3.4.3
Camelot 0.3.2
Please help resolve this issue.
Adding both the "bin" and "lib" paths for Ghostscript to the PATH worked for me:
C:\Program Files\gs\gs9.26\bin
C:\Program Files\gs\gs9.26\lib
I unistalled the 64bit and
Install the 32bit version
Add the following two paths on Windows Environment Variables:
C:\Program Files(x86)\gs\gs9.26\bin
C:\Program Files(x86)\gs\gs9.26\lib
and now it works
Download Ghostscript from here https://www.ghostscript.com/download/gsdnld.html and add it to the path if required
For me using brew link -f --overwrite ghostscript solved the issue.
I would recommend checking the suggested solutions on https://github.com/atlanhq/camelot/issues/282. That's where I also found my fix.
Tried all the solutions. The only option that works is to use 32 bit ghostscript.
I had the same problem. I solved it by uninstalling the 64 bit version and installing the 32 bit version.
I realized that. If you are using the Python 64bit you need install ghostcript64 bit, else 32 bit.
Also set path for 64bit:
C:\Program Files\gs\gs9.26\bin
C:\Program Files\gs\gs9.26\lib
or for below for 32bit
C:\Program Files(x86)\gs\gs9.26\bin
C:\Program Files(x86)\gs\gs9.26\lib
Here is my solution (Windows OS (11, 64 BIT)):
Download and install the desired ghost version you wish (32,64 - does not matter)
Using "dir /x" command, get the short version of the path of your installation (c:\progra~1\blahbla...). My location (I love altering the default suggestion) is "C:\Program Files\gs\GPLGhostScript" and the short name is "c:\progra~1\gs\GPLGhostScript"
Add this to the path together with \bin. In my case "c:\progra~1\gs\GPLGhostScript\bin" (no need for lib path as suggested by others)
Restart your PC
Test your installation of GhostScript according to this link.
Good luck :)
This worked for me:
C:\Program Files\gs\gs9.55.0\bin
Just find the path location, copy it, and paste it into user and system variables Path (Environment variables).
I solved this problem.
I downloaded Ghostscript.
Then installed it at C:/programfiles.
Added set path: C:\Program Files\gs\gs9.26\bin + C:\Program Files\gs\gs9.26\lib
Restarted my computer.
After these steps, it worked.
A very simple way is to install Ghostscript from the official website.
Then give the location while set-up the library in the Anaconda script folder. Wait for 10 minutes after closing the Python platforms.
I was facing same issue for 2 days. I found solution at below link.
for windows 10, I used below method
in "search the web and windows" write "under edit environment variable for your account in control panel."
edit path for lib and bin library of Ghostscript here. add ; to separate the path at end also.
set path in environment variable
For more info used below link. It worked fine for me.
https://github.com/atlanhq/camelot/issues/465#issuecomment-975976344
For me, uninstalling camelot and re-installing with
conda install -c conda-forge camelot-py instead of pip solved the problem (as ghostscript is also re-installed)
In case you are fed up with all the errors derived from the usage of Ghostscript and want to find a way to use Camelot without using Ghostscript, here is the fork of it which does not rely on it.
Camelot fork without Ghostscript
Installation guide is similar, but this time from the github repo itself.
First, install these dependencies:
!pip install pdf2image
!pip install python-dateutil
!apt-get install poppler-utils
Then clone the repo
$ git clone https://www.github.com/h2oai/camelot
Finally, go to the repo directory and install camelot from there.
$ cd camelot
$ pip install ".[base]"
Import camelot and happily use it :)
This is how I solved for this error on a Windows computer, similar to what Alexander Garzo posted:
Went to File Explorer -> C drive -> Program Files -> gs -> gs9.55.0 -> shift-clicked on bin folder -> copied as path ("C:\Program Files\gs\gs9.55.0\bin")
Then went to environmental variables -> Path -> Edit -> New -> pasted above -> OK -> restarted computer.
I then ran the following code in Python:
import ctypes
from ctypes.util import find_library
find_library("".join(("gsdll", str(ctypes.sizeof(ctypes.c_voidp) * 8), ".dll")))
The output was "C:\Program Files\gs\gs9.55.0\bin\gsdll64.dll" which means the solution worked. I was then able to install and use Camelot with no problems.
I was getting this Error (OSError: Ghostscript is not installed. You can install it using the instructions here: https://camelot-py.readthedocs.io/en/master/user/install-deps.html)
I tried everything mentioned here and also in Github.
but after installing Ghostscript from here and then adding to the PATH.
I keep trying methods to solve it.
BUT the solution is to just Restart your computer and everything Works.
so Restart is Must.
I am trying to install python through cygwin on a windows machine in order to make use of a statistical program that can only be implemented using python in a linux environment.
I have run setup-x86_64.exe and installed all python related cygwin packages in an attempt to install python, but when I open a terminal and type python I just get
$ python
-bash: python: command not found
which is the same for all python commands I try so clearly the installation has not occurred. However, I have found a path to Python-2.7.9 which appears to contain the files required to build python from source.
When I run ./configure it is successful, but when I then input make it fails due to:
File "build/temp.cygwin-1.7.35-x86_64-2.7/libffi/fficonfig.py", line 33, in <module>
ffi_sources += ffi_platforms['X86_WIN64']
KeyError: 'X86_WIN64'
Makefile:488: recipe for target 'sharedmods' failed
make: *** [sharedmods] Error 1
Anyone know why make won't work?
The options in ./configure --help are unfamiliar to me, could any of these options allow for successful installation?
Any ideas would be greatly appreciated, thank you.
Cygwin comes with an installer, called setup.exe or setup-x86_64.exe. Just run it and type python to the search box. Then let it install it for you.
python language interpreter is the basic package you need.
So, this question is 3 years old, but this error still happens with most recent versions of Python 2 (tested with 2.7.13 and 2.7.15)
I was able to get python to build by modifying the following file in the build directory.
--- build/temp.cygwin-2.11.1-x86_64-2.7/libffi/fficonfig.py~ 2018-11-03 14:51:53.290000000 -0400
+++ build/temp.cygwin-2.11.1-x86_64-2.7/libffi/fficonfig.py 2018-11-03 14:53:41.793000000 -0400
## -9,6 +9,7 ##
'X86': ['src/x86/ffi.c', 'src/x86/sysv.S', 'src/x86/win32.S'],
'X86_FREEBSD': ['src/x86/ffi.c', 'src/x86/freebsd.S'],
'X86_WIN32': ['src/x86/ffi.c', 'src/x86/win32.S'],
+ 'X86_WIN64': ['src/x86/ffi.c', 'src/x86/win64.S'],
'SPARC': ['src/sparc/ffi.c', 'src/sparc/v8.S', 'src/sparc/v9.S'],
'ALPHA': ['src/alpha/ffi.c', 'src/alpha/osf.S'],
'IA64': ['src/ia64/ffi.c', 'src/ia64/unix.S'],
The source files, in particular src/x86/win64.S, are present in the source tree. For some reason, ./configure does not seem to be properly adding the option to the dictionary in the fficonfig.py file, which causes the KeyError posted in the question. After making this modification, make and make install completed successfully and I was able to install an alternate version of python in addition to the normal Cygwin package.
I'm not yet sure why this happens, but I thought I would attempt to provide a solution to the question actually asked rather than just telling the asker to install a pre-compiled version using the package manager.
Since building Python from source was said to be a bad idea, I assumed my Cygwin was broken. I attempted to uninstall Cygwin following the instructions on the Cygwin website, but I was unable to remove it due to permission difficulties (I use a university-supplied Windows machine). My last resort was to run the Cygwin installation wizard setup-x86_64.exe and uninstall all packages, then run the wizard once more and select the necessary packages again as if starting from new. Miraculously, installing the required packages from scratch solved the problem and I am now running Python through my Cygwin terminal with no errors.
If you want to run Python on Cygwin, you might need to build it from source.
download the source
unpack it to the directory you could delete later, eg: build
run Cygwin, type: cd /path/to/build
run ./configure --help and read the help about the options you'll need
./configure #options
make
I am working my way through a video tutorial at http://gettingstartedwithdjango.com/en/lessons/introduction-and-launch/
I am working on win7 and using git-bash for my terminal. I have installed the latest virtualbox - 4.2.12 and the latest vagrant - 1.22.
I tried to run vagrant up and got: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
creating Makefile
make
sh: 1: make: not found
Once of the answers given by jtimberman is:
The basebox you're using does not have the "build-essential" package installed by default, and it has a "[shell provisioner][1]" that installs the Chef gem into the default Ruby environment. Chef has a dependency on the JSON RubyGem, which itself has C extensions that must be compiled. This is what is looking for `make`.
To resolve this issue, I'd recommend using Opscode's "omnibus" [full stack installer for Chef][2]. This can be used by changing the shell provisioner line to:
config.vm.provision :shell, :inline => "curl -L https://opscode.com/chef/install.sh | bash"
The `[install.sh][3]` script simply inspects the VM to determine what its platform is so it can retrieve the proper URL from an S3 bucket. If you prefer you can use the constructed URL to download the .deb file directly:
https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/11.04/x86_64/chef_11.4.4-2.ubuntu.11.04_amd64.deb
And then install it:
dpkg -i chef_11.4.4-2.ubuntu.11.04_amd64.deb
I have not been able to get the first method to work and would like to try the second. would:
dpkg -i chef_11.4.4-2.ubuntu.11.04_amd64.deb
work on win7. If not how do I get this working in windows?
In order to compile native extensions in Windows, you must install the Ruby DevKit. Joshua's answer is valid for Debian-based systems.
An addition to sethvargo.
In addition to the Ruby DevKit, you also need the client library for your native software.
For example, in order to compile/install ruby-oci8 gem, you should have the Oracle Client installed on your computer as well.
I'm using ubuntu x64, after two days and searching all the net, still i've not been able to install Megam,
i've read all information in this page http://www.cs.utah.edu/~hal/megam/
and installed x64 version of o'calm from http://packages.ubuntu.com/precise/ocaml
but when i want to use "megam" as a classifier in python, it says:
"NLTK was unable to find the megam file! Use software specific
configuration paramaters or set the MEGAM environment variable.
could anybody tell me how can i install and make use of it in python?
i've downloaded "ocaml-3.12.1.tar.gz" but the "make" command doesn't work (as it's said in its readme).
i've downloaded "megam_i686.opt" too, but it's not executable and i cannot run it
any help?
thanks in advance
For the future users:
megam is now available on MAC through brew:
$brew tap homebrew/science
$brew install megam
Use config_megam() to tell NLTK where the Megam executable is located. See: http://nltk.googlecode.com/svn/trunk/doc/api/nltk.classify.megam-module.html for details and documentation.
You also need to build MEGAM with the right 32/64 bit setting for your system. "megam_i686.opt" is for x86 iirc, so you should compile it for 64 bit. It is a while since I did this, but a simple build on an x64 system was all I needed: "Make doesn't work" is not very useful: I'm sure it gave you a few error messages...? Probably paths not set or are read only?
Edit: Looks like the above link is currently broken. The main Megam site can be found at:
http://www.umiacs.umd.edu/~hal/megam/
although it hasn't been updated for a while.
Answer given by Hugh Perkins, helped me resolve the issue (due to low reputation can't add a comment to that answer). After downloading the zip file (from http://thinknook.com/wp-content/uploads/2012/11/MEGAM.zip), I needed to tell python where it was, and that was done by adding it in os.environ as:
os.environ["MEGAM"] = '<<Complete path followed by file name>>/megam-64'
I downloaded from http://thinknook.com/wp-content/uploads/2012/11/MEGAM.zip , which was linked from http://thinknook.com/nltk-megam-maximum-entropy-library-on-64-bit-linux-2012-11-27/ This worked ok for me, on ubuntu 14.04
I manged to get megam to run on my docker instance running debian 9.7 following the steps below. Based on steps for MacOS install steps suggested by Jack Hong here.
apt-get install make
apt-get install ocaml-nox (or apt-get install ocaml, if you want x window support)
download source from here
unzip source creating a megam_0.92 directory
Edit the Makefile in megam_0.92 and make the following changes. (The
first change was already done in my particular instance):
WITHCLIBS=-I /usr/local/lib/ocaml/caml
WITHSTR =str.cma -cclib -lcamlstr
Save the changes and run make inside your megam_0.92 directory
add nltk.config_megam('//megam_0.92/megam') to your script and all should be well.
When running python26 under windows OS (64bits).....
I have got errors like:
import win32api" error in Python 2.6: pywintypes26.dll
or
pythoncom26.dll missing
ImportError: DLL load failed: The specified module could not be found.
I have done the msi installation for python26
all dlls can be found under C:\Python26\Lib\site-packages\pywin32_system32
After I copy pywintypes26.dll and pythoncom26.dll from C:\Python26\Lib\site-packages\pywin32_system32 to C:\Python26\Lib\site-packages\win32 -> Solve the problem!
I also hit a problem importing win32api.
The post-install script for pywin32 failed, which should copy pythoncom26.dll, pythoncomloader26.dll, and pywintypes26.dll, among other things. I ran it by hand and my installation was fixed.
python scripts\pywin32_postinstall.py -install
I had a similar problem when installing under 64 bit Python 3.4.2. I ran the install executable pywin32‑219.win‑amd64‑py3.4.exe from http://www.lfd.uci.edu/~gohlke/pythonlibs/ .
On the site it states clearly:
"Python 3.4 users must manually run python.exe Scripts\pywin32_postinstall.py -install from an elevated command prompt."
which I did not do first time round; I installed from a normal prompt getting the following feedback:
c:\python34>python.exe Scripts\pywin32_postinstall.py -install
Copied pythoncom34.dll to C:\Python34\pythoncom34.dll
Copied pywintypes34.dll to C:\Python34\pywintypes34.dll
You do not have the permissions to install COM objects.
The sample COM objects were not registered.
etc.etc.
Finishing with "The pywin32 extensions were succesfully installed" ...
I only read the last sentence and I started to run some code resulting in getting these dll load fails.
So, did some research, and started an elevated prompt (how: see "http://www.sevenforums.com/tutorials/783-elevated-command-prompt.html") and again ran:
c:\python34>python.exe Scripts\pywin32_postinstall.py -install
Copied pythoncom34.dll to C:\Windows\system32\pythoncom34.dll
Copied pywintypes34.dll to C:\Windows\system32\pywintypes34.dll
Registered: Python.Interpreter
Registered: Python.Dictionary
Registered: Python
-> Software\Python\PythonCore\3.4\Help[None]=None
-> Software\Python\PythonCore\3.4\Help\Pythonwin Reference[None]='C:\\Python34\\Lib\\site-packages\\PyWin32.chm'
Pythonwin has been registered in context menu
Shortcut for Pythonwin created
Shortcut to documentation created
The pywin32 extensions were successfully installed.
And now my code runs happily (as far as this matter is concerned... sigh, so much other stuff to do).
Run the installer as Administrator and it works:
Right click on pywin32-installer.exe
Choose "Run as Administrator"
As suggested above the post install script is not run, this issue can be seen when installing from a wheel (As I encountered)
python scripts\pywin32_postinstall.py -install
If find you have this issue when installing via wheels, then installing it from here can solve the above issue.
https://pypi.python.org/pypi/pypiwin32
There appears to be a bug in the installer. The recommended workaround in the ticket is the same one as proposed by Dave Bremer.
I could fix this situation by removing all installed Python3.4 versions (had forgotten to uninstall 3.4.1 before installing 3.4.2), deleting C:\Python34 and after installing Python 3.4.2 pywin32-219.win32-py34.exe could be installed and called without problems.
So, copying around DLLs should NOT be necessary!
I always install the Active State Python distro which installs the win32 packages for you and gets it right.
If the above didn't fix the problem, you're still missing the msvcr100.dll file. It's either in your \System32\ folder, or more likely in your c:\PythonXX\Lib\site-packages\win32\ folder.
That fixed it for me after hours of search to no avail, even though it looks like the import still isn't resolved as it should be (PyCharm still gives me the squiggly underline), but it works.
First I was using pip to install pywin32 in anaconda environment, that's why no matter what I did it was failing. After trial and error, I figured out that
conda install pywin32
is the right way to install pywin32 in the anaconda package manager.
I don't know whether it's too late or not to answer this question. I also hit this problem, and I tried every method above, but neither of them worked.
Finally, I found the reason. When we install pywin32, we must choose the one that fits python's version(2.6, 2.7, 3.3, etc) and python's bit number(x64 or x86). Notice, it must fit python's bit number, not PC's bit number. If you install x86 python in a x64 PC, you have to install a pywin32 with x86.
In my case i had to copy pywintypes26.dll and pythoncom26.dll files into C:\Windows\System32 folder to work it properly in jupyter notebook.
I am using windows 10 OS with multiple python versions