I'm new to python and need help with getting hunspell installed on my windows 10. The tool is PyCharm.
First I tried to install CyHunspell: pip install CyHunspell and got the following error msg:
RuntimeError: 'pkg-config' is not recognized as an internal or external command,operable program or batch file.
Then I tried installing PyHunspell instead and got the following error msg:
ERROR: Could not find a version that satisfies the requirement PyHunspell (from versions: none)
ERROR: No matching distribution found for PyHunspell
Then I tried installing hunspell directly and got the following error msg:
hunspell.cpp
hunspell.cpp(20): fatal error C1083: Cannot open include file: 'hunspell.hxx': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
In my test code:
import hunspell
Result:
spellchecker = hunspell.HunSpell() failed with the following error msg:
AttributeError: module 'hunspell' has no attribute 'HunSpell'
I would think I'm not the first one who uses hunspell on windows 10, but somehow I can't seem to find info needed to get this to work.
The GNU Emacs documentation states here (underlined by me):
The EZWinPorts project provides many useful ports of recent versions of GNU and Unix software. This includes all the optional libraries used by Emacs (image libraries, libxml2, GnuTLS), RCS, Texinfo, a clone of man command, Grep, xz, bzip2, bsdtar, ID Utils, Findutils, Hunspell, Gawk, GNU Make, Groff, GDB.
You will indeed find Hunspell in the list of files of the EZWinPorts project on sourceforge.
Once unzipped, you shall find the executable hunspell.exe inside the bin folder. No installation required. The tool is to be used on the command-line. You probably should add it to your Windows Path.
Tested on my Windows 10 PC.
Related
I am installing Tensorflow. I encountered the following problem:
I was installing Tensorflow from Source and I am following the Tensorflow website (https://www.tensorflow.org/install/source)
I had earlier installed Bazel 3.0.0 (the latest version) but got a similar error. Upon looking at other answers I figured out this error has something to do with the version of Bazel. Hence I uninstalled Bazel 3.0.0 and installed Bazel 0.27.1. But upon typing the following command(bazel build //tensorflow/tools/pip_package:build_pip_package) in the terminal, I am getting the following error:
WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
/home/aviraj/tensorflow/tools/bazel.rc
Starting local Bazel server and connecting to it...
ERROR: /home/aviraj/tensorflow/WORKSPACE:3:1: name 'http_archive' is not defined
ERROR: Error evaluating WORKSPACE file
ERROR: error loading package '': Encountered error while reading extension file 'closure/defs.bzl': no such package '#io_bazel_rules_closure//closure': error loading package 'external': Could not load //external package
ERROR: error loading package '': Encountered error while reading extension file 'closure/defs.bzl': no such package '#io_bazel_rules_closure//closure': error loading package 'external': Could not load //external package
INFO: Elapsed time: 2.023s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
Any help would be much appreciated. Thanks
Starting with version 0.20.0, http_archive native rule has been deprecated, it has to be loaded from: #bazel_tools//tools/build_defs/repo:http.bzl. I.e. you need to add the following (unless you have a customized version) in WORKSPACE or bzl files using it:
load("#bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
I recently started trying to switch to canopy from ipython notebooks, which I switched to from MATLAB. I am working towards getting a matlab-like experience for development and research.
I am doing most of these setups cross-platform, but I am starting on OS X.
I have been attempting to install packages for use in canopy, some of which require compilation such as SimpleITK and VTK6.0. I had these both successfully installed in my regular python2.7 installation, but I'm having some trouble installing them for canopy. Right now, Im working on recompiling SimpleITK/Superbuild with CMAKE to recreate the python wrappers. It asks for your python executable, include dir, and python lib location. I found the python executeable from sys.executable from within canopy, and the include dir with 'mdfind -name Python.h, which turned out to be the default location, I used the default python lib.
These were
executeable: /Users/jmerkow/Library/Enthought/Canopy_64bit/User/bin/python
Include: /System/Library/Frameworks/Python.framework/Headers
Lib: /usr/lib/libpython2.7.dylib
But I get the following error upon make:
AssertionError: Filename /Applications/Canopy.app/appdata/canopy-1.1.0.1371.macosx-x86_64/Canopy.app/Contents/lib/python2.7/os.py does not start with any of these prefixes: ['/Users/jmerkow/Library/Enthought/Canopy_64bit/User', '/Library/Python/2.7/site-packages', '/Users/jmerkow/Library/Enthought/Canopy_64bit/User/Extras/lib/python', '/Users/jmerkow/Library/Python/2.7/site-packages', '/Users/jmerkow/.local/lib/python/2.7/site-packages', '/Users/jmerkow/Library/Python/2.7/lib/python/site-packages']
ERROR
-- Installing numpy from /Users/jmerkow/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy to /numpy
ERROR
/bin/sh: ../Testing/Installation/PythonVirtualenv/bin/python: No such file or directory
make[5]: *** [lib/_SimpleITK.so] Error 127
make[4]: *** [Wrapping/CMakeFiles/SimpleITK_PYTHON.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [SimpleITK-prefix/src/SimpleITK-stamp/SimpleITK-build] Error 2
make[1]: *** [CMakeFiles/SimpleITK.dir/all] Error 2
make: *** [all] Error 2
Also, anyother tips to help me get this done are very welcome
EDIT BELOW
So I attempted to compile using:
/System/Library/Frameworks/Python.framework/Versions/Current/bin/python
/System/Library/Frameworks/Python.framework/Versions/Current/include/python2.7/
/System/Library/Frameworks/Python.framework/Versions/Current/lib/libpython2.7.dylib
This compiled and created and egg file named
SimpleITK-0.7.0.dev88_ge297c-py2.7-macosx-10.8-intel.egg
but I get the following error when I use enpkg
Traceback (most recent call last):
File "/Users/jmerkow/Library/Enthought/Canopy_64bit/User/bin/enpkg", line 10, in
sys.exit(main())
File "/Applications/Canopy.app/appdata/canopy-1.1.0.1371.macosx-x86_64/Canopy.app/Contents/lib/python2.7/site-packages/enstaller/main.py", line 702, in main
reqs.append(Req(name + ' ' + version))
File "/Applications/Canopy.app/appdata/canopy-1.1.0.1371.macosx-x86_64/Canopy.app/Contents/lib/python2.7/site-packages/enstaller/resolve.py", line 32, in init
raise Exception("Not a valid requirement: %r" % req_string)
Exception: Not a valid requirement: 'SimpleITK 0.7.0.dev88_ge297c-py2.7-macosx-10.8-intel.egg'
with easy_install I get this error:
Processing SimpleITK-0.7.0.dev88_ge297c-py2.7-macosx-10.8-intel.egg
removing '/Users/jmerkow/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/SimpleITK-0.7.0.dev88_ge297c-py2.7-macosx-10.8-intel.egg' (and everything under it)
creating /Users/jmerkow/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/SimpleITK-0.7.0.dev88_ge297c-py2.7-macosx-10.8-intel.egg
Extracting SimpleITK-0.7.0.dev88_ge297c-py2.7-macosx-10.8-intel.egg to /Users/jmerkow/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages
SimpleITK 0.7.0.dev88-ge297c is already the active version in easy-install.pth
Installed /Users/jmerkow/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/SimpleITK-0.7.0.dev88_ge297c-py2.7-macosx-10.8-intel.egg
Processing dependencies for SimpleITK==0.7.0.dev88-ge297c
Searching for SimpleITK==0.7.0.dev88-ge297c
Reading cant post
Reading cant post
Reading cant post
No local packages or download links found for SimpleITK==0.7.0.dev88-ge297c
error: Could not find suitable distribution for Requirement.parse('SimpleITK==0.7.0.dev88-ge297c')
It looked like I installed it, so I tried to import:
import SimpleITK
Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6
You have configure SimpleITK to use your system python executable, library and include files. However, you are trying to run with the Canopy distribution. They are not binary compatible and the mismatch caused that type of program termination.
You canopy python executable was correctly found:
/Users/jmerkow/Library/Enthought/Canopy_64bit/User/bin/python
But you need to make the PYTHON_INCLUDE_DIR and PYTHON_LIBRARY consistent. Try the following commands to help you determine the correct path:
find /Users/jmerkow/Library/Enthought/Canopy_64bit/ -name Python.h
find /Users/jmerkow/Library/Enthought/Canopy_64bit/ -name lib python*.dylib
I am trying to install "pretty damn quick", an analysis tool for Layered Queing networks.
However there seems to be a lot wrong with my system, and switching to Linux is not an option.
Here is what i tried to get the PDQ running:
First try: Python
I installed python2.7 and downloaded the PDQ for python distribution (its in the tarball in the python dir) :
C:\pdq\pdq42\python>python setup.py install
running install
running build
running build_ext
building 'pdq' extension
error: Unable to find vcvarsall.bat
This error stems from the fact that i supposedly dont have a C-compiler. Even though typing g++ gives me:
C:\pdq\pdq42\python>g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=c:/rtools/gcc-4.6.3/bin/../libexec/gcc/i686-w64-mingw3
3/lto-wrapper.exe
Target: i686-w64-mingw32
...snipped...
This problem is somehow documented? So i tried going over to Perl. It said there that the compiler comes with Strawberry Perl. So I installed that. Dmake gave me a lot of trouble but in the end I managed to install it.
C:\pdq\pdq42\perl5>perl Makefile.PL
Writing Makefile for pdq
C:\pdq\pdq42\perl5>dmake
Skip blib\lib\pdq.pm (unchanged)
...snipped...
g++.exe: error: MVA_Approx.o: No such file or directory
g++.exe: error: MVA_Canon.o: No such file or directory
g++.exe: error: MVA_Solve.o: No such file or directory
g++.exe: error: PDQ_Build.o: No such file or directory
g++.exe: error: PDQ_Exact.o: No such file or directory
g++.exe: error: PDQ_Globals.o: No such file or directory
g++.exe: error: PDQ_Report.o: No such file or directory
g++.exe: error: PDQ_Utils.o: No such file or directory
dmake: Error code 129, while making 'blib\arch\auto\pdq\pdq.dll'
Gives me new errors, that i cannot fix, since i cannot google them.
As the last resort i try out installing R, since this should work according to the documentation.
install.packages("c:\pdq\pdq_6.0-1.tar.gz",repos=NULL,type="source")
Warning: invalid package 'c:/pdq/pdq_6.0-1.tar.gz'
Error: ERROR: no packages specified
Warning messages:
1: running command '"C:/Programme/R/R-3.0.1/bin/i386/R" CMD INSTALL -l "C:\Programme\R\R-3.0.1\library" "c:/pdq/pdq_6.0-1.tar.gz"' had status 1
2: In install.packages("c:\pdq\pdq_6.0-1.tar.gz", repos = NULL, type = "source") :
installation of package ‘c:/pdq/pdq_6.0-1.tar.gz’ had non-zero exit status
However in this case i don't even know where to start debugging this to get it going.
So I am seeking help from SO. My question is:
Where did I go wrong and what can I do to find additional information leading to identify the problem? I would really like to have PDQ installed.
I'd like to install the stanford parser's python interface.
http://projects.csail.mit.edu/spatial/Stanford_Parser
When running rake setup to install jpype first, I keep ge
In file included from src/native/common/jp_reference.cpp:1:0:
src/native/common/include/jpype.h:45:17: schwerwiegender Fehler: jni.h: Datei oder Verzeichnis nicht gefunden
Kompilierung beendet.
error: command 'gcc' failed with exit status 1
rake aborted!
The error message is english-german-mixed. It says: heavy failure: jni.h: File or directory not found.
When I try to install the stanford-parser itself, the same thing happens.
Yes, I python-dev is already installed on my system.
I'm working on Ubuntu and with python2.7.
The error messages says you are missing jni.h.
You can use the search tool at http://packages.ubuntu.com to find which package provides the missing file:
For the most recent version of Ubuntu, Quantal (12.10), these packages provide the jni.h:
File Packages
/usr/lib/gcc-snapshot/lib/gcc/i686-linux-gnu/4.8.0/include/jni.h gcc-snapshot
/usr/lib/gcc/i686-linux-gnu/4.6/include/jni.h gcj-4.6-jdk
/usr/lib/gcc/i686-linux-gnu/4.7/include/jni.h gcj-4.7-jdk
/usr/lib/jvm/java-1.5.0-gcj-4.6/include/jni.h gcj-4.6-jdk
/usr/lib/jvm/java-1.5.0-gcj-4.7/include/jni.h gcj-4.7-jdk
/usr/lib/jvm/java-1.5.0-gcj-4.8-snap/include/jni.h gcc-snapshot
/usr/lib/jvm/java-6-openjdk-i386/include/jni.h openjdk-6-jdk
/usr/lib/jvm/java-7-openjdk-i386/include/jni.h openjdk-7-jdk
Either openjdk or gcj will do; this page may help clarify the difference.
jni.h is the Java Native Interface header, so you will need to make sure you have Java installed. For Ubuntu there is a openjdk-6-jdk package which I've confirmed has the require file available.
Im trying to install shoutpy on opensolaris 2009.6. It relies on boost.python. i've installed the boost_devel libraries from blastwave and linked /opt/csw/include/boost to /usr/include/boost . But when I try to easy_install shoutpy I get the following output
munderwo#opensolaris-test1:/usr/include$ pfexec easy_install shoutpy
Searching for shoutpy
Reading http://pypi.python.org/simple/shoutpy/
Reading http://dingoskidneys.com/shoutpy/
Best match: shoutpy 1.0.0
Downloading http://dingoskidneys.com/shoutpy/shoutpy-1.0.0.tar.gz
Processing shoutpy-1.0.0.tar.gz
Running shoutpy-1.0.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-w7XQfv/shoutpy-1.0.0/egg-dist-tmp-k11Dky
In file included from /usr/include/boost/python/object/make_instance.hpp:9,
from /usr/include/boost/python/object/make_ptr_instance.hpp:8,
from /usr/include/boost/python/to_python_indirect.hpp:11,
from /usr/include/boost/python/converter/arg_to_python.hpp:10,
from /usr/include/boost/python/call.hpp:15,
from /usr/include/boost/python/object_core.hpp:12,
from /usr/include/boost/python/args.hpp:25,
from /usr/include/boost/python.hpp:11,
from shoutpy.cc:26:
/usr/include/boost/python/object/instance.hpp:44: error: a casts to a type other than an integral or enumeration type cannot appear in a constant-expression
/usr/include/boost/python/object/instance.hpp:44: error: '->' cannot appear in a constant-expression
/usr/include/boost/python/object/instance.hpp:44: error: `&' cannot appear in a constant-expression
In file included from /usr/include/boost/python/converter/registry.hpp:9,
from /usr/include/boost/python/converter/registered.hpp:8,
from /usr/include/boost/python/object/make_instance.hpp:10,
from /usr/include/boost/python/object/make_ptr_instance.hpp:8,
from /usr/include/boost/python/to_python_indirect.hpp:11,
from /usr/include/boost/python/converter/arg_to_python.hpp:10,
from /usr/include/boost/python/call.hpp:15,
from /usr/include/boost/python/object_core.hpp:12,
from /usr/include/boost/python/args.hpp:25,
from /usr/include/boost/python.hpp:11,
from shoutpy.cc:26:
/usr/include/boost/python/converter/rvalue_from_python_data.hpp:99: error: '->' cannot appear in a constant-expression
/usr/include/boost/python/converter/rvalue_from_python_data.hpp:99: error: `&' cannot appear in a constant-expression
/usr/include/boost/python/converter/rvalue_from_python_data.hpp:99: error: template argument 1 is invalid
/usr/include/boost/python/converter/rvalue_from_python_data.hpp:99: error: `value' is not a member of `<declaration error>'
error: Setup script exited with error: command '/usr/lib/python2.6/pycc' failed with exit status 1
This is using python2.6, opensolaris 2009.06, boost 1.35.
any help would be great!
Cheers
Mark
Edit - this has been cross posted on serverfault as its a bit hard to classify where the problem domain is. https://serverfault.com/questions/88724/problem-with-opensolaris-boost-python-and-shoutpy
Unfortunately I've never tried to compile shoutpy under OpenSolaris and I don't use it these days. Boost.python requires a lot from its C++ compiler. Use easy_install -b build_directory shoutpy so it'll keep the source code after it fails, then check the C++ compiler Python tries to use against those supported by boost.python.
I tried compiling it on my desktop Linux and it still works after I edit setup.py to link against libboost_python-mt instead of libboost_python which doesn't exist in Ubuntu (there are several libboost_python* depending on Python version and so forth).