相关疑难解决方法(0)

libpml使用pip安装错误

这是我的错误:

(mysite)zjm1126@zjm1126-G41MT-S2:~/zjm_test/mysite$ pip install lxml
Downloading/unpacking lxml
  Running setup.py egg_info for package lxml
    Building lxml version 2.3.
    Building without Cython.
    ERROR: /bin/sh: xslt-config: not found

    ** make sure the development packages of libxml2 and libxslt are installed **

    Using build configuration of libxslt
Installing collected packages: lxml
  Running setup.py install for lxml
    Building lxml version 2.3.
    Building without Cython.
    ERROR: /bin/sh: xslt-config: not found

    ** make sure the development packages of libxml2 and libxslt are installed **

    Using build configuration …
Run Code Online (Sandbox Code Playgroud)

python lxml pip

262
推荐指数
11
解决办法
27万
查看次数

为什么python setup.py在Travis CI上说无效命令'bdist_wheel'?

我的Python软件包有一个setup.py可以在Ubuntu Trusty上本地构建并在一个新的Vagrant Ubuntu Trusty VM上构建,当我像这样配置它时:

sudo apt-get install python python-dev --force-yes --assume-yes --fix-broken
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python2.7
sudo -H pip install setuptools wheel virtualenv --upgrade
Run Code Online (Sandbox Code Playgroud)

但是当我在Travis CI Trusty Beta VM上做同样的事情时:

- sudo apt-get install python python-dev --force-yes --assume-yes --fix-broken
- curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python2.7
- sudo -H pip install setuptools wheel virtualenv --upgrade
Run Code Online (Sandbox Code Playgroud)

我明白了:

python2.7 setup.py bdist_wheel
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help …
Run Code Online (Sandbox Code Playgroud)

python pypi setup.py travis-ci

200
推荐指数
14
解决办法
18万
查看次数

错误:安装mysqlclient时命令'x86_64-linux-gnu-gcc'

我在virtualenv中安装了django 1.8.5并使用python 3.4.3工作时使用sqlite 显示了它的工作页面

我想使用mysql,我正在尝试使用mysqlclient

pip install mysqlclient

我收到以下消息

----------------------------------------
Failed building wheel for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient
Complete output from command /home/sasidhar/django/env/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-5lj39q67/mysqlclient/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-da2_35zs-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/sasidhar/django/env/include/site/python3.4/mysqlclient:
running install
running build
running build_py
copying MySQLdb/release.py -> build/lib.linux-x86_64-3.4/MySQLdb
running build_ext
building '_mysql' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 …
Run Code Online (Sandbox Code Playgroud)

mysql django python-3.4

10
推荐指数
4
解决办法
1万
查看次数

安装 datadotworld 时 cchardet 的构建轮失败

datadotworld我在安装涉及 cchardet 的模块时遇到错误。我已经安装了该软件包,但仍然收到此错误。请帮我找到解决方案。这是完整的错误消息:

  Building wheels for collected packages: cchardet
  Building wheel for cchardet (setup.py) ... error
  Complete output from command c:\users\hp\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\hp\\AppData\\Local\\Temp\\pip-install-twscuztm\\cchardet\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\hp\AppData\Local\Temp\pip-wheel-xemo8o53 --python-tag cp37:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win32-3.7
  creating build\lib.win32-3.7\cchardet
  copying src\cchardet\version.py -> build\lib.win32-3.7\cchardet
  copying src\cchardet\__init__.py -> build\lib.win32-3.7\cchardet
  running build_ext
  building 'cchardet._cchardet' extension
  creating build\temp.win32-3.7
  creating build\temp.win32-3.7\Release
  creating build\temp.win32-3.7\Release\src
  creating build\temp.win32-3.7\Release\src\cchardet
  creating build\temp.win32-3.7\Release\src\ext
  creating build\temp.win32-3.7\Release\src\ext\libcharsetdetect
  creating build\temp.win32-3.7\Release\src\ext\libcharsetdetect\mozilla
  creating build\temp.win32-3.7\Release\src\ext\libcharsetdetect\mozilla\extensions
  creating build\temp.win32-3.7\Release\src\ext\libcharsetdetect\mozilla\extensions\universalchardet …
Run Code Online (Sandbox Code Playgroud)

windows failed-installation python-3.x

8
推荐指数
2
解决办法
2万
查看次数

安装了 python-dev 的 Ubuntu 18 上缺少 python.h

尝试让 fHDHR 在 Ubuntu 18 上工作。在安装过程中,我收到此错误:

include/python3.8 -c src/gevent/libev/corecext.c -o build/temp.linux-x86_64-3.8/src/gevent/libev/corecext.o
  src/gevent/libev/corecext.c:95:10: fatal error: Python.h: No such file or directory
   #include "Python.h"
            ^~~~~~~~~~
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for gevent
Run Code Online (Sandbox Code Playgroud)

我找到的大多数答案告诉我我需要安装 python-dev 但它已经安装了(并且已更新)。在这篇文章中,推荐 sudo pip install mmh3 我尝试过,但也失败了,因为无法找到 python.h

知道我的系统中缺少什么吗?

python ubuntu-18.04 python-3.8

6
推荐指数
1
解决办法
9675
查看次数

sudo pip install python-Levenshtein失败,错误代码为1

我正在尝试在linux上安装python-Levenshtein库,但每当我尝试通过以下方式安装它:

sudo pip install python-Levenshtein
Run Code Online (Sandbox Code Playgroud)

我收到此错误:

命令"/ usr/bin/python -c"import setuptools,tokenize; file ='/ tmp/pip-build-LAmG4b/python-Levenshtein/setup.py'; exec(compile(getattr(tokenize,'open',open)(file).read().replace('\ r \nn ','\n'),file,'exec'))"install --record /tmp/pip-KGiQPH-record/install-record.txt --single-version-external-managed --compile"失败并出现错误/ tmp/pip-build-LAmG4b/python-Levenshtein中的代码1

错误代码:错误:命令'gcc'失败,退出状态为1

我正在使用debian linux.

python linux

5
推荐指数
2
解决办法
5455
查看次数

在Ubuntu 18.04上为python安装mysqlclient时出错

我在Ubuntu上安装了Python 2.7.15rci和Python 3.6.7。当我在virtualenv上执行“点列表”时,它返回我:

Django (2.1.5)
pip (9.0.1)
pkg-resources (0.0.0)
pytz (2018.9)
setuptools (39.0.1)
wheel (0.32.3)
Run Code Online (Sandbox Code Playgroud)

我正在尝试安装mysqlclient(pip install mysqlclient)并返回错误。

  unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for mysqlclient
  Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
  Running setup.py install for mysqlclient ... error
    Complete output from command /home/david/env/project/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-pq18uxjj/mysqlclient/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-y28h4ou0-record/install-record.txt --single-version-externally-managed …
Run Code Online (Sandbox Code Playgroud)

mysql django pip mysql-python python-3.x

3
推荐指数
3
解决办法
1891
查看次数

How to fix error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

I'm trying to install odoo on a fresh installation of Linux on a VirtualBox machine. I have entered in the commands found here as is: Odoo Development Read the Docs. The following command is what prompts the error: command 'x86_64-linux-gnu-gcc' failed with exit status 1:

sudo pip install -r requirements.txt
Run Code Online (Sandbox Code Playgroud)

So now I'm trying to solve the problem. I have gone to error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1,error: command 'gcc' …

c++ python linux gcc openerp

1
推荐指数
1
解决办法
2万
查看次数

TA-Lib安装错误

我正在尝试使用pip在Debian Jessie上安装TA-Lib.但是我遇到以下错误:

#include "ta-lib/ta_defs.h"
                            ^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)

这只是错误的一小部分.我试过这个帖子提到安装以下包:

sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev

sudo easy_install greenlet

sudo easy_install gevent
Run Code Online (Sandbox Code Playgroud)

没有太多运气.我在VPS上使用python 3.4,如果它有所作为.关于如何解决这个问题的任何想法?谢谢

python linux debian

1
推荐指数
1
解决办法
1542
查看次数

ubuntu 16.04 python 3.7.4 pip mysqlclient错误

我想在我的 ubuntu 服务器上安装 mysqlclient。

python版本是3.7.4。

但我无法安装这个包。(在3.6.5中安装得很好)

这是错误消息。

(tmp) ubuntu@orcinus:~$ pip install mysqlclient
Collecting mysqlclient
  Using cached https://files.pythonhosted.org/packages/4d/38/c5f8bac9c50f3042c8f05615f84206f77f03db79781db841898fde1bb284/mysqlclient-1.4.4.tar.gz
Building wheels for collected packages: mysqlclient
  Building wheel for mysqlclient (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/ubuntu/tmp/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4oxpmvqx/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4oxpmvqx/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-1lcdb63b --python-tag cp37
       cwd: /tmp/pip-install-4oxpmvqx/mysqlclient/
  Complete output (29 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  creating build/lib.linux-x86_64-3.7/MySQLdb
  copying MySQLdb/__init__.py …
Run Code Online (Sandbox Code Playgroud)

python mysql pip

1
推荐指数
1
解决办法
1751
查看次数