I am getting the following error while running gclient runhooks for building chromium.
running '/usr/bin/python src/tools/clang/scripts/update.py --if-needed' in '/media/usrname/!!ChiLL out!!'
Traceback (most recent call last):
File "src/tools/clang/scripts/update.py", line 283, in
sys.exit(main())
File "src/tools/clang/scripts/update.py", line 269, in main
stderr=os.fdopen(os.dup(sys.stdin.fileno())))
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 13] Permission denied
Error: Command /usr/bin/python src/tools/clang/scripts/update.py --if-needed returned non-zero exit status 1 in /media/usrname/!!ChiLL out!!
In order to get permission of the directory "/usr/bin/python src/tools/clang/scripts" I tried chown and chmod but it returned the same error.
I think the python scripts in scripts directory are trying to modify some other files or directories .... try to trace what it is trying to do...... You have not specified the OS on which u are working ....... see this link https://github.com/aerospike/aerospike-client-python/issues/22
It says Linux Mint 17 is not supported officially.....
Actually the directory was not mounted with execution permission. So I remounted the directory with execution permission using
mount -o exec /dev/sda5 /media/usrname
and it worked fine.
Related
I'm trying to install Open CV 2 on a shared hosting inside a virtualenv.
I already got numpy and all those stuff downloaded using Pip. I'm just having a bit of trouble with OpenCV2
I run this command in the ssh session
(penv)[dire]$ cmake -D MAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=$VIRTUAL_ENV/local/ -D PYTHON_EXECTUABLE=$PYTHONPATH/python2.7 -D PYTHON_PACKAGES_PATH=$VIRTUAL_ENV/lib/python2.7/site-packages -D INSTALL_PYTHON_EXAMPLES=ON ..
and the error I get is
Traceback (most recent call last):
File "/home/bashtroubles/website.com/public/NNPics/penv/bin/cmake", line 11, in <module>
sys.exit(cmake())
File "/home/bashtroubles/website.com/public/NNPics/penv/local/lib/python2.7/site-packages/cmake/__init__.py", line 33, in cmake
raise SystemExit(_program('cmake', sys.argv[1:]))
File "/home/bashtroubles/website.com/public/NNPics/penv/local/lib/python2.7/site-packages/cmake/__init__.py", line 29, in _program
return subprocess.call([os.path.join(CMAKE_BIN_DIR, name)] + args)
File "/usr/lib/python2.7/subprocess.py", line 493, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
(penv)[dire]$
This is also my .bashrc if it matters
# ~/.bashrc: executed by bash(1) for non-login shells.
# Load pythonbrew
alias pb='pythonbrew'
export PYTHONPATH=~/.pythonbrew/pythons/Python-2.7.3/lib
[[ -s /home/bashtroubles/.pythonbrew/etc/bashrc ]] && source /home/bashtroubles/.python$
# Load custom python installation
export PATH=~/opt/python-2.7.3/bin:${PATH}
export PYTHONPATH=~/opt/python-2.7.3/lib
The specific version is opencv-2.4.13 and the python version is 2.7.3
I believe the issue is because it's using the python2.7 from
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
Any ideas on how to get this going without a permission denied issue?
I ran into this problem. It looks like the binary it's trying to call isn't marked as an executable. I ran this to change the permissions
sudo chmod +x -R /usr/local/lib/python2.7/dist-packages/cmake-3.13.3-py2.7-linux-x86_64.egg/cmake/data/bin
I work at a large corporate organization where we have a Hadoop cluster. I got the admin to install virtualenv on all the Hadoop worker nodes so that I can submit mrjobs with standard Python dependencies that may not exist on the worker nodes. As per the documentation here, this is how my mrjob.conf file looks like:
runners:
hadoop:
setup:
- virtualenv venv
- . venv/bin/activate
- pip install nltk
I have a simple job that uses nltk package. I can verify that this setup script runs on the worker nodes (I can put simple commands like write some data to a file in /tmp and it works). However, I get the following error:
New python executable in venv/bin/python
Installing setuptools............done.
Installing pip...
Error [Errno 13] Permission denied while executing command /storage5/hadoop/map...env/bin/easy_install /usr/share/python-virtualenv/pip-1.1.tar.gz
...Installing pip...done.
Traceback (most recent call last):
File "/usr/bin/virtualenv", line 3, in <module>
virtualenv.main()
File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 938, in main
never_download=options.never_download)
File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 1054, in create_environment
install_pip(py_executable, search_dirs=search_dirs, never_download=never_download)
File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 643, in install_pip
filter_stdout=_filter_setup)
File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 976, in call_subprocess
cwd=cwd, env=env)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
java.lang.RuntimeException: PipeMapRed.waitOutputThreads(): subprocess failed with code 1
at org.apache.hadoop.streaming.PipeMapRed.waitOutputThreads(PipeMapRed.java:362)
at org.apache.hadoop.streaming.PipeMapRed.mapRedFinished(PipeMapRed.java:572)
at org.apache.hadoop.streaming.PipeMapper.close(PipeMapper.java:136)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:57)
at org.apache.hadoop.streaming.PipeMapRunner.run(PipeMapRunner.java:34)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:417)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:332)
at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1438)
at org.apache.hadoop.mapred.Child.main(Child.java:262)
What may be causing this error?
Thanks for this idea for deploying packages to the cluster.
As for your problem I think it looks like it doesn't have permission to write to the directory.
I have OSX and am running the python script out of the Unix shell
I'm running a python code that should open an application. I've been testing with Firefox.app and have been getting
Traceback (most recent call last):
File "/Users/brennan/Desktop/Coding/Wilix/wilix.py", line 453, in <module>
subprocess.call(["open -a "+cp2])
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 493, in call
return Popen(*popenargs, **kwargs).wait()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1228, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
My code is:
subprocess.call(["open -a "+cp2])
where cp2 is user input. (Firefox in this case)
if I cd into the programs directory and then do
open -a Firefox
firefox opens fine.
if I change my code to
subprocess.call(["open -a Firefox"])
I still get the error message.
You're passing open -a Firefox as one argument, as if you ran this in the shell:
$ "open -a Firefox"
You need to split up the items:
subprocess.call(['open', '-a', 'Firefox'])
Try giving the full path of firefox app.
It's wrong to use subprocess.call without shell=True or providing command as a list. Please, take a look at first examples in the docs:
http://docs.python.org/2/library/subprocess.html
Full path to Firefox may be needed or may be not needed.
I am trying to run a nessus scan from cronjob by subprocess python module. ,but from cronjob it's is giving an error. But not giving any error on execution of script from bash?
the cronjob code
01 11 * * * /root/nessusscan.py
and subprocess call in script is
subprocess.call(['nessus','-q','-x','-T','nessus','127.0.0.1','1241','user','password','ip.txt','res'])
from bash it's working fine but from cronjob i am getting following error in mail
Traceback (most recent call last):
File "/root/nessusscan.py", line 9, in <module>
subprocess.call(['nessus','-q','-x','-T','nessus','127.0.0.1','1241','user','password','ip.txt','res'])
File "/usr/lib/python2.7/subprocess.py", line 493, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
Thnx to evry one i am answering my own question for other people who will vist this thread. So that they can also get out of this error. In my case error got solved by giving the path of nessus which is "/opt/nessus/bin/nessus"
replaced nessus with "/opt/nessus/bin/nessus"
cronjob was not able to get the path of nessus command.It's working now.
I have written a script from the Python to automate scan. I have used nessus for that and used subprocess module in python. Problem is this it's running from the cli bash, but when I put that script to launch through by cron job. It gives following error
Traceback (most recent call last):
File "/root/nessusscan.py", line 9, in <module>
subprocess.call(['nessus','-q','-x','-T','nessus','127.0.0.1','1241','user','password','ip.txt','res'])
File "/usr/lib/python2.7/subprocess.py", line 493, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
The script is
subprocess.call(['nessus','-q','-x','-T','nessus','127.0.0.1','1241','user','password','ip.txt','res'])
Command for cron job
16 14 * * * cd /root/nessus; ./nessusscan.py
The error means that the program is found by subprocess but the user running the "nessusscan.py" does not have permissions to run it.
Check ownership of the nessus file and the permissions on it.