Pip: "إضافي" لا يعمل في النقطة 8.1.1

تم إنشاؤها على ٩ مايو ٢٠١٦  ·  3تعليقات  ·  مصدر: pypa/pip

  • إصدار النقطة: 8.1.1
  • إصدار Python: 2.7.11+
  • نظام التشغيل: أوبونتو 16.04

    وصف:

فشل pip 8.1.1 بسبب الخطأ "UndefinedEnvironmentName:" إضافي "غير موجود في بيئة التقييم." عندما أحاول تثبيت حزمة تستخدم extras_require (django-constance [database])

يؤدي الرجوع إلى النقطة 8.1.0 إلى حل المشكلة.

ما قمت بتشغيله:

في Virtualenv نظيف ، مع setuptools == 21.0.0 ، أنا أعمل

pip install 'django-constance[database]==1.1.2'

الذي فشل مع:

Collecting django-constance[database]==1.1.2
  Downloading django_constance-1.1.2-py2.py3-none-any.whl
Exception:
Traceback (most recent call last):
  File "/home/johnc/.virtualenvs/pip_8_1_1/local/lib/python2.7/site-packages/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
  File "/home/johnc/.virtualenvs/pip_8_1_1/local/lib/python2.7/site-packages/pip/commands/install.py", line 328, in run
    wb.build(autobuilding=True)
  File "/home/johnc/.virtualenvs/pip_8_1_1/local/lib/python2.7/site-packages/pip/wheel.py", line 748, in build
    self.requirement_set.prepare_files(self.finder)
  File "/home/johnc/.virtualenvs/pip_8_1_1/local/lib/python2.7/site-packages/pip/req/req_set.py", line 360, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/home/johnc/.virtualenvs/pip_8_1_1/local/lib/python2.7/site-packages/pip/req/req_set.py", line 448, in _prepare_file
    req_to_install, finder)
  File "/home/johnc/.virtualenvs/pip_8_1_1/local/lib/python2.7/site-packages/pip/req/req_set.py", line 387, in _check_skip_installed
    req_to_install.check_if_exists()
  File "/home/johnc/.virtualenvs/pip_8_1_1/local/lib/python2.7/site-packages/pip/req/req_install.py", line 997, in check_if_exists
    self.satisfied_by = pkg_resources.get_distribution(self.req)
  File "/home/johnc/.virtualenvs/pip_8_1_1/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 535, in get_distribution
    dist = get_provider(dist)
  File "/home/johnc/.virtualenvs/pip_8_1_1/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 415, in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
  File "/home/johnc/.virtualenvs/pip_8_1_1/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 943, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/johnc/.virtualenvs/pip_8_1_1/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 808, in resolve
    if not req_extras.markers_pass(req):
  File "/home/johnc/.virtualenvs/pip_8_1_1/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 993, in markers_pass
    return not req.marker or any(extra_evals) or req.marker.evaluate()
  File "/home/johnc/.virtualenvs/pip_8_1_1/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/_vendor/packaging/markers.py", line 278, in evaluate
    return _evaluate_markers(self._markers, current_environment)
  File "/home/johnc/.virtualenvs/pip_8_1_1/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/_vendor/packaging/markers.py", line 203, in _evaluate_markers
    lhs_value = _get_env(environment, lhs.value)
  File "/home/johnc/.virtualenvs/pip_8_1_1/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/_vendor/packaging/markers.py", line 185, in _get_env
    "{0!r} does not exist in evaluation environment.".format(name)
UndefinedEnvironmentName: 'extra' does not exist in evaluation environment.

إذا قمت بتشغيله بدون محدد الإصدار ، فسأحصل على خطأ مختلف:

pip install 'django-constance[database]'

يعطي

Exception:
Traceback (most recent call last):
  File "/home/johnc/.virtualenvs/pip_8_1_1/local/lib/python2.7/site-packages/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
  File "/home/johnc/.virtualenvs/pip_8_1_1/local/lib/python2.7/site-packages/pip/commands/install.py", line 305, in run
    wheel_cache
  File "/home/johnc/.virtualenvs/pip_8_1_1/local/lib/python2.7/site-packages/pip/basecommand.py", line 270, in populate_requirement_set
    wheel_cache=wheel_cache
  File "/home/johnc/.virtualenvs/pip_8_1_1/local/lib/python2.7/site-packages/pip/req/req_install.py", line 234, in from_line
    extras).extras
  File "/home/johnc/.virtualenvs/pip_8_1_1/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2833, in parse
    req, = parse_requirements(s)
  File "/home/johnc/.virtualenvs/pip_8_1_1/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2781, in parse_requirements
    yield Requirement(line)
  File "/home/johnc/.virtualenvs/pip_8_1_1/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2790, in __init__
    raise RequirementParseError(str(e))
RequirementParseError: Invalid requirement, parse error at "'__placeh'"

setup.py من django-constance للرجوع إليها: https://github.com/jazzband/django-constance/blob/master/setup.py

auto-locked

التعليق الأكثر فائدة

حسنًا ، ربما لا يوجد خطأ - إعادة تثبيت الأنابيب باستخدام

pip install -U pip --force-reinstall

يبدو أنه أصلح هذا بالنسبة لي.

ال 3 كومينتر

حسنًا ، ربما لا يوجد خطأ - إعادة تثبيت الأنابيب باستخدام

pip install -U pip --force-reinstall

يبدو أنه أصلح هذا بالنسبة لي.

هذا لا يصلح لي.

تم قفل سلسلة الرسائل هذه تلقائيًا نظرًا لعدم وجود أي نشاط حديث بعد إغلاقه. الرجاء فتح قضية جديدة للأخطاء ذات الصلة.

هل كانت هذه الصفحة مفيدة؟
0 / 5 - 0 التقييمات