Configuring a Soft Link

To enable the optimized Python in the environment, run the following commands to configure the system symbolic link:

# <default_path> is the default Python directory. You can run 'which python' to query the path.
cd <default_path>

# Back up the original Python binary file.
mv python python_bak

# Create a Python soft link.
ln -s <install_path>/bin/python3 python

Configure the pip file in the same way. After the configuration is complete, check whether the Python path in the first line of the pip file is correct.

vi pip

After the preceding operations are complete, you can run the Python command to invoke the compiled and optimized Python and run the pip command to manage packages.