Resolving SSL certificate verification issues when running commands using 'pip'

Resolving SSL certificate verification issues when running commands using 'pip'

Access blocks are quite common in corporate environments. As a result, you may encounter problems when trying to use BotCity tools and Python resources on a machine in your company's environment.

One problem that may occur in these scenarios is the failure of the SSL certificate validation when trying to execute commands using Python's `pip`, such as installing a dependency.

WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED]
 certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))': /simple/pip/

Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443):
Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED]
certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) - skipping

If you are seeing an error similar to this in the Runner, log, or when running commands manually, it may be that your environment is blocking you from installing packages directly from PyPI (Python Package Index).

To resolve this issue, you can try running the following command to perform a global `pip` configuration related to `trusted-host`:

  1. pip config set global.trusted-host  "pypi.org files.pythonhosted.org pypi.python.org" --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org

This way, the next time the Runner performs the dependency installation step, this SSL-related error will not happen again.

If this alternative is not enough, it is important to validate with your company's IT team whether this is an appropriate solution for your environment.

Also, remember to validate with your IT team whether it is necessary to perform additional configurations regarding the use of `pip`.

You can find more details about problems with blocking environments in the prerequisites section of the documentation.


    • Related Articles

    • Problems with dependencies when running an automation

      This problem usually occurs when the dependencies installation step is not done correctly. When running the code, a message is displayed regarding the installation of the packages: ModuleNotFoundError: No module named 'botcity’ The first step is to ...
    • How to Diagnose and Fix Installation, Authentication, or Execution Issues with BotCity Tools

      Diagnosis To assist in identifying these issues, starting from version 1.2.5, the Wizard now includes the Diagnostic tool, which aims to check: Connectivity with BotCity services Possible network blocks Installed versions of Python and Java in the ...
    • Error Running Edge Browser via Orchestrator: How to Fix It?

      Issue During the execution of robots using the Microsoft Edge browser through the orchestrator, a specific issue was identified: the browser did not start correctly, whereas when running locally, the flow executed normally. The error presented was: ...
    • Issues Finding Elements with Computer Vision (find Method)

      Description In some cases, users report difficulty locating screen elements using the find method, which is based on computer vision (CV). This issue can arise due to various factors, such as screen resolution, system theme, visual obstructions, or ...
    • Error Running Wizard.exe: How to Fix It?

      Issue When attempting to start the installation, configuration, or authentication process of the BotCity Runner using the wizard in .exe format, you may encounter difficulties opening the file. This error usually occurs due to company security ...