Sponsored Content
Top Forums Shell Programming and Scripting How to enable rh-python34 from bash shell script, default python is 2.6 version.? Post 303033172 by Don Cragun on Sunday 31st of March 2019 08:08:41 PM
Old 03-31-2019
I asked for three things last time that you have not answered:
Quote:
Do you ever want to use python version 2.6.6 again?
Please show us the output from the commands:
Code:
ls -l /opt/rh/rh-python34/root/usr/bin
type python2 python3

And, since python3 seems to be version 3.6.3 (not 3.4) and the python enabled by the command scl enable rh-python34 bash doesn't seem to work on its own, I'm confused about what is going on. Please also show us the output from:
Code:
scl enable rh-python34 bash <<"EOF"
python --version
EOF

Is there some reason why you cannot just use python3 instead of python when you want to use rh-python34? Have you tried your scripts with it to see if it works?
 

10 More Discussions You Might Find Interesting

1. Red Hat

enable FTP access / check version

how can I check the Linux version? (14 Replies)
Discussion started by: zp523444
14 Replies

2. Shell Programming and Scripting

how to disable and enable <control>-c or -z in a shell script

Dear all, good day. i'm asking about how to disable <control>-c or <control>-z in the beginning of a shell script then enable it again before the script exit Best Regards ---------- Post updated at 04:41 AM ---------- Previous update was at 04:18 AM ---------- Dear All i found the... (3 Replies)
Discussion started by: islam.said
3 Replies

3. Programming

Python: bash-shell-like less functionality in the python shell

Hello, Is there some type of functional way to read things in the Python shell interpreter similar to less or more in the bash (and other) command line shells? Example: >>> import subprocess >>> help(subprocess) ... ... I'm hoping so as I hate scrolling and love how less works with... (0 Replies)
Discussion started by: Narnie
0 Replies

4. Shell Programming and Scripting

Python call to bash script returns empty string

Hi all, I need help figuring out why my script won't work when envoked from web interface. First off, I'm fairly new to Linux and Shell scripting so, my apologies for being ignorant! So I have a python script that I envoke through a web interface. This script envokes my shell script and... (8 Replies)
Discussion started by: arod291
8 Replies

5. SuSE

"ssh suse-server 'python -V' > python-version.out" not redirecting

Okay, so I have had this problem on openSUSE, and Debian systems now and I am hoping for a little help. I think it has something to do with Python but I couldn't find a proper Python area here. I am trying to redirect the output of "ssh suse-server 'python -V'" to a file. It seems that no matter... (3 Replies)
Discussion started by: Druonysus
3 Replies

6. Shell Programming and Scripting

[Solved] Unable to call a python script from bash

Hi, I am trying to run a python script embedded in bash script. But is throwing me an error. Please help. Script: #!/bin/bash nohup /usr/bin/python /opt/web/http.py & Error: /usr/bin/python: can't open file '/opt/web/http.py': No such file or directory Please help me on this. (6 Replies)
Discussion started by: maddy26615
6 Replies

7. Shell Programming and Scripting

Unable to store "python --version" to a shell variable

Hi All, I need to get the version of python installed and store it in a variable for later use. Whereas it is printing on the console instead of storing to variable. I am able to store output of ls command in a variable. Please check the below code : root@myhost:/volumes/srini# cat... (4 Replies)
Discussion started by: srinivasan.neel
4 Replies

8. Shell Programming and Scripting

Enable logging from within the shell script

Bash on Oracle Linux 6.3 I have a shell script whose output I want to redict to a log file. So, I can simply redirect the output as shown below. # cat myscript.sh #### I actually want some logging mechanism here which will redirect the output to a log file echo 'hello world' #... (3 Replies)
Discussion started by: John K
3 Replies

9. Shell Programming and Scripting

Beginner here, how to call a bash-script from python properly?

Hi everyone, i have the following script.sh: foo='lsusb | grep Webcam | cut -c16-18' sudo /home/user/public/usbreset /dev/bus/usb/001/$foo when i try to call this script from python using subprocess.call("script.sh", shell=True) it seems that only 'sudo /home/user/public/usbreset' is being... (6 Replies)
Discussion started by: hilfemir
6 Replies

10. Shell Programming and Scripting

How to use scl enable python command call with in bash shell script?

I have a bash shell script, within it i am using the below two commands . its failing right on scl enable command itself. if i run it by itself without a shell, it works fine. by default it is using pythin version 2.6 something. i want to use 3.4 version for that reason with in the shell... (3 Replies)
Discussion started by: cplusplus1
3 Replies
slassq.f(3)							      LAPACK							       slassq.f(3)

NAME
slassq.f - SYNOPSIS
Functions/Subroutines subroutine slassq (N, X, INCX, SCALE, SUMSQ) SLASSQ Function/Subroutine Documentation subroutine slassq (integerN, real, dimension( * )X, integerINCX, realSCALE, realSUMSQ) SLASSQ Purpose: SLASSQ returns the values scl and smsq such that ( scl**2 )*smsq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq, where x( i ) = X( 1 + ( i - 1 )*INCX ). The value of sumsq is assumed to be non-negative and scl returns the value scl = max( scale, abs( x( i ) ) ). scale and sumsq must be supplied in SCALE and SUMSQ and scl and smsq are overwritten on SCALE and SUMSQ respectively. The routine makes only one pass through the vector x. Parameters: N N is INTEGER The number of elements to be used from the vector X. X X is REAL array, dimension (N) The vector for which a scaled sum of squares is computed. x( i ) = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n. INCX INCX is INTEGER The increment between successive values of the vector X. INCX > 0. SCALE SCALE is REAL On entry, the value scale in the equation above. On exit, SCALE is overwritten with scl , the scaling factor for the sum of squares. SUMSQ SUMSQ is REAL On entry, the value sumsq in the equation above. On exit, SUMSQ is overwritten with smsq , the basic sum of squares from which scl has been factored out. Author: Univ. of Tennessee Univ. of California Berkeley Univ. of Colorado Denver NAG Ltd. Date: November 2011 Definition at line 104 of file slassq.f. Author Generated automatically by Doxygen for LAPACK from the source code. Version 3.4.1 Sun May 26 2013 slassq.f(3)
All times are GMT -4. The time now is 05:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy