2016-05-10 8 views
2

私はPython 2.7とPython 3.4がインストールされたマシンを持っています。通常、Python 3.4でパッケージをインストールするには、pip3 install [PACKAGE]を実行します。Python Cant Python Cantを実行または再インストールする

しかし、私はpip3を実行すると、今私は

Traceback (most recent call last): 
    File "/volume1/@appstore/python3/bin/pip3", line 7, in <module> 
    from pip import main 
    File "/usr/local/python3/lib/python3.4/site-packages/pip/__init__.py", line 16, in <module> 
    from pip.vcs import git, mercurial, subversion, bazaar # noqa 
    File "/usr/local/python3/lib/python3.4/site-packages/pip/vcs/subversion.py", line 9, in <module> 
    from pip.index import Link 
    File "/usr/local/python3/lib/python3.4/site-packages/pip/index.py", line 30, in <module> 
    from pip.wheel import Wheel, wheel_ext 
    File "/usr/local/python3/lib/python3.4/site-packages/pip/wheel.py", line 32, in <module> 
    from pip import pep425tags 
    File "/usr/local/python3/lib/python3.4/site-packages/pip/pep425tags.py", line 335, in <module> 
    supported_tags = get_supported() 
    File "/usr/local/python3/lib/python3.4/site-packages/pip/pep425tags.py", line 307, in get_supported 
    elif is_manylinux1_compatible(): 
    File "/usr/local/python3/lib/python3.4/site-packages/pip/pep425tags.py", line 163, in is_manylinux1_compatible 
    return have_compatible_glibc(2, 5) 
    File "/usr/local/python3/lib/python3.4/site-packages/pip/pep425tags.py", line 187, in have_compatible_glibc 
    version = [int(piece) for piece in version_str.split(".")] 
    File "/usr/local/python3/lib/python3.4/site-packages/pip/pep425tags.py", line 187, in <listcomp> 
    version = [int(piece) for piece in version_str.split(".")] 
ValueError: invalid literal for int() with base 10: '20-2014' 

を取得し、私はget-pip.pyをダウンロードしてpython3 get-pip.pyを実行した場合でも、私は同じエラーを取得します。

何が問題なのですか?

編集:明らかに、これはDSM 6.0をインストールしたときにSynologyのインストールで永続的に発生する問題です。

+0

# Parse string and check against requested version. version = [int(piece) for piece in version_str.split(".")] if len(version) < 2: warnings.warn("Expected glibc version with 2 components major.minor," " got: %s" % version_str, RuntimeWarning) return False return version[0] == major and version[1] >= minimum_minor 

を交換... –

+0

何ピップのバージョンは使用していますか? –

+0

'pip --python = python3 install -U pip'を実行するとどうなりますか? –

答えて

0

見つかった解決策は、上記のコメントの@Tadhgです。

Hereは、pep425tags.pyに必要な変更へのリンクです。

ここでは、このSOページにいるすべてのユーザーに必要な変更があります。

次の関数を追加:私はそれが比較的新しい `pep425tags.py`は欠陥があることを意味だと思う

# Separated out from have_compatible_glibc for easier unit testing 
def check_glibc_version(version_str, needed_major, needed_minor): 
    # Parse string and check against requested version. 
    # 
    # We use a regexp instead of str.split because we want to discard any 
    # random junk that might come after the minor version -- this might happen 
    # in patched/forked versions of glibc (e.g. Linaro's version of glibc 
    # uses version strings like "2.20-2014.11"). See gh-3588. 
    m = re.match(r"(?P<major>[0-9]+)\.(?P<minor>[0-9]+)", version_str) 
    if not m: 
     warnings.warn("Expected glibc version with 2 components major.minor," 
         " got: %s" % version_str, RuntimeWarning) 
     return False 
    return (int(m.group("major")) == needed_major and 
      int(m.group("minor")) >= needed_minor) 

をして​​

関連する問題