
当我使用pip来安装一些软件包时,我总是得到相同的exception:
PS C:Users84682Desktop> pip install django -v Config variable 'Py_DEBUG' is unset,Python ABI tag may be incorrect Config variable 'WITH_PYMALLOC' is unset,Python ABI tag may be incorrect Collecting django 1 location(s) to search for versions of django: * https://pypi.python.org/simple/django/ Getting page https://pypi.python.org/simple/django/ Looking up "https://pypi.python.org/simple/django/" in the cache No cache entry available Starting new httpS connection (1): pypi.python.org Cleaning up... Exception: Traceback (most recent call last): file "d:pythonpython3.5libsite-packagespipbasecommand.py",line 215,in main status = self.run(options,args) file "d:pythonpython3.5libsite-packagespipcommandsinstall.py",line 324,in run requirement_set.prepare_files(finder) file "d:pythonpython3.5libsite-packagespipreqreq_set.py",line 380,in prepare_files ignore_dependencIEs=self.ignore_dependencIEs)) file "d:pythonpython3.5libsite-packagespipreqreq_set.py",line 554,in _prepare_file require_hashes file "d:pythonpython3.5libsite-packagespipreqreq_install.py",line 278,in populate_link self.link = finder.find_requirement(self,upgrade) file "d:pythonpython3.5libsite-packagespipindex.py",line 465,in find_requirement all_candIDates = self.find_all_candIDates(req.name) file "d:pythonpython3.5libsite-packagespipindex.py",line 423,in find_all_candIDates for page in self._get_pages(url_locations,project_name): file "d:pythonpython3.5libsite-packagespipindex.py",line 568,in _get_pages page = self._get_page(location) file "d:pythonpython3.5libsite-packagespipindex.py",line 683,in _get_page return HTMLPage.get_page(link,session=self.session) file "d:pythonpython3.5libsite-packagespipindex.py",line 792,in get_page "Cache-Control": "max-age=600",file "d:pythonpython3.5libsite-packagespip_vendorrequestssessions.py",line 488,in get return self.request('GET',url,**kwargs) file "d:pythonpython3.5libsite-packagespipdownload.py",line 386,in request return super(PipSession,self).request(method,*args,**kwargs) file "d:pythonpython3.5libsite-packagespip_vendorrequestssessions.py",line 475,in request resp = self.send(prep,**send_kwargs) file "d:pythonpython3.5libsite-packagespip_vendorrequestssessions.py",line 596,in send r = adapter.send(request,**kwargs) file "d:pythonpython3.5libsite-packagespip_vendorcachecontroladapter.py",line 47,in send resp = super(CacheControlAdapter,self).send(request,**kw) file "d:pythonpython3.5libsite-packagespip_vendorrequestsadapters.py",in send timeout=timeout file "d:pythonpython3.5libsite-packagespip_vendorrequestspackagesurllib3connectionpool.py",line 589,in urlopen self._prepare_proxy(conn) file "d:pythonpython3.5libsite-packagespip_vendorrequestspackagesurllib3connectionpool.py",line 797,in _prepare_proxy conn.connect() file "d:pythonpython3.5libsite-packagespip_vendorrequestspackagesurllib3connection.py",line 254,in connect conn = self._new_conn() file "d:pythonpython3.5libsite-packagespip_vendorrequestspackagesurllib3connection.py",line 142,in _new_conn (self.host,self.port),self.timeout,**extra_kw) file "d:pythonpython3.5libsite-packagespip_vendorrequestspackagesurllib3utilconnection.py",line 66,in create_connection if host.startswith('['): AttributeError: 'nonetype' object has no attribute 'startswith' Looking up "https://pypi.python.org/pypi/pip/Json" in the cache No cache entry available Starting new httpS connection (1): pypi.python.org There was an error checking the latest version of pip Traceback (most recent call last): file "d:pythonpython3.5libsite-packagespiputilsoutdated.py",line 126,in pip_version_check headers={"Accept": "application/Json"},in create_connection if host.startswith('['): AttributeError: 'nonetype' object has no attribute 'startswith'
我发现类似的问题是python无法在win10中使用 , AttributeError:'nonetype'对象没有属性'startswith',并且无法在python3.6中安装pip 。 但他们没有答案。
我在网上search了很长时间。 但没用。 我不知道。 请帮助或尝试提供一些想法如何实现这一点。
点子:了解缺less的图书馆转储
pip安装UnicodeDecodeError
无法使用pip安装Scipy
“pip install jq”在Mac和windows上生成错误
使用setup.py安装.desktop文件
试图升级点,但错误“WinError 5”出现
为什么在Kubuntu 12.04中安装numpy需要python-dev
在Fedora 22上安装Python的TripleSec库
打包升级后,Pip在Ubuntu 14.4上坏了
PIP版本virtualenv不匹配,不会升级
对于可能关注的人,有这个重复的帖子,在那里OP发现了解决这个问题的解决方案: 解决重复
看起来,您的Python路径“d:”可能与使用pip install的错误有关。 尝试在“C:”上安装python。
总结以上是内存溢出为你收集整理的pipexception:AttributeError:'NoneType'对象没有属性'startswith'全部内容,希望文章能够帮你解决pipexception:AttributeError:'NoneType'对象没有属性'startswith'所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)