Attempt -1: Turned off Strict Content Type Validation -pip install fails against production instance
Attempt -2: When i tried to download pypi package manually from prod nexus insatnce - its a tar.gz file.. Here is the verbose output from pip install
devops@-MacBook-Pro:~/Downloads$ pip install pypi-detect --trusted-host
nexusrepo.com -vv
Collecting pypi-detect
1 location(s) to search for versions of pypi-detect:
*
http://nexusrepo.com/nexus/repository/pypi-all/simple/pypi-detect/ Getting page
http://nexusrepo.com/nexus/repository/pypi-all/simple/pypi-detect/ Starting new HTTP connection (1):
nexusrepo.com "GET /nexus/repository/pypi-all/simple/pypi-detect/ HTTP/1.1" 200 509
Analyzing links from page
http://nexusrepo.com/nexus/repository/pypi-all/simple/pypi-detect/ Found link
http://nexusrepo.com/nexus/repository/pypi-all/packages/pypi-detect/0.3.1/pypi-detect-0.3.1.tar.gz#md5=299a2a4fc8003343302288e71da219b9 (from
http://nexusrepo.com/nexus/repository/pypi-all/simple/pypi-detect/), version: 0.3.1
Found link
http://nexusrepo.com/nexus/repository/pypi-all/packages/pypi-detect/0.2.9/pypi-detect-0.2.9.tar.gz#md5=c160e2432c8c0464c8caeb2d21e4ef86 (from
http://nexusrepo.com/nexus/repository/pypi-all/simple/pypi-detect/), version: 0.2.9
Found link
http://nexusrepo.com/nexus/repository/pypi-all/packages/pypi-detect/0.2.7/pypi-detect-0.2.7.tar.gz#md5=b5605970569ae865134a8c87e158d1e6 (from
http://nexusrepo.com/nexus/repository/pypi-all/simple/pypi-detect/), version: 0.2.7
Found link
http://nexusrepo.com/nexus/repository/pypi-all/packages/pypi-detect/0.2.6/pypi-detect-0.2.6.tar.gz#md5=f0d05958b200bf4cb956f071b72021bd (from
http://nexusrepo.com/nexus/repository/pypi-all/simple/pypi-detect/), version: 0.2.6
Found link
http://nexusrepo.com/nexus/repository/pypi-all/packages/pypi-detect/0.2.5/pypi-detect-0.2.5.tar.gz#md5=5198ee264be055dbd006a42c3babaf50 (from
http://nexusrepo.com/nexus/repository/pypi-all/simple/pypi-detect/), version: 0.2.5
Found link
http://nexusrepo.com/nexus/repository/pypi-all/packages/pypi-detect/0.2.4/pypi-detect-0.2.4.tar.gz#md5=dcb237f16ecdd569e7a46ae55e6c45e9 (from
http://nexusrepo.com/nexus/repository/pypi-all/simple/pypi-detect/), version: 0.2.4
Found link
http://nexusrepo.com/nexus/repository/pypi-all/packages/pypi-detect/0.2.3/pypi-detect-0.2.3.tar.gz#md5=d466e57966fc4b091f21cf802d66d380 (from
http://nexusrepo.com/nexus/repository/pypi-all/simple/pypi-detect/), version: 0.2.3
Found link
http://nexusrepo.com/nexus/repository/pypi-all/packages/pypi-detect/0.2.2/pypi-detect-0.2.2.tar.gz#md5=a35fc23d81e8346bf1aff0511a58934b (from
http://nexusrepo.com/nexus/repository/pypi-all/simple/pypi-detect/), version: 0.2.2
Found link
http://nexusrepo.com/nexus/repository/pypi-all/packages/pypi-detect/0.2.1/pypi-detect-0.2.1.tar.gz#md5=ff08e316d014cad7a4e609bf262e040b (from
http://nexusrepo.com/nexus/repository/pypi-all/simple/pypi-detect/), version: 0.2.1
Found link
http://nexusrepo.com/nexus/repository/pypi-all/packages/pypi-detect/0.1.9/pypi-detect-0.1.9.tar.gz#md5=73358d5162155adfd2e196e7287060dc (from
http://nexusrepo.com/nexus/repository/pypi-all/simple/pypi-detect/), version: 0.1.9
Using version 0.3.1 (newest of versions: 0.1.9, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.2.9, 0.3.1)
Resetting dropped connection:
nexusrepo.com "GET /nexus/repository/pypi-all/packages/pypi-detect/0.3.1/pypi-detect-0.3.1.tar.gz HTTP/1.1" 200 30720
Downloading
http://nexusrepo.com/nexus/repository/pypi-all/packages/pypi-detect/0.3.1/pypi-detect-0.3.1.tar.gz Downloading from URL
http://nexusrepo.com/nexus/repository/pypi-all/packages/pypi-detect/0.3.1/pypi-detect-0.3.1.tar.gz#md5=299a2a4fc8003343302288e71da219b9 (from
http://nexusrepo.com/nexus/repository/pypi-all/simple/pypi-detect/)
Cleaning up...
Exception:
Traceback (most recent call last):
File "/Users/devops/anaconda/lib/python3.6/tarfile.py", line 1640, in gzopen
t = cls.taropen(name, mode, fileobj, **kwargs)
File "/Users/devops/anaconda/lib/python3.6/tarfile.py", line 1616, in taropen
return cls(name, mode, fileobj, **kwargs)
File "/Users/devops/anaconda/lib/python3.6/tarfile.py", line 1479, in __init__
self.firstmember = self.next()
File "/Users/devops/anaconda/lib/python3.6/tarfile.py", line 2294, in next
tarinfo = self.tarinfo.fromtarfile(self)
File "/Users/devops/anaconda/lib/python3.6/tarfile.py", line 1089, in fromtarfile
buf = tarfile.fileobj.read(BLOCKSIZE)
File "/Users/devops/anaconda/lib/python3.6/gzip.py", line 276, in read
return self._buffer.read(size)
File "/Users/devops/anaconda/lib/python3.6/_compression.py", line 68, in readinto
data = self.read(len(byte_view))
File "/Users/devops/anaconda/lib/python3.6/gzip.py", line 463, in read
if not self._read_gzip_header():
File "/Users/devops/anaconda/lib/python3.6/gzip.py", line 411, in _read_gzip_header
raise OSError('Not a gzipped file (%r)' % magic)
OSError: Not a gzipped file (b'ca')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/devops/anaconda/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Users/devops/anaconda/lib/python3.6/site-packages/pip/commands/install.py", line 335, in run
wb.build(autobuilding=True)
File "/Users/devops/anaconda/lib/python3.6/site-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/Users/devops/anaconda/lib/python3.6/site-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/Users/devops/anaconda/lib/python3.6/site-packages/pip/req/req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "/Users/devops/anaconda/lib/python3.6/site-packages/pip/download.py", line 821, in unpack_url
hashes=hashes
File "/Users/devops/anaconda/lib/python3.6/site-packages/pip/download.py", line 663, in unpack_http_url
unpack_file(from_path, location, content_type, link)
File "/Users/devops/anaconda/lib/python3.6/site-packages/pip/utils/__init__.py", line 605, in unpack_file
untar_file(filename, location)
File "/Users/devops/anaconda/lib/python3.6/site-packages/pip/utils/__init__.py", line 538, in untar_file
tar = tarfile.open(filename, mode)
File "/Users/devops/anaconda/lib/python3.6/tarfile.py", line 1586, in open
return func(name, filemode, fileobj, **kwargs)
File "/Users/devops/anaconda/lib/python3.6/tarfile.py", line 1644, in gzopen
raise ReadError("not a gzip file")
tarfile.ReadError: not a gzip file