zoukankan      html  css  js  c++  java
  • ImportError: No module named argparse

    安装rpy2时报如下错:

    [root@localhost ~]# pip install rpy2
    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.
    Collecting rpy2
    /usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
      InsecurePlatformWarning
      Using cached rpy2-2.8.5.tar.gz
        Complete output from command python setup.py egg_info:
        Traceback (most recent call last):
          File "<string>", line 20, in <module>
          File "/tmp/pip-build-ypdM2Y/rpy2/setup.py", line 4, in <module>
            import argparse, shlex, subprocess
        ImportError: No module named argparse
        
        ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ypdM2Y/rpy2

    解决办法是:

    [root@localhost ~]# pip install argparse
    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.
    Collecting argparse
    /usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
      InsecurePlatformWarning
      Downloading argparse-1.4.0-py2.py3-none-any.whl
    Installing collected packages: argparse
    Successfully installed argparse-1.4.0
  • 相关阅读:
    IDEA 2020.1 使用eclipse快捷键
    IDEA 2020.1 配置自定义Maven
    Maven 下载、安装、设置国内镜像
    IDEA 2020.1 下载、安装、激活
    MySQL 5.5/5.7 zip版 下载、安装、卸载、报错
    JDK8 下载、安装、配置环境变量
    如何在虚拟机VM15中安装W10
    虚拟机的安装,VMware-workstation-full-15.5.1-15018445
    为什么要买云服务器
    输入子系统实现的按键驱动
  • 原文地址:https://www.cnblogs.com/RaymondBlog/p/6523677.html
Copyright © 2011-2022 走看看