I tried to install the package "import-java" for python, first there was an error because of the missing path for JAVA-HOME, but now i added this path and i have another error, a permission error and don't know how to fix this.
That is the Command Output:
Collecting import-java
Using cached import-java-0.6.tar.gz (4.3 kB)
Collecting pyjnius
Using cached pyjnius-1.2.1.tar.gz (40 kB)
ERROR: Command errored out with exit status 1:
command: 'C:\Program Files (x86)\Python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\JOSHUA~1\\AppData\\Local\\Temp\\pycharm-packaging\\pyjnius\\setup.py'"'"'; __file__='"'"'C:\\Users\\JOSHUA~1\\AppData\\Local\\Temp\\pycharm-packaging\\pyjnius\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\JOSHUA~1\AppData\Local\Temp\pycharm-packaging\pyjnius\pip-egg-info'
cwd: C:\Users\JOSHUA~1\AppData\Local\Temp\pycharm-packaging\pyjnius\
Complete output (16 lines):
C:\Program Files\Java\jdk-13.0.2\bin
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\JOSHUA~1\AppData\Local\Temp\pycharm-packaging\pyjnius\setup.py", line 92, in <module>
compile_native_invocation_handler(*get_possible_homes(PLATFORM))
File "C:\Users\JOSHUA~1\AppData\Local\Temp\pycharm-packaging\pyjnius\setup.py", line 82, in compile_native_invocation_handler
subprocess.check_call([
File "C:\Program Files (x86)\Python38-32\lib\subprocess.py", line 359, in check_call
retcode = call(*popenargs, **kwargs)
File "C:\Program Files (x86)\Python38-32\lib\subprocess.py", line 340, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Program Files (x86)\Python38-32\lib\subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files (x86)\Python38-32\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
PermissionError: [WinError 5] Zugriff verweigert
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I hope someone knows how to fix this, thanks.
Related
pip install pyjnius
Collecting pyjnius
Using cached https://files.pythonhosted.org/packages/b6/57/c90acf31322e6417f06c90410dbfcb149633a6006b7efbf99dfebe177c1f/pyjnius-1.2.0.tar.gz
ERROR: Command errored out with exit status 1:
command: 'c:\users\dev1\appdata\local\programs\python\python37-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Dev1\\AppData\\Local\\Temp\\pip-install-uxkserni\\pyjnius\\setup.py'"'"'; __file__='"'"'C:\\Users\\Dev1\\AppData\\Local\\Temp\\pip-install-uxkserni\\pyjnius\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Dev1\AppData\Local\Temp\pip-install-uxkserni\pyjnius\pip-egg-info'
cwd: C:\Users\Dev1\AppData\Local\Temp\pip-install-uxkserni\pyjnius\
Complete output (18 lines):
warning: [options] bootstrap class path not set in conjunction with -source 6
error: Source option 6 is no longer supported. Use 7 or later.
error: Target option 6 is no longer supported. Use 7 or later.
WARNING: Not able to assign machine() = AMD64 to a cpu value!
Using cpu = 'i386' instead!
JDK_HOME: C:\Program Files\Java\jdk-13.0.1
JRE_HOME: None
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Dev1\AppData\Local\Temp\pip-install-uxkserni\pyjnius\setup.py", line 246, in <module>
compile_native_invocation_handler(JDK_HOME, JRE_HOME)
File "C:\Users\Dev1\AppData\Local\Temp\pip-install-uxkserni\pyjnius\setup.py", line 96, in compile_native_invocation_handler
join('jnius', 'src', 'org', 'jnius', 'NativeInvocationHandler.java')
File "c:\users\dev1\appdata\local\programs\python\python37-32\lib\subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Program Files\\Java\\jdk-13.0.1\\bin\\javac.exe', '-target', '1.6', '-source', '1.6', 'jnius\\src\\org\\jnius\\NativeInvocationHandler.java']' returned non-zero exit status 2.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I can not make Stanford Parser Version 3.5.1 work. I know that newer versions of this tool are available but I have tons of old code using this particular version. This is for an academic course.
I am using Windows 7, JDK 1.8.0_65, python 3.3.3 and NLTK 3.0.2
My environment variables are as follows:
CLASSPATH : C:\Program Files (x86)\stanford-parser-full-2015-01-30\jars\stanford-parser-3.5.1-models.jar;C:\Program Files (x86)\stanford-parser-full-2015-01-30\jars\stanford-parser-3.5.1-sources.jar;C:\Program Files (x86)\stanford-parser-full-2015-01-30\jars\stanford-parser.jar
JAVA_HOME : C:\Program Files\Java\jdk1.8.0_65\bin
Path : C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Apple\Internet Services\;C:\Program Files\Git\cmd;C:\Program Files (x86)\stanford-parser-full-2015-01-30\jars\
I run this code:
from nltk.parse import stanford
parser = stanford.StanfordParser(model_path='C:\Program Files
(x86)\stanford-parser-full-2015-01-30\edu\stanford\lp\models\lexparser\englishPCFG.ser.gz')
parser.raw_parse('I love apples')
And I am getting this error
Loading parser from serialized file C:\Program Files
(x86)\stanford-parser-full-2015-01-30\edu\stanford\lp\models\lexparser\englishPCFG.ser.gz
...
java.io.IOException: Unable to resolve "C:\Program Files
(x86)\stanford-parser-full-2015-01-30\edu\stanford\lp\models\lexparser\englishPCFG.ser.gz"
as either class path, filename or URL
at
edu.stanford.nlp.io.IOUtils.getInputStreamFromURLOrClasspathOrFileSystem(IOUtils.java:463)
at edu.stanford.nlp.io.IOUtils.readStreamFromString(IOUtils.java:396)
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.getParserFromSerializedFile(LexicalizedParser.java:599)
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.getParserFromFile(LexicalizedParser.java:394)
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.loadModel(LexicalizedParser.java:181)
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.main(LexicalizedParser.java:1395)
Loading parser from text file C:\Program Files
(x86)\stanford-parser-full-2015-01-30\edu\stanford\lp\models\lexparser\englishPCFG.ser.gz
java.io.IOException: Unable to resolve "C:\Program Files
(x86)\stanford-parser-full-2015-01-30\edu\stanford\lp\models\lexparser\englishPCFG.ser.gz"
as either class path, filename or URL
at
edu.stanford.nlp.io.IOUtils.getInputStreamFromURLOrClasspathOrFileSystem(IOUtils.java:463)
at edu.stanford.nlp.io.IOUtils.readerFromString(IOUtils.java:591)
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.getParserFromTextFile(LexicalizedParser.java:533)
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.getParserFromFile(LexicalizedParser.java:396)
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.loadModel(LexicalizedParser.java:181)
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.main(LexicalizedParser.java:1395)
Exception in thread "main" java.lang.NullPointerException
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.loadModel(LexicalizedParser.java:183)
at
edu.stanford.nlp.parser.lexparser.LexicalizedParser.main(LexicalizedParser.java:1395)
Traceback (most recent call last): File
"C:\Users\Zimtyth\Desktop\PFE\Implémentation\Codes\Code
final\Lib_Stanford_Parser.py", line 100, in
resultat = parse_sent("My name is Melroy and i want to win.") File "C:\Users\Zimtyth\Desktop\PFE\Implémentation\Codes\Code
final\Lib_Stanford_Parser.py", line 10, in parse_sent
return parser.raw_parse(sent) File "C:\Python33\lib\site-packages\nltk\parse\stanford.py", line 152, in
raw_parse
return next(self.raw_parse_sents([sentence], verbose)) File "C:\Python33\lib\site-packages\nltk\parse\stanford.py", line 170, in
raw_parse_sents
return self._parse_trees_output(self._execute(cmd, '\n'.join(sentences), verbose)) File
"C:\Python33\lib\site-packages\nltk\parse\stanford.py", line 230, in
_execute
stdout=PIPE, stderr=PIPE) File "C:\Python33\lib\site-packages\nltk\internals.py", line 161, in java
raise OSError('Java command failed : ' + str(cmd)) OSError: Java command failed : ['C:\Program
Files\Java\jdk1.8.0_65\bin\java.exe', '-mx1000m', '-cp',
'C:\Program Files
(x86)\stanford-parser-full-2015-01-30\jars\stanford-parser.jar;C:\Program
Files
(x86)\stanford-parser-full-2015-01-30\jars\stanford-parser-3.5.1-models.jar',
'edu.stanford.nlp.parser.lexparser.LexicalizedParser', '-model',
'C:\Program Files
(x86)\stanford-parser-full-2015-01-30\edu\stanford\lp\models\lexparser\englishPCFG.ser.gz',
'-sentences', 'newline', '-outputFormat', 'penn', '-encoding', 'utf8',
'c:\users\zimtyth\appdata\local\temp\tmpbf5zdg']
I have already checked a couple of answers in SO about this like this but still I could not make it work. It looks like a Java problem, please tell me what am I doing wrong here?
I would guess that your code isn't right and you don't have any file at the location 'C:\Program Files (x86)\stanford-parser-full-2015-01-30\edu\stanford\lp\models\lexparser\englishPCFG.ser.gz'.
If the models jar file is on your classpath, you should be able to get things to work by giving the model path (inside the jar file):
parser = stanford.StanfordParser(model_path='edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz')
The other choice is to expand the jar file (jar -xf) and then you would have an englishPCFG.ser.gz file, which you could as a parameter to the model_path.
p.s. For other people reading this in 2019+: You shouldn't actually be using this NLTK package at all any more, but rather: nltk.parse.corenlp.CoreNLPParser
I'm trying to build CSipSimple
I get such error:
# External sources fetched out from external repos/zip
/Users/Nikita.Leshchev/Library/Android/sdk/ndk-bundle/build/core/build-local.mk:151: *** Android NDK: Aborting . Stop.
/Users/Nikita.Leshchev/Library/Android/sdk/ndk-bundle/build/core/build-local.mk:151: *** Android NDK: Aborting . Stop.
Isources/modules/audio_processing/aecm/include -Isources/modules/audio_processing/aecm/../utility -Isources/modules/audio_processing/aecm/../../.. -Isources/modules/audio_processing/aecm/../../../common_audio/signal_processing/include -Isources/modules/audio_processing/aecm/../../../system_wrappers/interface -mfpu=neon -mfloat-abi=softfp -flax-vector-conversions -S -o sources/modules/audio_processing/aecm/aecm_core_neon_offsets.S sources/modules/audio_processing/aecm/aecm_core_neon_offsets.c
make[1]: Isources/modules/audio_processing/aecm/include: No such file or directory
make[1]: [sources/modules/audio_processing/aecm/aecm_core_neon_offsets.S] Error 1 (ignored)
Traceback (most recent call last):
File "sources/build/generate_asm_header.py", line 46, in <module>
main(sys.argv[1:])
File "sources/build/generate_asm_header.py", line 30, in main
infile = open(argv[0])
IOError: [Errno 2] No such file or directory: 'sources/modules/audio_processing/aecm/aecm_core_neon_offsets.S'
make[1]: *** [sources/modules/audio_processing/aecm/aecm_core_neon_offsets.h] Error 1
make: *** [webrtc-preprocess] Error 2
Here suggests to check variables and installed soft. But my variables is ok
echo $PATH output:
/opt/local/bin:/opt/local/sbin:/usr/local/php5/bin:/Users/Nikita.Leshchev/Downloads/pcre-8.39/bin:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/Nikita.Leshchev/Library/Android/sdk/tools:/Users/Nikita.Leshchev/Library/Android/sdk/platform-tools:/Users/Nikita.Leshchev/Library/Android/sdk/ndk-bundle/
Variables ANDROID_NDK and ANDROID_SDK defined. All required soft installed
which ndk-build output:
/Users/Nikita.Leshchev/Library/Android/sdk/ndk-bundle//ndk-build
I did everything like in documentation, but i have this error. Can anybody help?
NDK Version 13.11.3345770
SDK Version 25.2.2
OSX 10.11.6
UPD I coudn't build it, but i found this repository I could download and build it without any problems
I solved my problem, not on 100% for a while, but this error i have resolved.
This and some other files i found in this repository
I ran into a quiet weird situation ...
Currently I try to build and install OpenCv3 for Python3 on Ubuntu 15
While compiling and installing opencv3 for python2.7 worked pretty well - doing the same for python3 (same downloaded opencv package) stops with make error 2 (actually with different errors) ...
So something's wrong with: [ 77%] Generating photo+CalibrateCRF.java, photo.cpp because afterwards I get different traceback's and errors:
Traceback (most recent call last):
File "/media/stefan/A050780B5077E706/_raspi/opencv/sources/modules/java/generator/gen_java.py", line 1559, in <module>
generator.gen(srcfiles, module, dstdir)
File "/media/stefan/A050780B5077E706/_raspi/opencv/sources/modules/java/generator/gen_java.py", line 1061, in gen
self.gen_class(ci)
File "/media/stefan/A050780B5077E706/_raspi/opencv/sources/modules/java/generator/gen_java.py", line 1460, in gen_class
for fi in ci.getAllMethods():
File "/media/stefan/A050780B5077E706/_raspi/opencv/sources/modules/java/generator/gen_java.py", line 824, in getAllMethods
result.extend([fi for fi in sorted(self.methods) if fi.isconstructor])
TypeError: unorderable types: FuncInfo() < FuncInfo()
modules/java/CMakeFiles/opencv_java.dir/build.make:86: recipe for target 'modules/java/photo+CalibrateCRF.java' failed
make[2]: *** [modules/java/photo+CalibrateCRF.java] Error 1
CMakeFiles/Makefile2:6282: recipe for target 'modules/java/CMakeFiles/opencv_java.dir/all' failed
make[1]: *** [modules/java/CMakeFiles/opencv_java.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2
Obviously there is something going on with the java part of OpenCV. I ran into exactly the same error but since I didn't want to use Java at all I excluded it from the build and everything worked just fine.
Here is what did the job for me:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_TBB=ON -D CMAKE_INSTALL_PREFIX=$(python3 -c "import sys; print(sys.prefix)") -D BUILD_EXAMPLES=ON -D PYTHON_EXECUTABLE=$(which python3) -D BUILD_opencv_java=OFF BUILD_opencv_test_java=OFF ..
I have setup a single-node Hadoop 1.2.1 cluster and trying to run this script:
pydoop script transpose.py matrix.txt t_matrix
The script returns nothing and the job is in pending status.
The question is, after running the script the job is in pending status for more than 10 minutes. Why the Job is not running properly?
And this is the output generated while running:
Traceback (most recent call last): File "/home/hduser/hadoop/tmp/mapred/local
/taskTracker/distcache/-2030848362897089950_-2130723868_1886929692/localhost
/user/hduser /pydoop_script_91c491cf7e6b42f6bcbeda09edae9385
/exe90d967507f86405a9606c35582b2fc43", line 10, in import pydoop.pipes File"/usr/local
/lib/python2.7/dist-packages/pydoop/pipes.py", line 29, in pp =
pydoop.import_version_specific_module('_pipes') File "/usr/local/lib/python2.7/dist-
packages/pydoop/__init__.py", line 107, in import_version_specific_module return
import_module(complete_mod_name(name)) File "/usr/lib/python2.7/importli/__init__.py",
line 37, in import_module __import__(name) ImportError: /usr/local/lib/python2.7/dist-
packages/pydoop/_pipes_1_2_1.so: undefined symbol: BIO_s_mem
You are missing one required SSL library.
You will need to find and link "libssl.so.1.0.0" in your environment.
Try to execute the following before running your pydoop script:
export LD_PRELOAD=PATH_TO/libssl.so.1.0.0
For example:
export LD_PRELOAD=/lib/x86_64-linux-gnu/libssl.so.1.0.0