2

The pipenv's file has the module p4python specified for installation and below is the relevant line in the docker file which runs the pipenv's module installation.

RUN pipenv install --system --deploy --ignore-pipfile

However, the dependency installation fails with the following message.

Installing initially failed dependencies…
[pipenv.exceptions.InstallError]:   File "/usr/lib/python3.6/site- 
packages/pipenv/core.py", line 1874, in do_install
[pipenv.exceptions.InstallError]:       keep_outdated=keep_outdated
[pipenv.exceptions.InstallError]:   File "/usr/lib/python3.6/site- 
packages/pipenv/core.py", line 1253, in do_init
[pipenv.exceptions.InstallError]:       pypi_mirror=pypi_mirror,
[pipenv.exceptions.InstallError]:   File "/usr/lib/python3.6/site- 
packages/pipenv/core.py", line 859, in do_install_dependencies
[pipenv.exceptions.InstallError]:       retry_list, procs, 
failed_deps_queue, requirements_dir, **install_kwargs
[pipenv.exceptions.InstallError]:   File "/usr/lib/python3.6/site- 
packages/pipenv/core.py", line 763, in batch_install
[pipenv.exceptions.InstallError]:       _cleanup_procs(procs, not 
blocking, failed_deps_queue, retry=retry)
[pipenv.exceptions.InstallError]:   File "/usr/lib/python3.6/site- 
packages/pipenv/core.py", line 681, in _cleanup_procs
[pipenv.exceptions.InstallError]:       raise 
exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: ['Collecting p4python==2018.2.1743033 
(from -r /tmp/pipenv-9u5gpy03-requirements/pipenv-6yab4iqw- 
requirement.txt (line 1))', '  Using cached 
https://files.pythonhosted.org/packages/36/5a
/0a1b192cdecd31cb8bc0d0ba39c73ffd84ce823053d0004823a1fdbe1440/p4python- 
2018.2.1743033.tar.gz']
[pipenv.exceptions.InstallError]: ['ERROR: Complete output from command 
python setup.py egg_info:', '    ERROR: Attempting to load API from 
ftp.perforce.com', '    Traceback (most recent call last):', '      
File "<string>", line 1, in <module>', '      File "/tmp/pip-install- 
r77dk6yj/p4python/setup.py", line 269, in <module>', '        
(p4_api_dir, loaded_from_ftp) = get_api_dir(version.getVersion())', '      
File "/tmp/pip-install-r77dk6yj/p4python/setup.py", line 179, in 
get_api_dir', '        p4ftp = P4APIFtp()', '      File "/tmp/pip- 
install-r77dk6yj/p4python/tools/P4APIFtp.py", line 18, in __init__', '        
self.ftp = FTP(PERFORCE_FTP)', '      File 
"/usr/lib64/python3.6/ftplib.py", line 117, in __init__', '        
self.connect(host)', '      File "/usr/lib64/python3.6/ftplib.py", line 
152, in connect', '        source_address=self.source_address)', '      
File "/usr/lib64/python3.6/socket.py", line 724, in create_connection', 
'        raise err', '      File "/usr/lib64/python3.6/socket.py", line 
713, in create_connection', '        sock.connect(sa)', '    
ConnectionRefusedError: [Errno 111] Connection refused', '    --------- 
-------------------------------', 'ERROR: Command "python setup.py 
egg_info" failed with error code 1 in /tmp/pip-install- 
r77dk6yj/p4python/']
ERROR: ERROR: Package installation failed...

Does anyone have an idea as to why the installation is failing ?

aman
  • 365
  • 3
  • 13

1 Answers1

1

It looks like something is blocking your FTP access to ftp.perforce.com. If you are behind a firewall, check that you can access port 21 (the FTP port) on ftp.perforce.com, or ask your IT team to open that up for you.

jpyams
  • 4,030
  • 9
  • 41
  • 66