pycharm中functools包无法安装

来源:7-1 .管理员登录

五月未央

2017-11-16

下面是报错信息。根据报错信息,我使用的是pip版本是7,让我使用9。但是我更新成9了,再次安装还是这个问题。

具体报错信息:

Collecting functools

  Using cached functools-0.5.tar.gz

    Complete output from command python setup.py egg_info:

    Traceback (most recent call last):

      File "<string>", line 3, in <module>

      File "/Users/xxxxxx/PhpstormProjects/movie_venv/lib/python3.6/site-packages/setuptools/__init__.py", line 4, in <module>

        import distutils.core

      File "/Users/xxxxxx/PhpstormProjects/movie_venv/lib/python3.6/distutils/__init__.py", line 4, in <module>

        import imp

      File "/Users/xxxxxx/PhpstormProjects/movie_venv/lib/python3.6/imp.py", line 19, in <module>

        from importlib._bootstrap import _ERR_MSG, _exec, _load, _builtin_from_name

      File "/Users/xxxxxx/PhpstormProjects/movie_venv/lib/python3.6/importlib/__init__.py", line 57, in <module>

        import types

      File "/Users/xxxxxx/PhpstormProjects/movie_venv/lib/python3.6/types.py", line 171, in <module>

        import functools as _functools

      File "/private/var/folders/lk/ckx4912j70lc11msj6bh6vlm0000gn/T/pycharm-packaging2/functools/functools.py", line 34

        raise TypeError, 'compose expects at least one argument'

                       ^

    SyntaxError: invalid syntax

    

    ----------------------------------------


You are using pip version 7.1.0, however version 9.0.1 is available.

You should consider upgrading via the 'pip install --upgrade pip' command.

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/lk/ckx4912j70lc11msj6bh6vlm0000gn/T/pycharm-packaging2/functools


麻烦老师帮忙解决下。谢谢。

写回答

1回答

rustgopy

2017-11-20

同学,你好,你用命令行更新一下pip,pip install --upgrade pip

0
1
五月未央
我更新过的。正是因为更新了之后还是不行,才来提问的。 我通过命令行查看了pip的版本是9.0.1 (直接使用命令窗口和pycharm的Terminal都是)。然而,我在pycharm的Project Interpreter安装就一直报这个错。 我环境都更新pip成9了,但是pycharm的Project Interpreter添加时候依然采用的是pip7,我应该在哪里设置,让Project Interpreter使用我更新好的pip 9 ?
2017-11-22
共1条回复

Python Flask 构建微电影视频网站

Python 最好用轻量级框架,让你轻松胜任 Python Web 工程师

683 学习 · 663 问题

查看课程