X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 78.192.65.63 Path: csiph.com!usenet.pasdenom.info!nntpfeed.proxad.net!news.muarf.org!news.roellig-ltd.de!open-news-network.org!border2.nntp.ams1.giganews.com!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '16,': 0.03; 'from:addr:yahoo.co.uk': 0.04; 'warnings': 0.04; 'repository': 0.05; 'subject:file': 0.07; '__init__': 0.09; 'args)': 0.09; 'deprecated': 0.09; 'host,': 0.09; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'bug': 0.12; 'language.': 0.14; '(just': 0.16; '345,': 0.16; 'exception:': 0.16; 'handling,': 0.16; 'how,': 0.16; 'https': 0.16; 'itself,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'silence': 0.16; 'sat,': 0.16; 'all.': 0.16; 'language': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'skip:f 30': 0.19; 'slightly': 0.19; '>>>': 0.22; 'putting': 0.22; 'install': 0.23; 'header:User-Agent:1': 0.23; 'certainly': 0.24; 'specify': 0.24; "i've": 0.25; 'skip:" 40': 0.26; 'downloaded': 0.26; 'url:edu': 0.26; 'skip:" 20': 0.27; 'skip:_ 20': 0.27; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'installed': 0.27; 'chris': 0.29; 'am,': 0.29; 'raise': 0.29; 'locations': 0.30; 'specified': 0.30; "i'm": 0.30; "skip:' 10": 0.31; 'location,': 0.31; 'origin': 0.31; 'file': 0.32; 'this.': 0.32; 'skip:c 30': 0.32; 'option': 0.32; 'run': 0.32; '(most': 0.33; 'not.': 0.33; 'packaging': 0.33; 'trouble': 0.34; 'skip:_ 10': 0.34; 'skip:u 20': 0.35; 'tool': 0.35; 'but': 0.35; 'located': 0.36; 'collecting': 0.36; 'combination': 0.36; 'skip:" 50': 0.36; "didn't": 0.36; 'subject:?': 0.36; 'wrong': 0.37; 'too': 0.37; 'two': 0.37; 'sometimes': 0.38; 'to:addr:python- list': 0.38; 'skip:- 10': 0.38; 'rather': 0.38; 'little': 0.38; 'recent': 0.39; 'hosted': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'skip:u 10': 0.60; 'around.': 0.60; 'authority': 0.60; 'skip:z 20': 0.60; 'simply': 0.61; 'simple': 0.61; 'such': 0.63; 'skip:n 10': 0.64; 'our': 0.64; 'telling': 0.64; 'zip': 0.64; 'more': 0.64; 'charset:windows-1252': 0.65; 'here': 0.66; 'lose': 0.68; 'url:18': 0.68; 'skip:r 30': 0.69; 'secure': 0.71; '100%': 0.77; '2015': 0.84; 'actually,': 0.84; 'ethan': 0.84; 'furman': 0.84; 'pocket': 0.84; 'received:as9105.com': 0.84; 'received:dsl.as9105.com': 0.84; 'received:dynamic.dsl.as9105.com': 0.84; 'steps.': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: pip grabs tar.gz file instead of whl? Date: Fri, 15 May 2015 22:00:38 +0100 References: <55563EBA.8080606@stoneleaf.us> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 80-44-148-0.dynamic.dsl.as9105.com User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 96 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1431723662 news.xs4all.nl 2858 [2001:888:2000:d::a6]:36919 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:90691 On 15/05/2015 19:55, Chris Angelico wrote: > On Sat, May 16, 2015 at 4:45 AM, Ethan Furman wrote: >> On 05/15/2015 06:04 AM, Mark Lawrence wrote: >> >>> C:\Users\Mark\Documents\MyPython>pip install --no-cache-dir >>> --trusted-host http://www.lfd.uci.edu/ -U -f >>> http://www.lfd.uci.edu/~gohlke/pythonlibs/ numba >> >>> >>> >>> Collecting numba >>> This repository located at www.lfd.uci.edu is not a trusted host, if >>> this repository is available via HTTPS it is recommend to use HTTPS >>> instead, otherwise you may silence this warning with '--trusted-host >>> www.lfd.uci.edu'. >>> DEPRECATION: Implicitly allowing locations which are not hosted at a >>> secure origin is deprecated and will require the use of --trusted-host >>> in the future. >>> Downloading numba-0.18.2.tar.gz (507kB) >>> 100% |################################| 507kB 373kB/s >> >> >> I particularly like how, when you specify --trusted-host, you still get all >> the warnings to use --trusted-host... not. > > Actually, I suspect the note is telling you to use "--trusted-host > www.lfd.uci.edu" rather than "--trusted-host http://www.lfd.uci.edu/" > - so it's as if the option wasn't specified at all. But pip can be a > little hard to understand sometimes (just ask Prince Edward, who had > no end of trouble understanding the poor chipmonk!), so I may very > well be wrong here. > > ChrisA > I'm putting this here FTR as I'm too knackered to follow up right now. After a bit more digging I ended up with this. C:\Users\Mark\Documents\MyPython>pip install --trusted-host www.lfd.uci.edu/ -U http://www.lfd.uci.edu/~gohlke/pythonlibs/numba-0.18.2-cp34-none-win_amd64.whl Collecting numba==0.18.2 from http://www.lfd.uci.edu/~gohlke/pythonlibs/numba-0.18.2-cp34-none-win_amd64.whl Downloading http://www.lfd.uci.edu/~gohlke/pythonlibs/numba-0.18.2-cp34-none-win_amd64.whl Exception: Traceback (most recent call last): File "C:\Python34\lib\site-packages\pip\basecommand.py", line 246, in main status = self.run(options, args) File "C:\Python34\lib\site-packages\pip\commands\install.py", line 342, in run requirement_set.prepare_files(finder) File "C:\Python34\lib\site-packages\pip\req\req_set.py", line 345, in prepare_files functools.partial(self._prepare_file, finder)) File "C:\Python34\lib\site-packages\pip\req\req_set.py", line 290, in _walk_req_to_install more_reqs = handler(req_to_install) File "C:\Python34\lib\site-packages\pip\req\req_set.py", line 487, in _prepare_file download_dir, do_download, session=self.session, File "C:\Python34\lib\site-packages\pip\download.py", line 827, in unpack_url session, File "C:\Python34\lib\site-packages\pip\download.py", line 677, in unpack_http_url unpack_file(from_path, location, content_type, link) File "C:\Python34\lib\site-packages\pip\utils\__init__.py", line 630, in unpack_file flatten=not filename.endswith('.whl') File "C:\Python34\lib\site-packages\pip\utils\__init__.py", line 509, in unzip_file zip = zipfile.ZipFile(zipfp, allowZip64=True) File "C:\Python34\lib\zipfile.py", line 937, in __init__ self._RealGetContents() File "C:\Python34\lib\zipfile.py", line 978, in _RealGetContents raise BadZipFile("File is not a zip file") zipfile.BadZipFile: File is not a zip file The same file installed perfectly when downloaded and installed in two steps. Whether this is simply a known bug with zipfile handling, pip itself, a combination of both or what I've no idea. I find it slightly irritating that a tool recommended by the Python Packaging Authority behaves in such a way, but then I didn't have to dip into my pocket to pay for it and certainly won't lose any sleep over it as there's such a simple work around. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence