python如何安装RawConfigParser 或 configparser
ringa_lee
ringa_lee 2017-04-18 09:36:50
0
5
750

我想安装下面这个包:

尝试了(使用 pip install rawconfigparser 和 configparser 命令都没有成功),如下图:

请问我要怎么解决?
请问如果你们上网搜这个问题具体会怎么做? 请教我“渔”哈

ringa_lee
ringa_lee

ringa_lee

reply all (5)
PHPzhong

I Googledpip install configparser failed, and the second result was a question from SO:

Python 3 ImportError: No module named 'ConfigParser'

The accepted answer is

In Python 3, ConfigParser has been renamed to configparser for PEP 8 compliance. It looks like the package you are installing does not support Python 3.

So I think your problem is using python 2.x to run 3.x code.

Then, you can put the first sentence in the document:

The ConfigParser module has been renamed to configparser in Python 3. The 2to3 tool will automatically adapt imports when converting your sources to Python 3.

I think this should solve your problem.

    PHPzhong

    Isn’t this included in the standard library...Does it still need to be installed...

      迷茫

      If I read it correctly, there is a prompt that the permissions are insufficient. If it is not a win platform, install it with administrator rights

        黄舟
        1. Use Google

        2. Organize the keywords (concisely express the problem in your mind)

        3. Learn the basics first

          Ty80

          Give the correct answer.
          My mac comes with python 2.7, so when executing the command, be sure to add sudo. The correct command is:
          sudo pip install configparser

            Latest Downloads
            More>
            Web Effects
            Website Source Code
            Website Materials
            Front End Template
            About us Disclaimer Sitemap
            php.cn:Public welfare online PHP training,Help PHP learners grow quickly!