Usando Python y Pip

Usando Python y Pip

Estoy intentando configurar Python y Python3 para que los use un esclavo Linux Jenkins. Me recomendaron usar Pip para Python y Pip3 para Python3 en términos de administración de módulos. No estoy seguro de cómo, pero tanto Pip como Pip3 apuntan a mi instalación de Python 3.6. Puede que sea una pista falsa, pero estoy intentando importar un módulo 'SlackClient' y me dicen que no se puede encontrar el módulo, aunque también dice que ya está instalado. Consulte a continuación para obtener más detalles:

$ python py.py
Traceback (most recent call last):
  File "py.py", line 1, in <module>
    import SlackClient
ImportError: No module named SlackClient

$ python3 py.py
Traceback (most recent call last):
  File "py.py", line 1, in <module>
    import SlackClient
ModuleNotFoundError: No module named 'SlackClient'

Cada vez que intento instalar el módulo:

$ pip install slackclient
Requirement already satisfied: slackclient in /usr/local/lib64/python3.6/site-packages (2.0.1)
Requirement already satisfied: aiohttp>3.5.2 in /usr/local/lib64/python3.6/site-packages (from slackclient) (3.5.4)
Requirement already satisfied: aiodns>1.0 in /usr/local/lib/python3.6/site-packages (from slackclient) (2.0.0)
Requirement already satisfied: async-timeout<4.0,>=3.0 in /usr/local/lib/python3.6/site-packages (from aiohttp>3.5.2->slackclient) (3.0.1)
Requirement already satisfied: idna-ssl>=1.0; python_version < "3.7" in /usr/local/lib/python3.6/site-packages (from aiohttp>3.5.2->slackclient) (1.1.0)
Requirement already satisfied: multidict<5.0,>=4.0 in /usr/local/lib64/python3.6/site-packages (from aiohttp>3.5.2->slackclient) (4.5.2)
Requirement already satisfied: typing-extensions>=3.6.5; python_version < "3.7" in /usr/local/lib/python3.6/site-packages (from aiohttp>3.5.2->slackclient) (3.7.4)
Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib64/python3.6/site-packages (from aiohttp>3.5.2->slackclient) (1.3.0)
Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.6/site-packages (from aiohttp>3.5.2->slackclient) (19.1.0)
Requirement already satisfied: chardet<4.0,>=2.0 in /usr/local/lib/python3.6/site-packages (from aiohttp>3.5.2->slackclient) (3.0.4)
Requirement already satisfied: pycares>=3.0.0 in /usr/local/lib64/python3.6/site-packages (from aiodns>1.0->slackclient) (3.0.0)
Requirement already satisfied: typing; python_version < "3.7" in /usr/local/lib/python3.6/site-packages (from aiodns>1.0->slackclient) (3.7.4)
Requirement already satisfied: idna>=2.0 in /usr/local/lib/python3.6/site-packages (from idna-ssl>=1.0; python_version < "3.7"->aiohttp>3.5.2->slackclient) (2.8)
Requirement already satisfied: cffi>=1.5.0 in /usr/local/lib64/python3.6/site-packages (from pycares>=3.0.0->aiodns>1.0->slackclient) (1.12.3)
Requirement already satisfied: pycparser in /usr/local/lib/python3.6/site-packages (from cffi>=1.5.0->pycares>=3.0.0->aiodns>1.0->slackclient) (2.19)

Mis entornos están configurados así:

$ python --version
    Python 2.7.14
$ python3 --version
    Python 3.6.8
$ pip --version
    pip 19.1.1 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)
$ pip3 --version
    pip 19.1.1 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)

$ which pip
    /usr/local/bin/pip
$ which pip3
    /usr/local/bin/pip3
$ which python
    /usr/bin/python
$ which python3
    /usr/bin/python3

Parece extraño que Python no pueda ver los módulos. Lo único que se me ocurre es que parece que ambos Pips están instalando paquetes en Python 3.6, pero tampoco entiendo por qué Python3 tampoco puede encontrar los módulos.

información relacionada