doc-exports/docs/ecs/umn/en-us_topic_0107412162.html
wanghuijuan738 b3889702d3 ecs umn 20241031 version
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com>
Co-authored-by: wanghuijuan738 <wanghuijuan738@huawei.com>
Co-committed-by: wanghuijuan738 <wanghuijuan738@huawei.com>
2024-11-25 14:00:21 +00:00

2.8 KiB
Raw Blame History

What Should I Do If Error "command ´gcc´ failed with exit status 1" Occurs During PIP-based Software Installation?

Symptom

When installing the Python library software, you need to configure the PIP source. Take the official image source as an example:
[root@test home]# cat /root/.pip/pip.conf 
[global]
index-url = https://pypi.python.org/simple
trusted-host = pypi.python.org

During the installation, the system displays the message "command ´gcc´ failed with exit status 1". However, GCC has been installed by running the yum command before the Python library software is installed using the PIP.

Figure 1 Installation error

Possible Causes

openssl-devel is not supported.

Solution

The following operations use psutil as an example:

  1. Run the following command to install openssl-devel:

    yum install gcc libffi-devel python-devel openssl-devel -y

  2. Use PIP to install the Python library software again. The error message is cleared.
    Figure 2 Successful installation