I'm trying to install v8js on a local http/ssh server built with Debian 9.3, so I need to install v8 chromium engine first according to this documentation.
But when I'm trying to run the command line tools/dev/v8gen.py -vv x64.release -- is_component_build=true the command sends me this:
################################################################################
/usr/bin/python -u tools/mb/mb.py gen -f infra/mb/mb_config.pyl -m developer_default -b x64.release out.gn/x64.release
Writing """\
is_debug = false
target_cpu = "x64"
""" to /home/dev/v8/out.gn/x64.release/args.gn.
/home/dev/v8/buildtools/linux64/gn gen out.gn/x64.release --check
Traceback (most recent call last):
File "tools/mb/mb.py", line 67, in Main
ret = self.args.func()
File "tools/mb/mb.py", line 317, in CmdGen
return self.RunGNGen(vals)
File "tools/mb/mb.py", line 856, in RunGNGen
ret, _, _ = self.Run(cmd)
File "tools/mb/mb.py", line 1378, in Run
ret, out, err = self.Call(cmd, env=env, buffer_output=buffer_output)
File "tools/mb/mb.py", line 1392, in Call
env=env)
File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
raise child_exception
OSError: [Errno 8] Exec format error
Traceback (most recent call last):
File "tools/dev/v8gen.py", line 304, in <module>
sys.exit(gen.main())
File "tools/dev/v8gen.py", line 298, in main
return self._options.func()
File "tools/dev/v8gen.py", line 166, in cmd_gen
gn_outdir,
File "tools/dev/v8gen.py", line 208, in _call_cmd
stderr=subprocess.STDOUT,
File "/usr/lib/python2.7/subprocess.py", line 219, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/usr/bin/python', '-u', 'tools/mb/mb.py', 'gen', '-f', 'infra/mb/mb_config.pyl', '-m', 'developer_default', '-b', 'x64.release', 'out.gn/x64.release']' returned non-zero exit status 1
Obviously I can not continue the following installation steps (I can't use ninja) and I do not really know about Python so a help would be really convenient :)
PS: I saw (I don't remember where) that there is probably minimum RAM (8GB) and Disk space (100GB) requirements to build v8, is that it ...?
Related
I get this error when I do pip install language-check:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/j6/yr6zgb4d1w308jkpc27p2t9w0000gn/T/pip-build-ymwzmypp/language-check/setup.py", line 595, in <module>
sys.exit(main())
File "/private/var/folders/j6/yr6zgb4d1w308jkpc27p2t9w0000gn/T/pip-build-ymwzmypp/language-check/setup.py", line 590, in main
run_setup_hooks(config)
File "/private/var/folders/j6/yr6zgb4d1w308jkpc27p2t9w0000gn/T/pip-build-ymwzmypp/language-check/setup.py", line 561, in run_setup_hooks
language_tool_hook(config)
File "/private/var/folders/j6/yr6zgb4d1w308jkpc27p2t9w0000gn/T/pip-build-ymwzmypp/language-check/setup.py", line 584, in language_tool_hook
download_lt()
File "/private/var/folders/j6/yr6zgb4d1w308jkpc27p2t9w0000gn/T/pip-build-ymwzmypp/language-check/download_lt.py", line 117, in download_lt
version = get_newest_possible_languagetool_version()
File "/private/var/folders/j6/yr6zgb4d1w308jkpc27p2t9w0000gn/T/pip-build-ymwzmypp/language-check/download_lt.py", line 81, in get_newest_possible_languagetool_version
universal_newlines=True)
File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 336, in check_output
**kwargs).stdout
File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/usr/bin/java', '-version']' returned non-zero exit status 1.
I've looked at this question python pip install error language_check and followed the instructions to install python setup.py install and I get this:
Traceback (most recent call last):
File "setup.py", line 595, in <module>
sys.exit(main())
File "setup.py", line 590, in main
run_setup_hooks(config)
File "setup.py", line 561, in run_setup_hooks
language_tool_hook(config)
File "setup.py", line 584, in language_tool_hook
download_lt()
File "/Users/allyzamarquez/ben/language_check/language-check/download_lt.py", line 117, in download_lt
version = get_newest_possible_languagetool_version()
File "/Users/allyzamarquez/ben/language_check/language-check/download_lt.py", line 81, in get_newest_possible_languagetool_version
universal_newlines=True)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/usr/bin/java', '-version']' returned non-zero exit status 1
Java 8 must be used until language-check fixes their installer script:
sudo apt install openjdk-8-jdk
sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
pip install language-check
I have to run HIVE queries using python script eg,
For this $ bdscc -e "show databases"
I want to do the same in python, but I am getting error-
>>> import subprocess
>>> subprocess.call(['bdscc', '-e', 'show databases'])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.7/subprocess.py", line 524, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Is there any way to do this in python?
PS- The command $ bdscc -e "show databases" from terminal is running fine.
UPDATE-- bdscc is an alias set by my company for HIVE shell
I downloaded OpenCV folder from GitHub and followed the ReadMe instruction to build it for ios.
After use python opencv/platforms/ios/build_framework.py ios command I have the following error:
Executing: ['cmake', '-GXcode', '-DAPPLE_FRAMEWORK=ON', '-DCMAKE_INSTALL_PREFIX=install', '-DCMAKE_BUILD_TYPE=Release', '-DIOS_ARCH=armv7', '-DCMAKE_TOOLCHAIN_FILE=/Users/name/Downloads/opencv/platforms/ios/cmake/Toolchains/Toolchain-iPhoneOS_Xcode.cmake', '-DENABLE_NEON=ON', '/Users/name/Downloads/opencv', '-DCMAKE_C_FLAGS=-fembed-bitcode', '-DCMAKE_CXX_FLAGS=-fembed-bitcode'] in /Users/name/Downloads/ios/build/build-armv7-iphoneos
============================================================
ERROR: [Errno 2] No such file or directory
============================================================
Traceback (most recent call last):
File "opencv/platforms/ios/build_framework.py", line 112, in build
self._build(outdir)
File "opencv/platforms/ios/build_framework.py", line 104, in _build
self.buildOne(t[0], t[1], mainBD, cmake_flags)
File "opencv/platforms/ios/build_framework.py", line 186, in buildOne
execute(cmakecmd, cwd = builddir)
File "opencv/platforms/ios/build_framework.py", line 36, in execute
retcode = check_call(cmd, cwd = cwd)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 535, in check_call
retcode = call(*popenargs, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
What I have to do to fix it?
If someone in the future will have the same problem.
This problem was in the master branch, downloading branch 2.4 and adding CMake at PATH the build process go well
I also encountered the same problem.
In the master branch or 3.4 branch or 2.4 branch.
But after installing cmake, it will be fine.
In the 2.4 branch error message will show :
/bin/sh: cmake: command not found
I have had this error for a year now and still can't find a solution. I am using Linux Mint 17.3 Every time I try to install something using pip, I get a bunch of exceptions.
$ pip install -U scikit-learns
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 272, in run
with self._build_session(options) as session:
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 72, in _build_session
insecure_hosts=options.trusted_hosts,
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/download.py", line 329, in __init__
self.headers["User-Agent"] = user_agent()
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/download.py", line 93, in user_agent
from pip._vendor import distro
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/_vendor/distro.py", line 1050, in <module>
_distro = LinuxDistribution()
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/_vendor/distro.py", line 594, in __init__
if include_lsb else {}
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/_vendor/distro.py", line 933, in _get_lsb_release_info
raise subprocess.CalledProcessError(code, cmd, stdout)
CalledProcessError: Command 'lsb_release -a' returned non-zero exit status 1
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==9.0.1', 'console_scripts', 'pip')()
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/__init__.py", line 233, in main
return command.main(cmd_args)
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 251, in main
timeout=min(5, options.timeout)) as session:
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 72, in _build_session
insecure_hosts=options.trusted_hosts,
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/download.py", line 329, in __init__
self.headers["User-Agent"] = user_agent()
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/download.py", line 93, in user_agent
from pip._vendor import distro
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/_vendor/distro.py", line 1050, in <module>
_distro = LinuxDistribution()
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/_vendor/distro.py", line 594, in __init__
if include_lsb else {}
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/_vendor/distro.py", line 933, in _get_lsb_release_info
raise subprocess.CalledProcessError(code, cmd, stdout)
subprocess.CalledProcessError: Command 'lsb_release -a' returned non-zero exit status 1
The "Command 'lsb_release -a' returned non-zero exit status 1" always popped up. I have installed multiple versions of python and tried deleting them manually and it still comes up with the same error.
If you can't help me solve this error, how can I uninstall all python files?
When I update Python and pip,I had the problem like this
your can run lsb_release, if your run shell: #lsb_release
It work like:
Traceback (most recent call last): File "/usr/bin/lsb_release", line
28, in import lsb_release ImportError: No module named
'lsb_release'
You can change file (/usr/bin/lsb_release) so the shebang changes from:
#! /usr/bin/python -Es
to:
#! /usr/bin/python2 -Es
where you specify the path /usr/bin/python2 to the old Python binary.
I would like to run a very simple hive command from within my python script. I am trying to use hive -e, but I am getting an error
def hive():
cmd = "hive -e \"msck repair table dashboard_report\""
print(cmd)
check_call(cmd)
This is the error I am getting
hive -e "msck repair table dashboard_report"
Traceback (most recent call last):
File "/home/yosi/work/source/slg/tiger/src/main/resources/python/tiger.py", line 59, in <module>
hive()
File "/home/yosi/work/source/slg/tiger/src/main/resources/python/tiger.py", line 57, in hive
check_call(cmd)
File "/usr/lib/python2.7/subprocess.py", line 535, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Your check_call function is calling subprocess.Popen. If you want to pass arguments to that function you have to pass them in a list.
Probably:
cmd = ["hive", "-e", "\"msck repair table dashboard_report\""]
check_call(cmd)
Will work. Maybe some refactoring will be needed down the call stack to accept a list instead of a string.
If you are using python2.7 then the below code snippet will work.
import subprocess
command = [""" hive -e "msck repair table dashboard_report" """]
print subprocess.check_output(command,shell=True)