- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我是 git、heroku 和 python 的新手。我是网络架构师而不是开发人员。但是,我正在从事一个需要跳入开发世界的项目。
我正在按照此 Plivo 博客中的说明进行操作: https://plivo.com/docs/integrations/hipchat-api/
当我运行“git push heroku master”时,它失败并显示以下内容(这是输出开头和结尾的结尾:
# git push heroku master
Enter passphrase for key '/root/.ssh/id_rsa':
Initializing repository, done.
Counting objects: 18, done.
Compressing objects: 100% (16/16), done.
Writing objects: 100% (18/18), 9.26 KiB, done.
Total 18 (delta 4), reused 0 (delta 0)
-----> Python app detected
-----> No runtime.txt provided; assuming python-2.7.6.
-----> Preparing Python runtime (python-2.7.6)
-----> Installing Setuptools (2.1)
-----> Installing Pip (1.5.4)
-----> Installing dependencies using Pip (1.5.4)
Downloading/unpacking Flask==0.10.1 (from -r requirements.txt (line 1))
Running setup.py (path:/tmp/pip_build_u51681/Flask/setup.py) egg_info for package Flask
warning: no files found matching '*' under directory 'tests'
no previously-included directories found matching 'docs/_build'
no previously-included directories found matching 'docs/_themes/.git'
Downloading/unpacking Jinja2==2.7.1 (from -r requirements.txt (line 2))
Running setup.py (path:/tmp/pip_build_u51681/Jinja2/setup.py) egg_info for package Jinja2
...
Renaming /app/.heroku/python/lib/python2.7/site-packages/setuptools-2.1-py2.7.egg into /app/.heroku/python/lib/python2.7/site-packages/setuptools-2.1-py2.7.egg.OLD.1397173205.08
Patched done.
Relaunching...
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'install' is not defined
----------------------------------------
Cleaning up...
Command /app/.heroku/python/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_u51681/distribute/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-FRUnI0-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_u51681/distribute
Storing debug log for failure in /app/.pip/pip.log
! Push rejected, failed to compile Python app
To git@heroku.com:evening-headland-7388.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:evening-headland-7388.git'
当我查看文件/app/.pip/pip.log 时,它显示以下内容:
# cat /root/.pip/pip.log
------------------------------------------------------------
/usr/bin/pip run on Thu Apr 10 19:08:31 2014
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/pip-1.5.4-py2.6.egg/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.6/site-packages/pip-1.5.4-py2.6.egg/pip/commands/install.py", line 257, in run
InstallRequirement.from_line(name, None))
File "/usr/lib/python2.6/site-packages/pip-1.5.4-py2.6.egg/pip/req.py", line 172, in from_line
return cls(req, comes_from, url=url, prereleases=prereleases)
File "/usr/lib/python2.6/site-packages/pip-1.5.4-py2.6.egg/pip/req.py", line 70, in __init__
req = pkg_resources.Requirement.parse(req)
File "/usr/lib/python2.6/site-packages/pip-1.5.4-py2.6.egg/pip/_vendor/pkg_resources.py", line 2606, in parse
reqs = list(parse_requirements(s))
File "/usr/lib/python2.6/site-packages/pip-1.5.4-py2.6.egg/pip/_vendor/pkg_resources.py", line 2544, in parse_requirements
line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
File "/usr/lib/python2.6/site-packages/pip-1.5.4-py2.6.egg/pip/_vendor/pkg_resources.py", line 2512, in scan_list
raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in', 'argparse,', 'at', ',')
谁能告诉我如何解决这个问题?感谢您提供的任何帮助。
更新于 4-21-2014:
这是从 requirements.txt 中删除 argparse 后命令的最新输出:
[root@clearos wrench]# git push heroku master
Enter passphrase for key '/root/.ssh/id_rsa':
Enter passphrase for key '/root/.ssh/id_rsa':
Initializing repository, done.
Counting objects: 18, done.
Compressing objects: 100% (16/16), done.
Writing objects: 100% (18/18), 9.26 KiB, done.
Total 18 (delta 4), reused 0 (delta 0)
-----> Python app detected
-----> No runtime.txt provided; assuming python-2.7.6.
-----> Preparing Python runtime (python-2.7.6)
-----> Installing Setuptools (2.1)
-----> Installing Pip (1.5.4)
-----> Installing dependencies using Pip (1.5.4)
Downloading/unpacking Flask==0.10.1 (from -r requirements.txt (line 1))
Running setup.py (path:/tmp/pip_build_u51702/Flask/setup.py) egg_info for package Flask
warning: no files found matching '*' under directory 'tests'
no previously-included directories found matching 'docs/_build'
no previously-included directories found matching 'docs/_themes/.git'
Downloading/unpacking Jinja2==2.7.1 (from -r requirements.txt (line 2))
Running setup.py (path:/tmp/pip_build_u51702/Jinja2/setup.py) egg_info for package Jinja2
warning: no files found matching '*' under directory 'custom_fixers'
Downloading/unpacking MarkupSafe==0.18 (from -r requirements.txt (line 3))
Downloading MarkupSafe-0.18.tar.gz
Running setup.py (path:/tmp/pip_build_u51702/MarkupSafe/setup.py) egg_info for package MarkupSafe
Downloading/unpacking Werkzeug==0.9.4 (from -r requirements.txt (line 4))
Running setup.py (path:/tmp/pip_build_u51702/Werkzeug/setup.py) egg_info for package Werkzeug
warning: no files found matching '*' under directory 'werkzeug/debug/templates'
warning: no files found matching '*' under directory 'tests'
no previously-included directories found matching 'docs/_build'
Downloading/unpacking argparse==1.2.1 (from -r requirements.txt (line 5))
argparse an externally hosted file and may be unreliable
Running setup.py (path:/tmp/pip_build_u51702/argparse/setup.py) egg_info for package argparse
no previously-included directories found matching 'doc/_build'
no previously-included directories found matching 'env24'
no previously-included directories found matching 'env25'
no previously-included directories found matching 'env26'
no previously-included directories found matching 'env27'
Downloading/unpacking distribute==0.6.27 (from -r requirements.txt (line 6))
Running setup.py (path:/tmp/pip_build_u51702/distribute/setup.py) egg_info for package distribute
Downloading/unpacking itsdangerous==0.23 (from -r requirements.txt (line 7))
Running setup.py (path:/tmp/pip_build_u51702/itsdangerous/setup.py) egg_info for package itsdangerous
Downloading/unpacking plivo==0.9.1 (from -r requirements.txt (line 8))
Downloading plivo-0.9.1.tar.gz
Running setup.py (path:/tmp/pip_build_u51702/plivo/setup.py) egg_info for package plivo
Downloading/unpacking python-dateutil==2.1 (from -r requirements.txt (line 9))
Running setup.py (path:/tmp/pip_build_u51702/python-dateutil/setup.py) egg_info for package python-dateutil
Downloading/unpacking python-simple-hipchat==0.1 (from -r requirements.txt (line 10))
Downloading python-simple-hipchat-0.1.zip
Running setup.py (path:/tmp/pip_build_u51702/python-simple-hipchat/setup.py) egg_info for package python-simple-hipchat
Downloading/unpacking pytz==2013d (from -r requirements.txt (line 11))
Running setup.py (path:/tmp/pip_build_u51702/pytz/setup.py) egg_info for package pytz
warning: no files found matching '*.pot' under directory 'pytz'
Downloading/unpacking redis==2.8.0 (from -r requirements.txt (line 12))
Running setup.py (path:/tmp/pip_build_u51702/redis/setup.py) egg_info for package redis
Downloading/unpacking requests==1.2.3 (from -r requirements.txt (line 13))
Running setup.py (path:/tmp/pip_build_u51702/requests/setup.py) egg_info for package requests
Downloading/unpacking rq==0.3.11 (from -r requirements.txt (line 14))
Downloading rq-0.3.11.tar.gz
Running setup.py (path:/tmp/pip_build_u51702/rq/setup.py) egg_info for package rq
Downloading/unpacking simplejson==3.3.0 (from -r requirements.txt (line 15))
Running setup.py (path:/tmp/pip_build_u51702/simplejson/setup.py) egg_info for package simplejson
Downloading/unpacking six==1.4.1 (from -r requirements.txt (line 16))
Downloading six-1.4.1.tar.gz
Running setup.py (path:/tmp/pip_build_u51702/six/setup.py) egg_info for package six
Downloading/unpacking times==0.6.2 (from -r requirements.txt (line 17))
Downloading times-0.6.2-py2.py3-none-any.whl
Installing collected packages: Flask, Jinja2, MarkupSafe, Werkzeug, argparse, distribute, itsdangerous, plivo, python-dateutil, python-simple-hipchat, pytz, redis, requests, rq, simplejson, six, times
Running setup.py install for Flask
warning: no files found matching '*' under directory 'tests'
no previously-included directories found matching 'docs/_build'
no previously-included directories found matching 'docs/_themes/.git'
Running setup.py install for Jinja2
warning: no files found matching '*' under directory 'custom_fixers'
Running setup.py install for MarkupSafe
building 'markupsafe._speedups' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/app/.heroku/python/include/python2.7 -c markupsafe/_speedups.c -o build/temp.linux-x86_64-2.7/markupsafe/_speedups.o
gcc -pthread -shared build/temp.linux-x86_64-2.7/markupsafe/_speedups.o -o build/lib.linux-x86_64-2.7/markupsafe/_speedups.so
Running setup.py install for Werkzeug
warning: no files found matching '*' under directory 'werkzeug/debug/templates'
warning: no files found matching '*' under directory 'tests'
no previously-included directories found matching 'docs/_build'
Running setup.py install for argparse
no previously-included directories found matching 'doc/_build'
no previously-included directories found matching 'env24'
no previously-included directories found matching 'env25'
no previously-included directories found matching 'env26'
no previously-included directories found matching 'env27'
Running setup.py install for distribute
Before install bootstrap.
Scanning installed packages
Setuptools installation detected at /app/.heroku/python/lib/python2.7/site-packages/setuptools-2.1-py2.7.egg
Egg installation
Patching...
Renaming /app/.heroku/python/lib/python2.7/site-packages/setuptools-2.1-py2.7.egg into /app/.heroku/python/lib/python2.7/site-packages/setuptools-2.1-py2.7.egg.OLD.1398135525.78
Patched done.
Relaunching...
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'install' is not defined
Complete output from command /app/.heroku/python/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_u51702/distribute/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-HEnm1N-record/install-record.txt --single-version-externally-managed --compile:
Before install bootstrap.
Scanning installed packages
Setuptools installation detected at /app/.heroku/python/lib/python2.7/site-packages/setuptools-2.1-py2.7.egg
Egg installation
Patching...
Renaming /app/.heroku/python/lib/python2.7/site-packages/setuptools-2.1-py2.7.egg into /app/.heroku/python/lib/python2.7/site-packages/setuptools-2.1-py2.7.egg.OLD.1398135525.78
Patched done.
Relaunching...
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'install' is not defined
----------------------------------------
Cleaning up...
Command /app/.heroku/python/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_u51702/distribute/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-HEnm1N-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_u51702/distribute
Storing debug log for failure in /app/.pip/pip.log
! Push rejected, failed to compile Python app
To git@heroku.com:evening-headland-7388.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:evening-headland-7388.git'
最佳答案
最后一行:
ValueError: ('Expected version spec in', 'argparse,', 'at', ',')
让我觉得在您的 requirements.txt
文件中,您有 argparse
。 argparse
是一个内置函数,有时会错误地通过 pip freeze
(以及 wsgiref
)获取输出。您可以检查该文件并删除该行吗?
另见 this answer
关于python - git push heroku master - 无法编译 Python 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23001348/
我的团队正在使用 gerrit 代码审查,本质上这意味着默认的推送行为会绕过标准工作流程,因此我们需要使用 git push origin HEAD:refs/for/feature 来正确推送我们的
我是 assembly 新手,我正在使用 MASM。我看到这些代码行,想知道这之间有什么区别 a) push myVar b) push [myVar] c) push OFFSET myVar 我怎
美好的一天! 将镜像推送到docker hub时遇到一些问题。我的第一个软件版本: vagrant@debian-8-docker:~$ docker version Client version:
我有三个 Controller 一二三 .首先是navigationController的rootViewController。 在 SecondViewController ,我有一个名为 的协议(
我在这个 Google 教程的帮助下实现了一个 Web Push API: https://developers.google.com/web/fundamentals/getting-started
我有两个模式: var optionsSchema = new Schema({ locationname: String, locationnumber : String
我是 git 的新手并对其进行了测试。我已经能够克隆 friend 存储库进行小的本地更改并提交。 我现在想测试将我的本地更改推送到远程存储库,但不幸的是当我尝试进行推送时 $ git push <
我们正在公司讨论 git rebase 之后该做什么。在rebase之后,您需要将更改推送到远程origin,但是当git不允许时我们应该怎么做呢?实际上,我们正在讨论当分支已经被推送时我们最常用的两
我正在使用具有嵌入式 github 支持的新 IDE。在命令行本地,我可以成功地使用 git push orgin master 并更新 github。但是我的 IDE 使用带有 -v 标志的命令,这
我仍在阅读有关 RoR 的一些指南,我被困在 Deploying The Demo App 上 我遵循了说明: With the completion of the Microposts resour
我正在尝试创建一个可以将我的 git 存储库镜像到另一个存储库的脚本。一切正常,但它一直在说 [remote rejected] refs/pull/xx/head -> refs/pull/xx/h
我想了解使用 Tortoise SVN 构建过程的一些过程。主要是 我想知道你是否插入: 主线中继 QA 后的一个分支将其抓取到本地的工作副本中并测试该分支,然后一些构建推送该分支 我遇到的问题是我在
在谈论将消息推送到移动应用程序以触发 WAP 内容的下载时,似乎都使用了 WAP 推送和 SMS 推送这两个术语。 这些术语是指相同的机制还是具有不同的含义? 最佳答案 SMS Push 是告诉终端发
我只是想知道是否有人使用这种技术: 由于推送通知仅随 OS 3.0 一起提供,因此我一直在考虑使用电子邮件推送(Exchange、mobile.me)作为解决方法: 您可以注册一个 URL,例如。 m
我正在 build WP website using DIVI theme .应该被插入 dataLayer 的标签被默认的“未设置”值卡在某个地方。 为了推送我使用脚本的值: functi
我最近删除了xcode 6 beta 3并安装了xcode 6 beta 6 当我在终端输入gitpush时,这发生了 xcrun:错误: Activity 的开发人员路径(“/Application
我即将实现ionic-native Push Notifications .这可以在浏览器中运行吗?还是我需要安装 iOS/Android 模拟器? 最佳答案 除非您使用 Phonegap 推送服务器
Safari 12.1 是否支持服务 worker PWA 推送通知?我试过这个 demo在 iOS 上,但它仍然不适合我。 有机会得到它们吗?谢谢。 最佳答案 目前没有关于此功能的通信...Appl
目前我有很多 chrome 浏览器的推送订阅都是这样的方法, swr.pushManager.subscribe({userVisibleOnly: true}) .then(function
我需要 4 个过渡效果,但我只知道 2 个过渡效果,还有 2 个我不知道。我知道的 2 个过渡动画是: 过渡时下推: 并向下推过渡: 但
我是一名优秀的程序员,十分优秀!