pycharm使用错误排查
1.pip安装扩展包报错
creating build/temp.linux-x86_64-3.4
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size= -Wformat -Werror=format-security -D_FORTIFY_SOURCE= -fPIC -I/usr/local/include -I/usr/include/python3.4m -c _mssql.c -o build/temp.linux-x86_64-3.4/_mssql.o -DMSDBLIB
_mssql.c::: fatal error: pyconfig.h: No such file or directory
#include "pyconfig.h"
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
安装扩展包
kamil@vm-ubuntu:~$ sudo apt-get install python3-dev
[sudo] password for kamil:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libexpat1-dev libpython3-dev libpython3. libpython3.-dev python3.-dev
The following NEW packages will be installed:
libexpat1-dev libpython3-dev libpython3. libpython3.-dev python3-dev
python3.-dev
upgraded, newly installed, to remove and not upgraded.
Need to get 19.6 MB of archives.
After this operation, 36.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get: http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libpython3.4 amd64 3.4.3-1ubuntu1~14.04.3 [1,308 kB]
2.pip升级
kamil@vm-ubuntu:~$ sudo pip install --upgrade pip
[sudo] password for kamil:
The directory '/home/kamil/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
You are using pip version 7.1.0, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
The directory '/home/kamil/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pip
Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB)
100% |████████████████████████████████| 1.2MB 90kB/s
Installing collected packages: pip
Found existing installation: pip 7.1.0
Uninstalling pip-7.1.0:
Successfully uninstalled pip-7.1.0
Successfully installed pip-8.1.1
kamil@vm-ubuntu:~$
3.Command "python setup.py egg_info" failed with error code 1 in
请问
4.error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
You need to install the FreeTDS development package (freetds-dev) before trying to install pymssql with pip:
$ sudo apt-get install freetds-dev
sudo apt-get install -y libxml2-dev libxslt1-dev zlib1g-dev python3-pip
and then, in your virtualenv or wherever you wish to install it:
$ pip install pymssql
kamil@vm-ubuntu:~$ sudo pip install pymssql
The directory '/home/kamil/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/kamil/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pymssql
Downloading pymssql-2.1..tar.gz (898kB)
% |████████████████████████████████| 901kB 59kB/s
Installing collected packages: pymssql
Running setup.py install for pymssql ... done
Successfully installed pymssql-2.1.
kamil@vm-ubuntu:~$
5.error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).
请问
6.lxml安装报错
compilation terminated.
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
*********************************************************************************
error: command 'x86_64-linux-gnu-gcc' failed with exit status ----------------------------------------
Rolling back uninstall of lxml
Command "/usr/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-j1bywhpx/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-vz905g9u-record/install-record.txt --single-version-externally-managed --compile" failed with error code in /tmp/pip-build-j1bywhpx/lxml/
解决:
apt-get install libxml2-dev;
apt-get install libxslt1-dev;
sudo pip install lxml --upgrade
7.MySQL-Python模块
sudo apt-get install libmysqlclient-dev
yum install python-devel mysql-devel
pycharm使用错误排查的更多相关文章
- GRPC使用错误排查记录
1. 编译报错 f.fr.SetReuseFrames undefined (type *http2.Framer has no field or method SetReuseFrames) 该问题 ...
- > Manifest merger failed with multiple errors, see logs -- Android Studio问题汇总
FAQ:> Manifest merger failed with multiple errors, see logs 解决: 此问题产生原因大概有三个 # 第一,清单文件有错,这种错不会在编译 ...
- 使用pycharm遇到问题排查过程
一.安装Python 下载路径:https://www.python.org/downloads/ 二.配置环境变量 安装Python后,配置环境变量,将安装目录添加到Path中: 使用pycharm ...
- 利用PyCharm进行Python远程调试
背景描述 有时候Python应用的代码在本地开发环境运行十分正常,但是放到线上以后却出现了莫名其妙的异常,经过再三排查以后还是找不到问题原因,于是就在想,要是可以在服务器环境中进行单步跟踪调试就好了. ...
- Pycharm、IDEA等汉化教程
本汉化教程对jetbrains全系列可用:IDEA.Pycharm.WebStorm.phpstorm.AndroidStudio.GoLand.RubyMine.CLion 此汉化无副作用,绝对安全 ...
- Lodop简短问答客户反馈篇 及排查步骤 及注册相关
A.http下打印图片正常,https下打印图片是××.(有的客户端可以,有的不可以)重置ie浏览器试试.客户反馈:(和ie浏览器的设置有关)intenet选项--高级里,我调整为和能打印出图片的电脑 ...
- django表格form无法保存评论排查步骤
初学django项目,在网上找了个blog教程,还是很不错的,这里感谢一下博主https://www.zmrenwu.com/post/2/ 这个项目适合django初学者,是一个完整的blog项目 ...
- pycharm最新版新建工程没导入本地包问题:module 'selenium.webdriver' has no attribute 'Firefox'
前言 最新版的pycharm做了很大的改变,新建工程的时候,默认不导入本地的安装包,这就导致很多小伙伴踩坑了... 明明已经pip安装过selenium了,但是却报AttributeError:mod ...
- python基础===利用PyCharm进行Python远程调试(转)
原文链接:利用PyCharm进行Python远程调试 背景描述 有时候Python应用的代码在本地开发环境运行十分正常,但是放到线上以后却出现了莫名其妙的异常,经过再三排查以后还是找不到问题原因,于是 ...
随机推荐
- asp利用winrar解压缩文件
'当前文件夹路径 server.MapPath("./") '网站根目录 server.MapPath("/") Dim strZipFolder ' 待压缩的 ...
- Mysql导出函数、存储过程
下面是导出存储过程的代码 1 # mysqldump -u 数据库用户名 -p -n -t -d -R 数据库名 > 文件名 其中,-d 表示--no-create-db, -n表示--no-d ...
- this.down和this.up用法
down既可以加id也可以加xtype
- js禁止用户右键等操作
<script type="text/javascript"> document.oncontextmenu=function(){return false}; ...
- JAVA CDI 学习(1) - @Inject基本用法
CDI(Contexts and Dependency Injection 上下文依赖注入),是JAVA官方提供的依赖注入实现,可用于Dynamic Web Module中,先给3篇老外的文章,写得很 ...
- 使用LocalBroadcastManager
Android中BroadcastReceiver主要用途有 发送通知,更新UI或者数据,应用程序间相互通信,监听系统状态(比如开机,网络等) Android中BroadcasetReceiver的注 ...
- Struts2 动态结果和带参数的跳转
完整代码:Struts16ActionResultsDemo.rar 1.动态结果. 有时我们需要在Action里取得我个要转跳的页面 看一下我们的struts.xml <?xml versio ...
- c++ 副本构造器
我们都知道两个指针指向同一个变量时如果一个指针被释放那么另一个就会出问题 为了说明问题我做了一个很恶心的小例子 class C { public : C(int v) { ptrInt=new int ...
- 移动端调试利器 JSConsole 介绍
先看这篇文章 Web应用调试:现在是Weinre和JSConsole,最终会是WebKit的远程调试协议. 我们先不看未来,从此文可见,当下的移动端调试还是 Weinre 和 JSConsole 的天 ...
- gocode+auto-complete搭建emacs的go语言自动补全功能
上篇随笔记录了在emacs中使用go-mode和goflymake搭建了go语言的简单编程环境(推送门),今天来记录一下使用gocode+auto-complete配置emacs中go语言的自动补全功 ...