Heroku& Pip:AttributeError:'_ NamespacePath'对象没有属性'sort'

时间:2017-10-03 17:33:52

标签: heroku pip pipenv

当我尝试部署到Heroku时,会发生以下错误:

$(window.getSelection().anchorNode).parents('li')

This issue seems to be related to Pip。据我所知,它可以通过运行来解决:

remote:          File "/tmp/build_283a27430a6f3f4cbf76d08e0f6a61d6/.heroku/python/lib/python3.6/site-packages/pipenv/patched/pip/_vendor/pkg_resources/__init__.py", line 2121, in _rebuild_mod_path
remote:            orig_path.sort(key=position_in_sys_path)
remote:        AttributeError: '_NamespacePath' object has no attribute 'sort'

但我无法在Heroku上指定setuptools的版本。 From the official documentation

  

平台使用以下库来管理和管理   运行Python应用程序并且无法指定。   Setuptools 23.1.0:Python打包工具。   Pip 9.0.1:应用程序依赖性解析。   如果您的应用程序在requirements.txt或Pipfile中声明了这些依赖项,则可能会发生意外行为。

如何解决此问题?

1 个答案:

答案 0 :(得分:0)

Looks like this issue has been solved yesterday

删除heroku应用程序并创建一个新应用程序(以便更新Pipenv)应该可以解决问题!