安装line_profiler后如何解决会突出的点? [英] How to fix pip being proken after installing line_profiler?

查看:97
本文介绍了安装line_profiler后如何解决会突出的点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Ubuntu 14.04.5 LTS.试图用sudo pip3 install line_profiler安装line_profiler,现在当我运行sudo pip3时,得到以下输出:

Using Ubuntu 14.04.5 LTS. Tried to install line_profiler with sudo pip3 install line_profiler, and now when I run sudo pip3, I get the following output:

Traceback (most recent call last):
  File "/usr/bin/pip3", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python3.4/dist-packages/pkg_resources/__init__.py", line 72, in <module>
    import packaging.requirements
  File "/usr/local/lib/python3.4/dist-packages/packaging/requirements.py", line 59, in <module>
    MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
TypeError: __call__() missing 1 required positional argument: 'name'

当我现在尝试运行django应用程序时遇到类似的错误,所以我猜很多东西都弄乱了.

Get a similar error when I try to run a django application now, so I guess a lot of stuff is messed up.

任何人都知道可能出了什么问题或如何解决?

Anyone have any idea of what could have went wrong or how to fix?

推荐答案

在安装了几个软件包之后,我在相对较新的Ubuntu 14.04配置上遇到了相同的错误.我猜错误的代码已被推送到存储库中.

I've just encountered the same error on a relatively fresh Ubuntu 14.04 config after installing just a couple packages. I'm guessing buggy code has been pushed to a repository.

查看异常的根本原因:

  File "/usr/local/lib/python3.4/dist-packages/packaging/requirements.py", line 59, in <module>
    MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
TypeError: __call__() missing 1 required positional argument: 'name'

问题在于MARKER_EXPR()调用应具有名称"参数,但没有.我的解决方法是编辑requirements.py文件,使其包含MARKER_EXPR("").这为我解决了.

The problem is that the MARKER_EXPR() call should have a 'name' argument but it doesn't. My fix was to edit the requirements.py file such that it contained MARKER_EXPR(""). This solved it for me.

这篇关于安装line_profiler后如何解决会突出的点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆