简体   繁体   English

重新启动/注销/登录后,如何使Python3.6 Red Hat Software Collection持久存在?

[英]How can I make Python3.6, Red Hat Software Collection, persist after a reboot/logout/login?

I am trying to enable rh-python36 software collection after reboot So I can avoid calling "scl enable" all the time. 我试图在重新启动后启用rh-python36软件收集,所以我可以避免一直调用“ scl enable”。
After unzipping and installing the package: 解压缩并安装软件包后:

yum install -y tmp/rpms/*

I created a new file "python36.sh" under /etc/profile.d with the following script: 我使用以下脚本在/etc/profile.d下创建了一个新文件“ python36.sh”:

#!/bin/bash
source /opt/rh/rh-python36/enable
export X_SCLS="`scl enable rh-python36 'echo $X_SCLS'`"

After restarting or rebooting the instance, I am getting : No such file or directoryenable 重新启动或重新启动实例后,我得到: No such file or directoryenable
I am using CentOS release 6.10 (Final) 我正在使用CentOS版本6.10(最终版)

Try this: 尝试这个:

#!/bin/bash
source scl_source enable rh-python36

Reference Doc: https://access.redhat.com/solutions/527703 参考文档: https : //access.redhat.com/solutions/527703

如果您具有root特权,则将下面的代码行添加到根目录中的.bash_profile文件中:

source /opt/rh/rh-python36/enable

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何让 venv 安装 python3.6 二进制文件? - How can I make venv install a python3.6 binary? 我该如何抓取所有 <td> 内容是什么?(python3.6) - How can I crawl all the <td> contents?(python3.6) 如何存储从Excel到python3.6的列? - How can I store columns from excel to python3.6? 如何在Python3.6中处理“ UnboundLocalError”? - How can I handle “UnboundLocalError” in Python3.6? 如何在Python3.6和CentOs上安装Twisted + Scrapy - How Can I install Twisted + Scrapy on Python3.6 and CentOs 我可以pip安装python3.6吗? - Can I pip install python3.6? 如何确保在对列表进行混排之后,所有值实际上都已更改索引? (Python3.6) - How do I make sure that after shuffling a list, all values have actually changed index? (Python3.6) 如何在 django3.0.2 python3.6 中创建一个带有常量的文件并在所有应用程序中访问它。 任何 github 存储库也很有用 - How can i make a file with constants in django3.0.2 python3.6 and access it in all applications . Any github repository is also useful 当python3.6位于/usr/local/bin/python3.6时,如何在ubuntu上卸载它 - How do I uninstall python3.6 on ubuntu when it is located on /usr/local/bin/python3.6 我可以在 python3.6 中使用 python3.4 模块吗? - Can I use python3.4 modules in python3.6?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM