我最近刚刚安装了运行 pip(9.0.1) 的 python(3.6.1),每当我尝试安装包时,我都会收到以下错误:
pip install cx_Oracle
Collecting cx_Oracle
Could not fetch URL https://pypi.python.org/simple/cx-oracle/: There was a pro
blem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificat
e verify failed (_ssl.c:749) - skipping
Could not find a version that satisfies the requirement cx_Oracle (from versio
ns: )
No matching distribution found for cx_Oracle
由于证书有问题,我尝试这样做:
pip install --trusted-host pypi.python.org pytest-xdist
Collecting pytest-xdist
Downloading pytest-xdist-1.15.0.tar.gz (87kB)
100% |████████████████████████████████| 92kB 1.8MB/s
Complete output from command python setup.py egg_info:
Download error on https://pypi.python.org/simple/setuptools_scm/: [SSL: CERT
IFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages m
ay not be found!
Download error on https://pypi.python.org/simple/setuptools-scm/: [SSL: CERT
IFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages m
ay not be found!
Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_
FAILED] certificate verify failed (_ssl.c:749) -- Some packages may not be found
!
No local packages or working download links found for setuptools_scm
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\ALEX~1.CAU\AppData\Local\Temp\pip-build-7vo4jump\pytest-xdi
st\setup.py", line 37, in <module>
'Programming Language :: Python :: 3',
File "c:\users\alex.cauthen\appdata\local\programs\python\python36\lib\dis
tutils\core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "c:\users\alex.cauthen\appdata\local\programs\python\python36\lib\sit
e-packages\setuptools\dist.py", line 315, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "c:\users\alex.cauthen\appdata\local\programs\python\python36\lib\sit
e-packages\setuptools\dist.py", line 361, in fetch_build_eggs
replace_conflicting=True,
File "c:\users\alex.cauthen\appdata\local\programs\python\python36\lib\sit
e-packages\pkg_resources\__init__.py", line 850, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "c:\users\alex.cauthen\appdata\local\programs\python\python36\lib\sit
e-packages\pkg_resources\__init__.py", line 1122, in best_match
return self.obtain(req, installer)
File "c:\users\alex.cauthen\appdata\local\programs\python\python36\lib\sit
e-packages\pkg_resources\__init__.py", line 1134, in obtain
return installer(requirement)
File "c:\users\alex.cauthen\appdata\local\programs\python\python36\lib\sit
e-packages\setuptools\dist.py", line 429, in fetch_build_egg
return cmd.easy_install(req)
File "c:\users\alex.cauthen\appdata\local\programs\python\python36\lib\sit
e-packages\setuptools\command\easy_install.py", line 659, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Re
quirement.parse('setuptools_scm')
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\ALEX~1.C
AU\AppData\Local\Temp\pip-build-7vo4jump\pytest-xdist\
收到 egg_info 错误后,我尝试了以下操作:
easy_install -U setuptools
Searching for setuptools
Reading https://pypi.python.org/simple/setuptools/
Download error on https://pypi.python.org/simple/setuptools/: [SSL: CERTIFICATE_
VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages may not b
e found!
Couldn't retrieve index page for 'setuptools'
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAIL
ED] certificate verify failed (_ssl.c:749) -- Some packages may not be found!
Best match: setuptools 28.8.0
Adding setuptools 28.8.0 to easy-install.pth file
Installing easy_install-script.py script to c:\users\alex.cauthen\appdata\local\
programs\python\python36\Scripts
Installing easy_install.exe script to c:\users\alex.cauthen\appdata\local\progra
ms\python\python36\Scripts
error: [WinError 5] Access is denied: 'c:\\users\\alex.cauthen\\appdata\\local\\
programs\\python\\python36\\Scripts\\easy_install.exe'
许多类似 stackoverflow 问题的答案都建议更改代理设置。我没有在代理后面工作,但我在 VPN 后面工作。我在安装软件包时遇到了与 NodeJS/react/npm 非常相似的问题,所有建议都是更改代理设置。我最终通过删除存储代理设置的文件解决了这个问题。
我找不到一个为 python/pip 提供相同功能的文件,想知道是否有人知道它在 Windows 7 上的位置?我也很想听听有关如何解决这个非常令人沮丧的问题的其他建议!!
亚历克斯
最佳答案
我的解决方案是先执行 pip install --trusted-host pypi.python.org setuptools_scm 然后再安装 pytest-xdist。
--trusted-host pypi.python.org 选项适用于我的所有要求,但 pytest-xdist 除外,正如您举的例子。提示是这个特定的包提示
Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
不是您所问问题的完整答案,但您的输出与我刚刚处理的类似,所以这些是我的笔记。
关于windows - Pip:无法获取 pypi 的 URL 并发出确认 ssl 证书的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42979298/
我需要在客户计算机上运行Ruby应用程序。通常需要几天才能完成(复制大备份文件)。问题是如果启用sleep,它会中断应用程序。否则,计算机将持续运行数周,直到我下次访问为止。有什么方法可以防止执行期间休眠并让Windows在执行后休眠吗?欢迎任何疯狂的想法;-) 最佳答案 Here建议使用SetThreadExecutionStateWinAPI函数,使应用程序能够通知系统它正在使用中,从而防止系统在应用程序运行时进入休眠状态或关闭显示。像这样的东西:require'Win32API'ES_AWAYMODE_REQUIRED=0x0
我在从html页面生成PDF时遇到问题。我正在使用PDFkit。在安装它的过程中,我注意到我需要wkhtmltopdf。所以我也安装了它。我做了PDFkit的文档所说的一切......现在我在尝试加载PDF时遇到了这个错误。这里是错误:commandfailed:"/usr/local/bin/wkhtmltopdf""--margin-right""0.75in""--page-size""Letter""--margin-top""0.75in""--margin-bottom""0.75in""--encoding""UTF-8""--margin-left""0.75in""-
我对最新版本的Rails有疑问。我创建了一个新应用程序(railsnewMyProject),但我没有脚本/生成,只有脚本/rails,当我输入ruby./script/railsgeneratepluginmy_plugin"Couldnotfindgeneratorplugin.".你知道如何生成插件模板吗?没有这个命令可以创建插件吗?PS:我正在使用Rails3.2.1和ruby1.8.7[universal-darwin11.0] 最佳答案 随着Rails3.2.0的发布,插件生成器已经被移除。查看变更日志here.现在
我尝试运行2.x应用程序。我使用rvm并为此应用程序设置其他版本的ruby:$rvmuseree-1.8.7-head我尝试运行服务器,然后出现很多错误:$script/serverNOTE:Gem.source_indexisdeprecated,useSpecification.Itwillberemovedonorafter2011-11-01.Gem.source_indexcalledfrom/Users/serg/rails_projects_terminal/work_proj/spohelp/config/../vendor/rails/railties/lib/r
我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e
从给定URL下载文件并立即将其上传到AmazonS3的更直接的方法是什么(+将有关文件的一些信息保存到数据库中,例如名称、大小等)?现在,我既不使用Paperclip,也不使用Carrierwave。谢谢 最佳答案 简单明了:require'open-uri'require's3'amazon=S3::Service.new(access_key_id:'KEY',secret_access_key:'KEY')bucket=amazon.buckets.find('image_storage')url='http://www.ex
我正在编写一个小脚本来定位aws存储桶中的特定文件,并创建一个临时验证的url以发送给同事。(理想情况下,这将创建类似于在控制台上右键单击存储桶中的文件并复制链接地址的结果)。我研究过回形针,它似乎不符合这个标准,但我可能只是不知道它的全部功能。我尝试了以下方法:defauthenticated_url(file_name,bucket)AWS::S3::S3Object.url_for(file_name,bucket,:secure=>true,:expires=>20*60)end产生这种类型的结果:...-1.amazonaws.com/file_path/file.zip.A
我花了三天的时间用头撞墙,试图弄清楚为什么简单的“rake”不能通过我的规范文件。如果您遇到这种情况:任何文件夹路径中都不要有空格!。严重地。事实上,从现在开始,您命名的任何内容都没有空格。这是我的控制台输出:(在/Users/*****/Desktop/LearningRuby/learn_ruby)$rake/Users/*******/Desktop/LearningRuby/learn_ruby/00_hello/hello_spec.rb:116:in`require':cannotloadsuchfile--hello(LoadError) 最佳
我在pry中定义了一个函数:to_s,但我无法调用它。这个方法去哪里了,怎么调用?pry(main)>defto_spry(main)*'hello'pry(main)*endpry(main)>to_s=>"main"我的ruby版本是2.1.2看了一些答案和搜索后,我认为我得到了正确的答案:这个方法用在什么地方?在irb或pry中定义方法时,会转到Object.instance_methods[1]pry(main)>defto_s[1]pry(main)*'hello'[1]pry(main)*end=>:to_s[2]pry(main)>defhello[2]pry(main)
我使用的是Firefox版本36.0.1和Selenium-Webdrivergem版本2.45.0。我能够创建Firefox实例,但无法使用脚本继续进行进一步的操作无法在60秒内获得稳定的Firefox连接(127.0.0.1:7055)错误。有人能帮帮我吗? 最佳答案 我遇到了同样的问题。降级到firefoxv33后一切正常。您可以找到旧版本here 关于ruby-无法在60秒内获得稳定的Firefox连接(127.0.0.1:7055),我们在StackOverflow上找到一个类