从git安装Python包病态 [英] Installing Python package pathos from git

查看:377
本文介绍了从git安装Python包病态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从git安装 pathos 库,但得到以下错误:

  > pip安装https://github.com/uqfoundation/pathos 

例外:
Traceback(最近一次调用最后一次):
文件C:\Python27\ lib \site-packages\pip\basecommand.py,第122行,在主
status = self.run(options,args)
文件C:\Python27\lib\\ \\ site-packages \pip\commands\install.py,第278行,运行

requirement_set.prepare_files(finder,force_root_egg_info = self.bundle,bundl
e = self。捆绑)
文件C:\Python27\lib\site-packages\pip\req.py,行1197,在prepare_files
do_download,
文件C: \Python27\lib\site-packages\pip\req.py,第1375行,在unpack_url
self.session,
文件C:\Python27\lib\ site-packages \pip\download.py,第582行,在unpack_http
_url
unpack_file(temp_location,location,content_type,link)
在unpack_file
和is_svn_page中的文件C:\Python27\lib\site-packages\pip\util.py,第627行(file_contents(filename))):
文件C:\Python27\lib\site-packages\pip\util.py,第210行,在file_contents中
返回fp.read ().decode('utf-8')
文件C:\Python27\lib\encodings\utf_8.py,第16行解码
返回codecs.utf_8_decode(input ,错误,真)
UnicodeDecodeError:'utf8'编解码器无法解码位置1中的字节0x8b:无效起始字节

这里有什么问题,我该如何解决它?
谢谢

编辑1:

试过以下内容:

pip install git + https://github.com/uqfoundation/pathos



...但仍然没有运气:

 > pip install git + https://github.com/uqfoundation/pathos 
下载/解压缩git + https://github.com/uqfoundation/pathos
克隆https:// github。 com / uqfoundation / pathos到c:\users\gronin\appdata\local\temp\pip-qstvgd-build
清理...
找不到命令'git'

编辑2:

试过以下内容,由 cel 推荐:



pip安装git + https://github.com/uqfoundation/pathos



...那肯定解决了查找问题(谢谢, cel),仍然有安装n问题:

 下载/解压缩git + https://github.com/uqfoundation/pathos 
克隆https: //github.com/uqfoundation/pathos到c:\users\gronin\appdata\loca
l\temp\pip -jldriz-build
运行setup.py(路径:c :\ users \gronin\appdata\local\temp\pip -jldriz-build\set
up.py)egg_info for git + https://github.com/uqfoundation/ pathos

下载/解压缩pp> = 1.6.4.4(来自pathos == 0.2a1.dev)
找不到满足要求的任何下载pp> = 1.6.4.4 == 0.2a1.dev)


解决方案

逾期病态发布,我需要推出(本月)。我会看看我能做些什么来使它 pip 可安装。有两个主要问题:(1)发布版本的包以非标准方式命名(例如 0.2.a1-dev ),以及(2)几个依赖关系从其他包中分离出来,并且仅在 http://dev.danse.us/packages 上可用。 (1)的临时解决方法是使用 - pre 标志为 pip 进行安装,并使用 git + https ,或者手动安装它们( easy_install 实际工作)。 (2)的解决方法也是@cel建议...下载依赖关系并手动安装(或使用 easy_install )。



这将在稳定版本中进行整理。这基本上是阻止版本发布的主要原因 - 主要由于上面的(2)。



在这里跟踪这个问题的状态: https://github.com/uqfoundation/pathos/issues/2


I am trying to install pathos library from git, but getting the following error:

>pip install https://github.com/uqfoundation/pathos

Exception:
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\pip\basecommand.py", line 122, in main
    status = self.run(options, args)
  File "C:\Python27\lib\site-packages\pip\commands\install.py", line 278, in run

    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundl
e=self.bundle)
  File "C:\Python27\lib\site-packages\pip\req.py", line 1197, in prepare_files
    do_download,
  File "C:\Python27\lib\site-packages\pip\req.py", line 1375, in unpack_url
    self.session,
  File "C:\Python27\lib\site-packages\pip\download.py", line 582, in unpack_http
_url
    unpack_file(temp_location, location, content_type, link)
  File "C:\Python27\lib\site-packages\pip\util.py", line 627, in unpack_file
    and is_svn_page(file_contents(filename))):
  File "C:\Python27\lib\site-packages\pip\util.py", line 210, in file_contents
    return fp.read().decode('utf-8')
  File "C:\Python27\lib\encodings\utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x8b in position 1: invalid start byte

What is the problem here and how can I get around it? Thanks

EDIT 1:

Tried the following:

pip install git+https://github.com/uqfoundation/pathos

...but still no luck:

>pip install git+https://github.com/uqfoundation/pathos
Downloading/unpacking git+https://github.com/uqfoundation/pathos
  Cloning https://github.com/uqfoundation/pathos to c:\users\gronin\appdata\local\temp\pip-qstvgd-build
Cleaning up...
Cannot find command 'git'

EDIT 2:

Tried the following, recommended by cel:

pip install git+https://github.com/uqfoundation/pathos

...that definitely solved lookup problems (thanks, cel), still having installation issues:

Downloading/unpacking git+https://github.com/uqfoundation/pathos
Cloning https://github.com/uqfoundation/pathos to c:\users\gronin\appdata\loca
l\temp\pip-jldriz-build
Running setup.py (path:c:\users\gronin\appdata\local\temp\pip-jldriz-build\set
up.py) egg_info for package from git+https://github.com/uqfoundation/pathos

Downloading/unpacking pp>=1.6.4.4 (from pathos==0.2a1.dev)
Could not find any downloads that satisfy the requirement pp>=1.6.4.4 (from pathos==0.2a1.dev)

解决方案

I have a long overdue pathos release that I need to push out (this month). I'll see what I can do to make it pip installable. There are two main issues: (1) the released versions of the packages are named in a non-standard way (e.g. 0.2.a1-dev), and (2) several dependencies are forked from other packages, and are only available on http://dev.danse.us/packages. The temporary workaround for (1) is either to install with the --pre flag for pip as well as using git+https, or to install them manually (easy_install actually works). The workaround for (2) is also as @cel has suggested… download the dependencies and install manually (or use easy_install).

This will be sorted out in the stable release. It's basically the blocker issue for getting the release out -- primarily due to (2) above.

Keep track of the status of this issue here: https://github.com/uqfoundation/pathos/issues/2

这篇关于从git安装Python包病态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆