【问题标题】:python-memcached installation failed using pip and conda in Python 3.6在 Python 3.6 中使用 pip 和 conda 安装 python-memcached 失败
【发布时间】:2018-03-01 10:08:06
【问题描述】:

python-memcached 库未能在 Python 3.6 中安装

命令: pip install python-memcached

追踪:

Collecting python-memcached
  Downloading python-memcached-1.58.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\JSR\AppData\Local\Temp\pip-build-j63q50jp\python-memcached\setup.py", line 8, in <module>
        version=get_module_constant('memcache', '__version__'),
      File "F:\installed\conda2_installed\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\depends.py", line 164, in get_module_constant
      File "F:\installed\conda2_installed\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\depends.py", line 195, in extract_constant
    IndexError: tuple index out of range

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\JSR\AppData\Local\Temp\pip-build-j63q50jp\python-memcached\

命令: conda install -c anaconda python-memcached

追踪:

Fetching package metadata .............
Solving package specifications: .

UnsatisfiableError: The following specifications were found to be in conflict:
  - python 3.6*
  - python-memcached -> python 2.7*
Use "conda info <package>" to see the dependencies for each package.

**信息依赖命令**: conda info python-memcached

输出:

python-memcached 1.57 py35_0
----------------------------
file name   : python-memcached-1.57-py35_0.tar.bz2
name        : python-memcached
version     : 1.57
build string: py35_0
build number: 0
channel     : defaults
size        : 45 KB
arch        : x86_64
date        : 2015-10-01
license     : OSI
license_family: PSF
md5         : ce80c762e4fcd7aa7b7c1d3aa1e74424
noarch      : None
platform    : win32
url         : https://repo.continuum.io/pkgs/free/win-64/python-memcached-1.57-py35_0.tar.bz2
dependencies:
    python 3.5*
    six

【问题讨论】:

    标签: django pip memcached python-3.6 python-memcached


    【解决方案1】:

    用 sudo 试试这个命令:

    sudo pip3 install python3-memcached
    

    【讨论】:

      【解决方案2】:

      升级 setuptools 并重试。

      pip install --no-use-wheel --upgrade setuptools

      【讨论】:

        猜你喜欢
        • 2018-11-19
        • 2019-04-18
        • 2018-11-09
        • 1970-01-01
        • 1970-01-01
        • 2020-08-21
        • 1970-01-01
        • 2018-10-15
        • 1970-01-01
        相关资源
        最近更新 更多