How to set python environment variables on linux system

For example, if you have a new Python version, we want to let the system use this version by default when running the task. You can do this:

  1. Execute the following command on xshell:
vim ~/.bashrc
  1. Add the following sentence to the result file above:
export PATH=/software/python_anaconda2/bin:$PATH

Where /software/python_anaconda2 is the path when python is installed.

Intelligent Recommendation

How to set and view environment variables in Linux

1. Variable types of Linux Divided by the life cycle of variables, Linux variables can be divided into two categories: Permanent: The configuration file needs to be modified, and the variable becomes ...

How to get and set environment variables in Python

Read Environment Variables in Python: The os module will require to import to read the environment variables. The os.environ object is used in Python to access the environment variable. The coder can ...

How to add environment variables in Linux system

1. Add common environment variables If you need to set the current folder as a flexible environment variable: APOLLO_HOME, please use Ctrl+Alt+T to open the terminal and enter the following command (n...

Linux set environment variables

1, temporary environment variables, replace the console or disappear after reboot Console execution: $PATH="$PATH":/filepath 2. Effective for all users If you want to take effect immediately...

PYTHON set environment variables

Path environment variable role is to specify the path search path, analog to Java's PATH Pythonpath specifies the class search path, analog to Java's CLASSPATH Python_home is the location of the inter...

More Recommendation

Linux system environment variables

Environment variable   1. System environment variables /etc/environment   2. All user environment variables /etc/profile   If you modify /etc/profile, execute after editing  PATH v...

View and set environment variables in U-boot in the Linux system through fw_printenv

Uboot can be accessed and modified by command access (STENV), but what should I do if I need to access these data under the Linux system? In fact, UboT will help us think about it. 1, compile FW_PRINT...

How to install Java in Linux system and configure jdk system environment variables

1. InOracle official websiteDownload the jdk version that needs to be installed. I used the jdk-8u191-linux-x64.tar.gz version here. 2. Create a jdk directory in /usr/local, or use other names. 3. Upl...

Linux learning 11-CentOS how to set up Java environment variables

Foreword Java installed with yum before, now I want to add environment variables, where is the Java path installed? How to find the installed path and add JDK to the environment variable. This article...

Ubuntu - set system environment variables

Introduction to environment variables The bash shell uses a feature called environment variable to store information about the shell session and the working environment. The use of environment variabl...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top