gpt4 book ai didi

linux - python setup.py egg_info"失败,错误代码为 1 in/tmp/pip-build-zsm7incx/phonenumbers/- 失败

转载 作者:太空宇宙 更新时间:2023-11-04 10:04:21 41 4
gpt4 key购买 nike

我第一次使用 Heroku 尝试创建应用程序(使用 SendGrid 的 Inbound Parse Webhook"和 Twilio SMS 通过电子邮件发送和接收 SMS 消息)。通过 VirtualBox 在 Linux 中使用终端。

简介

网络: unicorn 应用:应用

要求

(点击链接查看文本文件截图) https://imgur.com/a/vnH7Wfe

我不断收到此错误消息:

-----> Python app detected
-----> Installing python-3.6.7
-----> Installing pip
-----> Installing SQLite3
-----> Installing requirements with pip

Collecting Flask==0.10.1 (from -r /tmp/build_a3cc99a3acb699a81c9d4cf2df05e742/requirements.txt (line 1))

Downloading https://files.pythonhosted.org/packages/db/9c/149ba60c47d107f85fe52564133348458f093dd5e6b57a5b60ab9ac517bb/Flask-0.10.1.tar.gz (544kB)

Collecting Jinja2==2.7.2 (from -r /tmp/build_a3cc99a3acb699a81c9d4cf2df05e742/requirements.txt (line 2))

Downloading https://files.pythonhosted.org/packages/23/94/ca42176bf7a252ce1f5d165953013573dffdbe4b5dac07f57146146ea432/Jinja2-2.7.2.tar.gz (378kB)

Collecting MarkupSafe==0.19 (from -r /tmp/build_a3cc99a3acb699a81c9d4cf2df05e742/requirements.txt (line 3))

Downloading https://files.pythonhosted.org/packages/8e/90/da092a12fb96e0c4cacc279d1f92819ae82bfa291e0a03afe8059518e91a/MarkupSafe-0.19.tar.gz

Collecting Werkzeug==0.9.4 (from -r /tmp/build_a3cc99a3acb699a81c9d4cf2df05e742/requirements.txt (line 4))

Downloading https://files.pythonhosted.org/packages/d8/5e/8abc95630f9c4248edffed30592468f884e845ba656a959a12e452fafcec/Werkzeug-0.9.4.tar.gz (1.1MB)

Collecting gunicorn==18.0 (from -r /tmp/build_a3cc99a3acb699a81c9d4cf2df05e742/requirements.txt (line 5))

Downloading https://files.pythonhosted.org/packages/02/b3/23273452586e4923af43b2805292900ac784324e9d8ada8e0673ff7accd5/gunicorn-18.0-py33-none-any.whl (93kB)

Collecting httplib2==0.8 (from -r /tmp/build_a3cc99a3acb699a81c9d4cf2df05e742/requirements.txt (line 6))

Downloading https://files.pythonhosted.org/packages/f0/cf/71451a11600b896b3e186361b73a971372cd2c124666798af8cd4ffa6ac8/httplib2-0.8.tar.gz (110kB)

Collecting itsdangerous==0.23 (from -r /tmp/build_a3cc99a3acb699a81c9d4cf2df05e742/requirements.txt (line 7))

Downloading https://files.pythonhosted.org/packages/c1/6c/ceefb52b2a5d7d1f2b1b407a96892182161904478b9ef86049e7b8162cb6/itsdangerous-0.23.tar.gz (46kB)

Collecting mock==1.0.1 (from -r /tmp/build_a3cc99a3acb699a81c9d4cf2df05e742/requirements.txt (line 8))

Downloading https://files.pythonhosted.org/packages/a2/52/7edcd94f0afb721a2d559a5b9aae8af4f8f2c79bc63fdbe8a8a6c9b23bbe/mock-1.0.1.tar.gz (818kB)

Collecting nose==1.3.1 (from -r /tmp/build_a3cc99a3acb699a81c9d4cf2df05e742/requirements.txt (line 9))

Downloading https://files.pythonhosted.org/packages/1d/a3/6df9d0d59cf0b20c505359ddef33d7ce4fe4388dba0948aadf3e75722f33/nose-1.3.1.tar.gz (274kB)

Collecting phonenumbers==6.0.0 (from -r /tmp/build_a3cc99a3acb699a81c9d4cf2df05e742/requirements.txt (line 10))

Downloading https://files.pythonhosted.org/packages/66/ec/efb3d3200cd5ead52a7cbf750b9406740d493ae4a7f3ef8303a42b3a0c58/phonenumbers-6.0.0.tar.gz (1.7MB)

Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-zsm7incx/phonenumbers/setup.py", line 33, in <module>
from phonenumbers import __version__
File "/tmp/pip-build-zsm7incx/phonenumbers/phonenumbers/__init__.py", line 130, in <module>
from .phonenumbermatcher import PhoneNumberMatch, PhoneNumberMatcher, Leniency
File "/tmp/pip-build-zsm7incx/phonenumbers/phonenumbers/phonenumbermatcher.py", line 161, in <module>
re.compile(u("(?u)(?:\\p{Z}-|-\\s)\\s*(.+)")),
File "/app/.heroku/python/lib/python3.6/re.py", line 233, in compile
return _compile(pattern, flags)
File "/app/.heroku/python/lib/python3.6/re.py", line 301, in _compile
p = sre_compile.compile(pattern, flags)
File "/app/.heroku/python/lib/python3.6/sre_compile.py", line 562, in compile
p = sre_parse.parse(p, flags)
File "/app/.heroku/python/lib/python3.6/sre_parse.py", line 855, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "/app/.heroku/python/lib/python3.6/sre_parse.py", line 416, in _parse_sub
not nested and not items))

File "/app/.heroku/python/lib/python3.6/sre_parse.py", line 765, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "/app/.heroku/python/lib/python3.6/sre_parse.py", line 416, in _parse_sub
not nested and not items))
File "/app/.heroku/python/lib/python3.6/sre_parse.py", line 502, in _parse
code = _escape(source, this, state)
File "/app/.heroku/python/lib/python3.6/sre_parse.py", line 401, in _escape
raise source.error("bad escape %s" % escape, len(escape))
sre_constants.error: bad escape \p at position 7
----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-zsm7incx/phonenumbers/

! Push rejected, failed to compile Python app.
! Push failed

我检查了多个帖子并尝试了很多东西。我升级了设置工具。如何修复上述错误?

最佳答案

这似乎是旧电话号码(您使用的是 6.0.0 版,当前版本是 8.10.2)和 Python 3.5 的问题.您需要较低版本的 Python 或较高版本的 phonenumbers

关于linux - python setup.py egg_info"失败,错误代码为 1 in/tmp/pip-build-zsm7incx/phonenumbers/- 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53659146/

41 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com