首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装罂粟0.3时KeyError 'pytest‘

安装罂粟0.3时KeyError 'pytest‘
EN

Stack Overflow用户
提问于 2014-08-01 23:14:58
回答 1查看 184关注 0票数 0

在使用pip安装罂粟0.3时,在需要的所有资源中,我得到了一些关于Astropy反推荐警告和pysynphot的警告,但我并不真正理解这些警告。在失败前的最后几行中,跟踪显示错误位于不稳定的setup_helpers文件中。下一行是KeyError 'pytest‘。有没有人经历过这个或对我的处境有任何洞察力?

这是命令提示符:

代码语言:javascript
复制
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\psteffanic>pip install poppy --upgrade
Downloading/unpacking poppy 
  Running setup.py (path:c:\users\psteff~1\appdata\local\temp\pip_build_psteffan
ic\poppy\setup.py) egg_info for package poppy
    WARNING: AstropyDeprecationWarning: ConfigurationItem has been deprecated in
 astropy 0.4. Use ConfigItem objects as members of ConfigNamespace subclasses in
stead.  See ConfigNamespace for an example. [astropy.config.configuration]
    C:\Python27\lib\site-packages\pysynphot\locations.py:14: UserWarning: PYSYN_
CDBS is undefined; functionality will be SEVERELY crippled.
      warnings.warn("PYSYN_CDBS is undefined; functionality will be SEVERELY "
    C:\Python27\lib\site-packages\pysynphot\locations.py:74: UserWarning: Extinc
tion files should be moved to $PYSYN_CDBS/extinction for compatibility with futu
re versions of pysynphot.
      warnings.warn('Extinction files should be moved to '
    C:\Python27\lib\site-packages\pysynphot\locations.py:110: UserWarning: Extin
ction files not found in grid\extinction
      warnings.warn('Extinction files not found in %s' % (extdir,))
    C:\Python27\lib\site-packages\pysynphot\locations.py:88: UserWarning: PYSYN_
CDBS is undefined; cannot find mtab\*_tmg.fits file
      warnings.warn("PYSYN_CDBS is undefined; cannot find %s file" % template)
    C:\Python27\lib\site-packages\pysynphot\locations.py:88: UserWarning: PYSYN_
CDBS is undefined; cannot find mtab\*_tmc.fits file
      warnings.warn("PYSYN_CDBS is undefined; cannot find %s file" % template)
    C:\Python27\lib\site-packages\pysynphot\locations.py:88: UserWarning: PYSYN_
CDBS is undefined; cannot find mtab\*_tmt.fits file
      warnings.warn("PYSYN_CDBS is undefined; cannot find %s file" % template)
   WARNING: AstropyDeprecationWarning: astropy.setup_helpers.update_package_fil
es is deprecated.  Update your setup.py to use astropy.setup_helpers.get_package
_info instead. [astropy.setup_helpers]

Installing collected packages: poppy
  Running setup.py install for poppy
    generating default poppy.cfg file in poppy\poppy.cfg
    WARNING: AstropyDeprecationWarning: ConfigurationItem has been deprecated in
 astropy 0.4. Use ConfigItem objects as members of ConfigNamespace subclasses in
stead.  See ConfigNamespace for an example. [astropy.config.configuration]
    C:\Python27\lib\site-packages\pysynphot\locations.py:14: UserWarning: PYSYN_
CDBS is undefined; functionality will be SEVERELY crippled.
      warnings.warn("PYSYN_CDBS is undefined; functionality will be SEVERELY "
    C:\Python27\lib\site-packages\pysynphot\locations.py:74: UserWarning: Extinc
tion files should be moved to $PYSYN_CDBS/extinction for compatibility with futu
re versions of pysynphot.
      warnings.warn('Extinction files should be moved to '
    C:\Python27\lib\site-packages\pysynphot\locations.py:110: UserWarning: Extin
ction files not found in grid\extinction
      warnings.warn('Extinction files not found in %s' % (extdir,))
    C:\Python27\lib\site-packages\pysynphot\locations.py:88: UserWarning: PYSYN_
CDBS is undefined; cannot find mtab\*_tmg.fits file
       warnings.warn("PYSYN_CDBS is undefined; cannot find %s file" % template)
     C:\Python27\lib\site-packages\pysynphot\locations.py:88: UserWarning: PYSYN_
CDBS is undefined; cannot find mtab\*_tmc.fits file
      warnings.warn("PYSYN_CDBS is undefined; cannot find %s file" % template)
    C:\Python27\lib\site-packages\pysynphot\locations.py:88: UserWarning: PYSYN_
CDBS     is undefined; cannot find mtab\*_tmt.fits file
      warnings.warn("PYSYN_CDBS is undefined; cannot find %s file" % template)
    WARNING: AstropyDeprecationWarning: astropy.setup_helpers.update_package_fil
es is deprecated.  Update your setup.py to use astropy.setup_helpers.get_package
_info instead. [astropy.setup_helpers]
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\psteff~1\appdata\local\temp\pip_build_psteffanic\poppy\setu
p.py", line 144, in <module>
        use_2to3=False
      File "C:\Python27\lib\distutils\core.py", line 151, in setup
        dist.run_commands()
      File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
        cmd_obj.run()
      File "C:\Python27\lib\site-packages\distribute-0.6.32-py2.7.egg\setuptools
\command\install.py", line 53, in run
        return _install.run(self)
       File "C:\Python27\lib\distutils\command\install.py", line 563, in run
        self.run_command('build')
      File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
        cmd_obj.run()
      File "C:\Python27\lib\distutils\command\build.py", line 127, in run
        self.run_command(cmd_name)
      File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
        cmd_obj.run()
       File "C:\Python27\lib\site-packages\astropy-0.4-py2.7-win32.egg\astropy\se
tup_helpers.py", line 623, in run
        for k, (fnsrc, v) in six.iteritems(self.distribution.command_options['py
test']):
    KeyError: 'pytest'
   Record file c:\users\psteff~1\appdata\local\temp\pip-lze5cj-record\install-rec
 ord.txt not found
Successfully installed poppy 
Cleaning up...

C:\Users\psteffanic>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-08-04 14:03:47

这看起来像是两件事的结合:

( 1)在罂粟正在使用的Astropy构建代码中,它看起来可能是一个小错误。

( 2)看来罂粟还没有完全兼容Astropy的最新版本(v0.4),因此在此期间,您可以尝试降级到Astropy v0.3.2,如果没有其他的话。

同时,您应该就这样的问题与软件包的作者联系。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25090023

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档