When I build the pylucene environment, I meet this problem.
I don't know how to config the makefile of it on Windows platform.
Someone help me, if there is any example about building pylucene on Windows.
The cmd shows that:
can not find tools.jar
makefile213:recipe for target 'ivy' failed.
make:***【ivy】error 1
Here is the makefile:
VERSION=3.6.1-2
LUCENE_SVN_VER=HEAD
LUCENE_VER=3.6.1
LUCENE_SVN=http://svn.apache.org/repos/asf/lucene/dev/tags/lucene_solr_3_6_1
PYLUCENE:=$(shell cd)
LUCENE_SRC=lucene-java-$(LUCENE_VER)
LUCENE=$(LUCENE_SRC)/lucene
# Windows (Win32, Python 2.7, Java 1.6, ant 1.8.1, Java not on PATH)
SHELL=cmd.exe
PYLUCENE:=$(shell cd)
ANT=D:\ant183\bin\ant
JAVA_HOME=C:\\Program Files\\Java\\jdk1.7.0_01
PREFIX_PYTHON=D:\\Python27
PYTHON=$(PREFIX_PYTHON)\python.exe
JCC=$(PYTHON) -m jcc.__main__
NUM_FILES=3
$(LUCENE_JAR): $(LUCENE)
cd $(LUCENE) && $(ANT) -Dversion=$(LUCENE_VER)
OS=$(shell uname)
BUILD_TEST:=$(PYLUCENE)\build\test
I had similar error when installing on opensuse 13.2, the way to work around is to install ivy independently before trying to build pylucene.
Related
I am trying to install 'pocketsphinx' module in python which requires swig.exe. After a lot of searching I followed the steps mentioned in the swig site(http://www.swig.org/Doc3.0/Windows.html#Windows_swig_exe) to build an exe. But I am stuck at the last 2 steps.
When './autogen.sh' is executed, I get the following error message although the file 'aclocal' is present in the '/mingw/bin' directory.
vinay#DESKTOP-7LB2J5M /usr/src/swig
$ ./autogen.sh
+ test -d Tools/config
+ aclocal -I Tools/config
./autogen.sh: /mingw/bin/aclocal: No such file or directory
I renamed c:\MinGW\msys\1.0\etc\fstab.sample to c:\MinGW\msys\1.0\etc\fstab and also installed automake, libtool, autoconf, aclocal, autoheader dependencies from MinGW installation manager. What am I missing?
I am not familiar with MinGw or unix commands.
MAC OSX 10.9, Python 3.5, sip-4.17, PyQt-gpl-5.5.1, Qt5.5.1
Hi,
trying to build PyQt on my system I did the following steps:
download/install Qt5.5.1 libraries
download/unpack SIP
download/unpack PyQt
install SIP:
python3 configure.py -d /Library/Python/3.5/site-packages --arch x86_64
make
sudo make install
tried to install PyQt:
python3 configure.py -d /Library/Python/3.5/site-packages
--qmake /.../Qt5.5.1/5.5/clang_64/bin/qmake
Configuration stopped with:
/Users/werner/OpenSource/PyQt/sip/QtPositioning/qgeolocation.sip:28:10:
fatal >error: 'qgeolocation.h' file not found
#include <qgeolocation.h>
^
1 error generated.
make[1]: *** [sipQtPositioningcmodule.o] Error 1
make: *** [sub-QtPositioning-make_first-ordered] Error 2
I tried to finish installation doing
make
sudo make install
anyway. But the installation doesn't seem to be complete (e.g. uic, pyuic5 are missing). Here is what my installation directory looks like:
>ls /Library/Python/3.5/site-packages/PyQt5
QtBluetooth.so QtSensors.so
QtCore.so QtSerialPort.so
QtDBus.so QtSql.so
QtDesigner.so QtSvg.so
QtGui.so QtTest.so
QtHelp.so QtWebKit.so
QtMacExtras.so QtWebKitWidgets.so
QtMultimedia.so QtWidgets.so
QtMultimediaWidgets.so QtXml.so
QtNetwork.so QtXmlPatterns.so
QtOpenGL.so _QOpenGLFunctions_2_0.so
QtPrintSupport.so _QOpenGLFunctions_2_1.so
QtQml.so _QOpenGLFunctions_4_1_Core.so
QtQuick.so
I couldn't find any useful information when searching for other discussions, so I hope someone can give me a hint on what I'm (maybe stupidly) doing wrong. Thank you for taking the time to read this.
If you don't need this module, the better way to solve that is disabling it on configure.
python configure.py --disable=QtPositioning
Just yesterday, I also met such a problem. And this is what I do to solve it:
Create a header file qgeolocation.h in /PyQt-gpl-5.5.1/QtPositioning, and copy the content into it from this website. Then I go sudo make and sudo make install successfully.
Though I do not know whether it is right to solve this problem, fortunately, I installed the PyQt and entered eric6. Hope you make successfully, too.
Adding the location.h header file for me on OSX 10.11.1.
I had the problem in both PyQt-gpl-5.5.1 and PyQt-gpl-5.5.2, but after adding the
file, was able to build.
The way of creating a qgeolocation.h in /PyQt-gpl-5.5.1/QtPositioning worked for me. The QtPositioning.so was created.
You can also take the header file from your qt source folder (you have installed the source files together with binaries, right?), it is located here:
/Src/qtlocation/src/positioning/qgeolocation.h
and then just copy it into:
/PyQt-gpl-X.X.X/QtPositioning/qgeolocation.h
as follows. It should solve the problem in 99.9% cases.
I've tried to resolve this prolem for about 3days, and I'd finally felt that I need to ask for help by creating my own question.
I have Windows 7x64 and Qt4.8.6 installed.
I need Python with PyQt and Qscintilla2 to be installed and working.
Now I wil describe my last actions. I did everything like included packages instructions said.
1) Installed Python2.7.9 32bit from official website.
2) Downloaded SIP from here (dev snapshot), then:
configure.py —platform win32-g++
mingw32-make
mingw32-make install
3) Downloaded PyQt from here (not the installer but dev snapshot, cause I need to build with MinGW and istaller producec MSVC version), then:
configure-ng.py -spec win32-g++
mingw32-make
mingw32-make install
Ater these steps I tested PyQt on my project - everything works fine.
Then I starded trying to install Qsnitilla2.
4) Downloaded Qsnitilla2 from here (dev snapshot), then:
a) in Qt4Qt5 folder:
qmake qscintilla.pro -spec win32-g++
mingw32-make
mingw32-make install
This had installed Qsnitilla2 in Qt4.8.6 as I saw;
b) in Python folder( F..ing Python bindngs, excuse my french):
config.py —spec win32-g++
mingw32-make
after this I got ld.exe error (linking error):
Then, afted doing some research, I manually edited my Makefile.Release (by adding -lpython27 to LIBS parameter):
LIBS = -L"c:\Qt-mingw\4.8.6\lib" -LC:\Python27\libs -LC:\Qt-mingw\4.8.6\lib -lqscintilla2 -lQtGui4 -lQtCore4 -lpython27
After this, my mingw32-make completed succesfully. So:
mingw32-make install
This had installed Qscintilla2 Python bindings.
Now I can see Qsci autocomlplete in Eclipse.
So i've tried this:
from PyQt4.Qsci import QsciScintilla
And i've got this in traceback:
from PyQt4.Qsci import QsciScintilla
ImportError: DLL load failed: Не найден указанный модуль
(Translation: The specified module could not be found)
I've tried this with both dev snapshot and src packages from Riverbank website. And also with MinGW 4.8.1 and MinGW-w64 4.8.4. I can't use MinGW-w64 over 4.8 version cause I need boost-1.55 and it only supports MinGW 4.8.
I don't know what to do now, but I really want to use Scintilla in my project. So i'll be very gratefull for any suggestions.
Have you ever tried to load the QsciScintilla right from the console? I mean you need to enter the directory where the QScintilla located( this means current folder is the default folder), then try run the command "from PyQt4.Qsci import QsciScintilla", if this load module failure still happens, this possibly means you need extra dynamic which QScintilla depends, you need to use dll dependency to find out if some other libraries were missing, then put the missing libraries into the same folder of QsciScintilla.
I installed Python 3.4.2 and Virtualenv 12.0.5 in my Linux Mint 17.1
Then I tried creating:
$ virtualenv venv
And also using --clear and/or -p /usr/bin/python3.4, always getting the messages:
Using base prefix '/usr'
New python executable in venv/bin/python3
Also creating executable in venv/bin/python
ERROR: The executable venv/bin/python3 could not be run: [Errno 13] Permission denied
Another try was:
$ pyvenv-3.4 venv
It gave no errors on creation, but in the venv/bin file the python3.4 is a symbolic link to /usr/local/bin/python3.4. Then when I activate and install any lib using pip or pip3, then try to import it, I get the error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'anymoduledownloaded'
I always used virtualenv in Python 2.X and never got this kind of errors. Any thoughts on what am I doing wrong?
Thanks!!
=======EDITED=======
This is the output of my partitions (fdisk -l):
Device Boot Start End Blocks Id System
/dev/sda1 2048 98707455 49352704 83 Linux
/dev/sda2 303507456 3890644991 1793568768 5 Extended
/dev/sda3 * 98707456 303507455 102400000 7 HPFS/NTFS/exFAT
/dev/sda4 3890644992 3907028991 8192000 82 Linux swap / Solaris
/dev/sda5 303509504 3890644991 1793567744 7 HPFS/NTFS/exFAT`
And also my fstab:
<file system> <mount point> <type> <options> <dump> <pass>
-> was on /dev/sda1 during installation
UUID=a38f9c6d-3cd9-4486-b896-acbc6182ec61 / ext4 errors=remount-ro 0 1
-> swap was on /dev/sda4 during installation
UUID=efad7b53-79a8-4230-8226-9ca90c68ea9d none swap sw 0 0`
Is that a shared partition that you have mounted? Does the shared partition have a different filesystem then the non-shared one you tried upon? If yes, then IMO, that will definitely cause an error since you are making and compiling binaries for python on one filesystem, and so it will not work on another filesystem.
As mentioned in this answer, adding to your /etc/fstab with an entry with exec flag might make it work for you, i.e., you might need to add another entry for the NTFS disk here to make it automount:
<file system> <mount point> <type> <options> <dump> <pass>
-> was on /dev/sdaX during installation
UUID=<uid_of_NTFS> / ntfs auto,user,exec,nodev,rw,errors=remount-ro 0 1
I struggled with this as well so I wrote an ugly bash script to help me with this. The only salient difference between what you do and what I do is on line 133:
/path/to/python/bin/python3.4 /path/to/python/bin/pyvenv /path/to/venv
That is, explicitly name the instance of python and the venv tool. Then
/path/to/venv/bin/pip install django # or whatever
Edit
I installed Linux Mint in a VM to try and build a Python 3.4 virtual environment. Based on the error messages I saw and this answer, I learned that I must do the following to get a complete Python 3.4 build:
apt-get install build-essential libssl-dev openssl
Without this, my Python 3.4 build did not contain pip. Note that you probably want to install readline and other development packages.
Unsolicited Advice
Do not do this as root, create a user dedicated to running your venv
Create a script to create your environment
Check that script into your source code repo
I deleted my python binaries and venvs multiple times and then recreated all of with this script to make sure that my script reproduced my environment and then stripped the identifying information and saved that on github to share it. I should really be using a more formal tool for this like docker/puppet/chef.
My system is :win7 64 ultimate +python34(64)+intel 64 chip.
I have installed mingw64 ,please see:
C:\Users\pengsir>d:\mingw\bin\gcc -v
Reading specs from d:/mingw/bin/../lib64/gcc/x86_64-w64-mingw32/4.8.2/specs
COLLECT_GCC=d:\mingw\bin\gcc
COLLECT_LTO_WRAPPER=d:/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/4.8.2/lto-wra
pper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-4.8.2/configure --prefix=/opt/windows_64 --with-sysroot=
/opt/windows_64 --libdir=/opt/windows_64/lib64 --mandir=/opt/windows_64/man --in
fodir=/opt/windows_64/info --enable-shared --disable-bootstrap --disable-multili
b --enable-threads=posix --enable-languages=c,c++ --enable-checking=release --wi
th-system-zlib --with-python-dir=/lib64/python2.7/site-packages --disable-libunw
ind-exceptions --enable-__cxa_atexit --enable-libssp --with-gnu-ld --verbose --e
nable-java-home --with-java-home=/opt/windows_64/lib64/jvm/jre --with-jvm-root-d
ir=/opt/windows_64/lib64/jvm --with-jvm-jar-dir=/opt/windows_64/lib64/jvm/jvm-ex
ports --with-arch-directory=amd64 --with-antlr-jar='/home/adrien/projects/win-bu
ilds-1.4/slackware64-current/d/gcc/antlr-*.jar' --disable-java-awt --disable-gtk
test --build=x86_64-slackware-linux --host=x86_64-w64-mingw32 --target=x86_64-w6
4-mingw32
Thread model: posix
gcc version 4.8.2 (GCC)
when i install with the command:
d:\Python34\Scripts\pip.exe install numpy
(other message ommitted)
error: Unable to find vcvarsall.bat
How to compile the numpy to install on the python34?
I don't want to install vs2013 ,i like free software,no money to pay for vs2013 ,please teach me to complie numpy to install on 64 bits platform mingw64.
Is there some requirement that you build numpy from source? I have always just installed it (and every other Python package that's troublesome on Windows) from Christoph Gohlke's Unofficial Binaries Page, which has always worked perfectly for me.
As per http://shop.wickeddevice.com/2013/12/11/windows-7-python-virtualenv-and-the-unable-to-find-vcvarsall-bat-error/:
For Python 3.4, download Visual C++ 2010 from http://www.lfd.uci.edu/~gohlke/pythonlibs/.
Install it.
Open Windows explorer (the file browser) and search for the location of ‘vcvarsall.bat’ and cut it to your clipboard.
run regedit from the Windows start key. You will need admin privilges.
Add a registry entry to HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\VisualStudio\9.0\Setup\VC\ProductDir (64 bit Windows) or
HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\9.0\Setup\VC\ProductDir (32 bit)
(If these don't work, try replacing VisualStudio with VCExpress
as described in How do I point easy_install to vcvarsall.bat?
Restart cmd and try again.