BoostBuild: patchlevel.h does not exist - python

I'm trying to compile a C++ project using bjam on Ubuntu 11.04. I keep getting the following error:
../../libraries/boost_1_44_0/boost/python/detail/wrap_python.hpp:75:24: fatal error: patchlevel.h: No such file or directory
I searched my project directory and there are several files named patchlevel.h but I don't know what they are. Are they part of Boost?
I also get this error several times:
pa-vision-lib/../captureformat.h:4:25: fatal error: linux/ovcam.h: No such file or directory
This file also definitely exists. Is there a path setting of some sort in any of the Boost config files that I need to change to point to these files?

IIRC patchlevel.h is a python-dev header, check this package is installed (i dont remember the exact name but it si the C header for python binding).
ovcam.h is not part of boost in anyway.

For Ubuntu Server 12.04 LTS, please try:
apt-get install python-dev

Related

How to compile TeX file from Python

I'm trying to create a pdf file inside a python/django project. I'm using PyLatex, which helps, but it's generate_pdf method breaks when it calls pdflatex. I keep getting this error:
FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex'
I tried everything - os.system() ... subprocess. Any way I try, it can't find pdflatex. I'm running on Windows, but I need to be able to to do this within the web-app anyway.
Thanks for any help!
You just need to install pdflatex (and you will need to install on your server when you release your web-app). Instructions for installing on windows can be found in the top answer here.
Do you have "pdflatex" installed? As per this question, you may have to install "MiKTeX" and point os.system() at C:\Program Files\MiKTeX <MikTeX version>\miktex\bin to make it work.
Hope that helps.
Do you have texlive installed? If yes, then the issue is with the system path variable. If not already added, add it to the system path.
#
Updated answer:
I took the time and decided to replicate your issue. I too use windows.
I copied the basic example from Pylatex and tested it on my machine, I was able to replicate the same error as you despite having TexLive installed. To solve it I did the following steps:
Installed MikTex (I believe you have it installed).
Tried running it again but failed with the error missing package latexmk.
Using MikTex package manager, I installed the latexmk package.
Tried running but still failed, error missing perl.exe command.
I had to install perl to my windows, use the following links -- https://learn.perl.org/installing/windows.html
When I tried again, it compiled successfully.
The issue was not having the package latexmk for MikTex and perl.exe of which you should have posted as part of the error logs. Try that and let me know if successful.

Not able to build syntaxNet source?

I did everything given in their documentation but I'm getting this error again and again....I tried googling and finding if anyone got the same error but nopes, didn't work out. Heres the command --
bazel test --linkopt=-headerpad_max_install_names \
syntaxnet/... util/utf8/...
And heres the error -
ERROR: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading package 'external': Extension file '#org_tensorflow//tensorflow:tensorflow.bzl' may not be loaded from a WORKSPACE file since the extension file is located in an external repository.
INFO: Elapsed time: 0.052s
ERROR: Couldn't start the build. Unable to run test
here is a very useful script for installation on ubuntu-14.04
https://github.com/JoshData/models/blob/b72274d38f169f77e6a15e54834f463f627dc82a/syntaxnet/build/ubuntu-14.04_x64.sh
Finally solved it, it was related to the bazel version.
I had installed it before, so the version was 0.1.5. But in the docs, its written supported ones are 0.2 - 0.2.2b. I tried to upgrade it using brew but it didn't work.
So I tried to directly install it using the 0.2.2b installer and it worked :)

Cannot find tk.h despite having the dev packages installed

I am trying to install wck. But I ran into the following error when running setup.py :
fatal error : tk.h : no such file or directory
But I already have all the -dev packages installed! I went on and installed tk-dev, tk8.5-dev and tk8.4-dev and the problem persists. I did a 'locate tk.h' and there was no tk.h anywhere in my system. Wherever this problem was reported, people were trying to get tcl.h too. So I did a sudo apt-get install tcl-dev and did a 'locate tcl.h'. Nothing! Where did all the header files go?
Your problem is, that WCKs setup.py and setuplib.py don't have a clue where to look with the layout on your system, so you will have to fix those to get it working.
I assume your using some variant of Debian Linux there, so maybe have a look at their guidelines for packaging Tcl/Tk.
Basically they recommend adding configure switches like:
--with-tcl=/usr/lib/tclX.Y
--with-tk=/usr/lib/tkX.Y
--with-tclincludes=/usr/include/tclX.Y
http://pkg-tcltk.alioth.debian.org/tcltk-policy.html/ap-debian_oddities.html
http://pkg-tcltk.alioth.debian.org/tcltk-policy.html/ch-tcltk.html
With that info, you might be able to get it to work by editing setup.py and simply adding a version of find_tk() that works for your system.

Unable to find vcvarsall.bat.error while installing ReviewBoard

iam trying to install ReviewBoard on my windows system.i got this error
error: Setup script exited with error: Unable to find vcvarsall.bat.please help
a) You need either a compiler, e.g. that bundled w/ MinGW, or
b) a pre-compiled executable for your OS and (ideally) Python version.
The latter might be tough to find, so if you go the former route it'll be roughly like this:
Download and install MinGW
Add c:\MinGW\bin to PATH environment variable (right-click My Computer...)
In c:\Python27\Lib\distutils create file called distutils.cfg and add the following:
[build]
compiler=mingw32

Understanding concepts of Python installation on Mac OS for Cocoa development

I want to try to develop Cocoa application using Python. I'm new to Mac and I need some help to understand how it works.
First of all I found that I need to install py2app and py2objc. I used easy_install as documented here. There were a few errors with setup tools but eventually py2app was installed. Then I launch "easy_install pyobjc==2.2" and it ended with many errors:
Processing pyobjc-2.2-py2.7.egg
...
Running pyobjc-framework-SystemConfiguration-2.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ipMzFU/pyobjc-framework-SystemConfiguration-2.2/egg-dist-tmp-odfVol
In file included from Modules/_manual.m:1:
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:19:20: error: limits.h: No such file or directory
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:22:2: error: #error "Something's broken. UCHAR_MAX should be defined in limits.h."
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:26:2: error: #error "Python's source code assumes C's unsigned char is an 8-bit type."
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:33:19: error: stdio.h: No such file or directory
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:35:5: error: #error "Python.h requires that stdio.h define NULL."
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:38:20: error: string.h: No such file or directory
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:40:19: error: errno.h: No such file or directory
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:42:20: error: stdlib.h: No such file or directory
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:44:20: error: unistd.h: No such file or directory
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:56:20: error: assert.h: No such file or directory
...
etc
My questions:
What I need to do to install
py2objc? Unfortunately, I haven't
found a solution for errors, which I
posted previously.
As I understand
there are two kinds of python. One I
installed into Applications folder
(IDLE, launcher), another is the
current Python version supplied with
OS. Can you describe the
difference?
How can I select the
current version of Python used by
Mac OS? And what is the Current
folder in
/Library/Frameworks/Python.framework?
Probably it looks confusing, but this is my first steps! :)
Thank you
Cannot give a definitive answer to that. See comment.
You can install multiple versions of python on your machine (OSX includes a defualt one as you already mentioned). In the applications folder there are some apps to open an interactive interpreter in which you can enter python commands, such as IDLE. These applications use one of the python versions you've got installed. Which brings us to
python_select is the command you want. e.g. python_select -l to list all the python versions you've got installed and python_select python27 to select your own 2.7 version. The Current folder links to the version currently selected via python_select

Categories