我正试图用Heroku上的雪松将一个应用程序用于雪松-14堆栈。在我的requirements.txt文件中,我有:
....
robobrowser==0.5.1
....
当我尝试通过将项目推送到heroku进行部署时,我得到:
Collecting robobrowser==0.5.1 (from -r requirements.txt (line 17))
Downloading robobrowser-0.5.1.tar.gz
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-PqCF2A/robobrowser/setup.py", line 38, in <module>
for requirement in parse_requirements('requirements.txt')
File "/app/.heroku/python/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/req/req_file.py", line 19, in parse_requirements
"parse_requirements() missing 1 required keyword argument: "
TypeError: parse_requirements() missing 1 required keyword argument: 'session'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-PqCF2A/robobrowser/setup.py", line 38, in <module>
for requirement in parse_requirements('requirements.txt')
File "/app/.heroku/python/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/req/req_file.py", line 19, in parse_requirements
"parse_requirements() missing 1 required keyword argument: "
TypeError: parse_requirements() missing 1 required keyword argument: 'session'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-PqCF2A/robobrowser
我该如何解决这个问题?
答案 0 :(得分:14)
我遇到了为Python安装wabbit_wappa的问题。我通过改变setup.py中的一行来修复它:
install_reqs = parse_requirements('requirements.txt')
到
install_reqs = parse_requirements('requirements.txt', session=False)
安装得很好。
答案 1 :(得分:5)
robobrowser
的github问题跟踪器中存在未解决的问题和拉取请求:
要么等待它被合并,要么从fork安装robobrowser
:
$ pip install git+https://github.com/xxinfinityxx/robobrowser
降级pip
也可以是一个选项,但我不确定你是否可以控制在heroku上使用哪个pip版本。
答案 2 :(得分:4)
尝试更新pip:
sudo pip install --upgrade pip
这解决了我的问题。
答案 3 :(得分:0)
我有最新版本的pip,这对我来说是这样的:
{(None if v.__class__ == dict else k): v for k, v in a.items()}