python - Python中的pip安装包遇到错误
问题描述
我正在尝试在 Python 中安装一些软件包。例如,尝试安装quantmod
但被告知升级我pip
通过 Anaconda 提示符执行的操作,但是当我再次尝试安装quantmod
时,我收到相同的错误消息。我尝试安装的所有软件包都会发生这种情况......
我正在运行pip install quantmod
并升级pip
它python -m pip install --upgrade pip
(base) C:\Users\USER\AppData\Local\Programs\Python\Python36-32>pip install quantmod
Collecting quantmod
Could not find a version that satisfies the requirement quantmod (from versions: )
No matching distribution found for quantmod
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
(base) C:\Users\USER\AppData\Local\Programs\Python\Python36-32>python -m pip install --upgrade pip
Requirement already up-to-date: pip in c:\users\USER\appdata\local\programs\python\python36-32\lib\site-packages (10.0.1)
(base) C:\Users\USER\AppData\Local\Programs\Python\Python36-32>pip install quantmod
Collecting quantmod
Could not find a version that satisfies the requirement quantmod (from versions: )
No matching distribution found for quantmod
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
编辑 1 pip install --upgrade pip
:
Exception:
Traceback (most recent call last):
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\commands\install.py", line 335, in run
wb.build(autobuilding=True)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\req\req_set.py", line 487, in _prepare_file
req_to_install, finder)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\req\req_set.py", line 428, in _check_skip_installed
req_to_install, upgrade_allowed)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\index.py", line 568, in _get_pages
page = self._get_page(location)
File "C:\Users\USERR\Anaconda3\lib\site-packages\pip\index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\index.py", line 811, in get_page
inst = cls(resp.content, resp.url, resp.headers)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\index.py", line 731, in __init__
namespaceHTMLElements=False,
TypeError: parse() got an unexpected keyword argument 'transport_encoding'
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
(base) C:\Users\USER\AppData\Local\Programs\Python\Python36-32>
编辑:
(base) C:\Users\USER\AppData\Local\Programs\Python\Python36-32>pip install Gensim
Collecting Gensim
Exception:
Traceback (most recent call last):
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\commands\install.py", line 335, in run
wb.build(autobuilding=True)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\req\req_set.py", line 554, in _prepare_file
require_hashes
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\req\req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\index.py", line 568, in _get_pages
page = self._get_page(location)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\index.py", line 811, in get_page
inst = cls(resp.content, resp.url, resp.headers)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\index.py", line 731, in __init__
namespaceHTMLElements=False,
TypeError: parse() got an unexpected keyword argument 'transport_encoding'
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
解决方案
推荐阅读
- java - 没有这样的方法错误:
- javascript - 打开之前检查 window.open() 的内容?
- uitableview - 如何对从 tableview 单元格中的 coredata 调用的 2 个属性进行排序(swfit4)
- python - 使用 Django 处理类似许可证的系统
- sql-server - 分区查询返回重复结果
- java - 使用 JNA 获取本地机器证书
- javascript - 使用带有 jQuery UI 的效果时,早期的 DOM 元素不会隐藏
- angular - 在属性上使用输入和输出装饰器时获取事件对象
- javascript - Jasmine 单元测试:错误:找不到模块“parser.js”
- node.js - Chrome 在终端中打开或由 webriver 运行时不呈现字体