博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
pycharm安装 suds模块报错:AttributeError: module 'pip' has no attribute 'main'
阅读量:4355 次
发布时间:2019-06-07

本文共 1081 字,大约阅读时间需要 3 分钟。

需求:安装suds模块

遇到的问题:

 一、报错信息:【file】【Default Settint】---Project Interpreter 点击 搜索suds安装模块报错

解决:依据上图提示找到C:\Program Files\JetBrains\PyCharm 2017.2.3\helpers\packaging_tool.py 文件的192行和109行

 将do_install函数和do_uninstall函数修改为如下格式

def do_install(pkgs):    try:        try:            from pip._internal import main        except Exception:            from pip import main		    except ImportError:        error_no_pip()    return main(['install'] + pkgs)def do_uninstall(pkgs):    try:        try:            from pip._internal import main        except Exception:            from pip import main    except ImportError:        error_no_pip()    return main(['uninstall', '-y'] + pkgs)

  

 二、紧接着又出现如下错误:NameError: name 'pip' is not defined

解决:

上述问题的出现是第一次修改的不彻底导致的:更改do_install函数和do_uninstall函数时返回内容要去掉pip

 

三、最后又出现:安装suds提示ModuleNotFoundError: No module named 'client'

解决:

没有模块叫 client 的。需要先安装 client ,然后再安装 suds 。

pip install client

pip install suds

 

参考:https://www.cnblogs.com/Fordestiny/p/8901100.html

参考:https://segmentfault.com/q/1010000014743128

 

转载于:https://www.cnblogs.com/apff/p/9441385.html

你可能感兴趣的文章
对大一一年的总结和对大二的规划
查看>>
结构化程序设计04 - 零基础入门学习Delphi13
查看>>
密码学基础
查看>>
Java基础Map接口+Collections工具类
查看>>
OSGI基础知识整理
查看>>
Revit 开发将自己的窗口设置为Revit窗口
查看>>
倾斜摄影数据OSGB转换成3DML(转载)
查看>>
给年轻程序员的几句话
查看>>
ionic如何uglify和minify你的js,css,image,png....
查看>>
[LeetCode]Minimum Depth of Binary Tree
查看>>
jboss初体验
查看>>
Python列表、元组练习
查看>>
angular页面刷新
查看>>
Leetcode:7- Reverse Integer
查看>>
C6表单(方成eform)---自定义流程标题格式
查看>>
GridView下DropDownList 的选择方法onselectedindexchanged 实现方法
查看>>
Python之set集合
查看>>
Generic Repository Pattern - Entity Framework, ASP.NET MVC and Unit Testing Triangle
查看>>
Win7 下新版本Windows Virtual PC 安装SharePoint步骤详解
查看>>
SQLSERVER 升级版本的方法
查看>>