我试着安装scikit-学习Python 3。我这样做的方式如下:
virtualenv model_env
source model_env/bin/activate
pip3 install sklearn因此,我得到以下错误消息:
Downloading/unpacking sklearn
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement sklearn
Cleaning up...
No distributions at all found for sklearn我在pandas包中遇到了同样的问题,我使用以下命令解决了这个问题:
sudo apt-get install python3-pandas不幸的是,同样的方法不适用于sklearn
sudo apt-get install python3-sklearn添加了
当我用sklearn替换scikit-learn时,我也遇到了同样的问题:
Downloading/unpacking scikit-learn
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement scikit-learn
Cleaning up...
No distributions at all found for scikit-learn添加2
正如建议的那样,我尝试将pip与-vvv结合使用。请注意,我使用的是pip3而不是pip。这就是我得到的结果:
Downloading/unpacking scikit-learn
Getting page https://pypi.python.org/simple/scikit-learn/
Could not fetch URL https://pypi.python.org/simple/scikit-learn/: connection error: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/scikit-learn/ (Caused by <class 'OSError'>: [Errno 101] Network is unreachable)
Will skip URL https://pypi.python.org/simple/scikit-learn/ when looking for download links for scikit-learn
Getting page https://pypi.python.org/simple/
Could not fetch URL https://pypi.python.org/simple/: connection error: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/ (Caused by <class 'OSError'>: [Errno 101] Network is unreachable)
Will skip URL https://pypi.python.org/simple/ when looking for download links for scikit-learn
Cannot fetch index base URL https://pypi.python.org/simple/
URLs to search for versions for scikit-learn:
* https://pypi.python.org/simple/scikit-learn/
Getting page https://pypi.python.org/simple/scikit-learn/
Could not fetch URL https://pypi.python.org/simple/scikit-learn/: connection error: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/scikit-learn/ (Caused by <class 'OSError'>: [Errno 101] Network is unreachable)
Will skip URL https://pypi.python.org/simple/scikit-learn/ when looking for download links for scikit-learn
Could not find any downloads that satisfy the requirement scikit-learn
Cleaning up...
Removing temporary dir /tmp/pip_build_root...
No distributions at all found for scikit-learn
Exception information:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python3/dist-packages/pip/req.py", line 1178, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "/usr/lib/python3/dist-packages/pip/index.py", line 277, in find_requirement
raise DistributionNotFound('No distributions at all found for %s' % req)
pip.exceptions.DistributionNotFound: No distributions at all found for scikit-learn
Storing debug log for failure in /home/rngorb/.pip/pip.log发布于 2016-08-04 14:29:41
试着使用
pip3 install scikit-learn发布于 2017-08-03 23:01:46
首先更新您的pip:
pip3 install --upgrade pip然后安装scikit-学习arg“--用户”。不要和pip一起使用sudo,因为它会产生问题:
pip install --user scikit-learn发布于 2016-08-04 14:46:25
也许您应该考虑使用蟒蛇 (默认情况下包括两个包),并使用管理环境和套餐的工具简化您的生活。
https://stackoverflow.com/questions/38770169
复制相似问题