相关疑难解决方法(0)

没有名为MySQLdb的模块

我使用的是Python 2.5.4版,并安装了MySQL 5.0和Django.Django可以正常使用Python,但不适用于MySQL.我在Windows Vista中使用它.

python django python-2.x

365
推荐指数
19
解决办法
55万
查看次数

Python SciPy需要BLAS吗?

numpy.distutils.system_info.BlasNotFoundError: 
    Blas (http://www.netlib.org/blas/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [blas]) or by setting
    the BLAS environment variable.
Run Code Online (Sandbox Code Playgroud)

我需要从这个网站下载哪个tar?

我已经尝试了fortrans,但我一直收到这个错误(显然在设置了环境变量之后).

python scipy

173
推荐指数
5
解决办法
12万
查看次数

如何从命令行安装cygwin组件?

在Cygwin包中是否有类似于apt-getDebian或yumredhat的工具允许我从命令行安装组件?

command-line cygwin

166
推荐指数
5
解决办法
19万
查看次数

我的Ubuntu系统上有Python,但是gcc找不到Python.h

我在学校的电脑上,所以我无法安装任何东西.

我正在尝试创建可以在Python中运行的C代码.看来我发现的所有文章都要求你使用

#include <Python.h>
Run Code Online (Sandbox Code Playgroud)

我这样做,但是当我编译它时抱怨没有这样的文件或目录.

计算机有Python(至少它python在终端中有命令,我们可以运行我们想要的任何Python代码).

我输入locate Python.h了终端,但没有发现任何东西.

我有两个问题:

  1. 我可以编写可以在Python中调用的C代码Python.h吗?

  2. 我错过了什么,计算机实际上有Python.h吗?

c python ubuntu header

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

在python3.3上安装numpy - 为python3安装pip

对于我使用的python 3.2 sudo apt-get install python3.2-numpy.它工作.怎么做python3.3?没有什么我能想到的工作.同样适用于scipy等.谢谢.

编辑:这是它的样子

radu@sunlit-inspired:~$ python3
Python 3.3.2 (default, Jul  3 2013, 10:17:40) 
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'numpy'
Run Code Online (Sandbox Code Playgroud)

numpy python-3.x

36
推荐指数
4
解决办法
14万
查看次数

为scipy安装BLAS和LAPACK的最简单方法是什么?

我想运行一个别人准备的程序,它包括scipy.我曾尝试安装scipy

pip install scipy
Run Code Online (Sandbox Code Playgroud)

但它给了我一个很长的错误.我知道Anaconda和Canopy有各种各样的方法,但我认为这些方法很长.我想要一个简短的方法.我也试过了

G:\determinator_Oskar>pip install scipy
Collecting scipy
  Using cached scipy-0.16.1.tar.gz
Building wheels for collected packages: scipy
  Running setup.py bdist_wheel for scipy
  Complete output from command g:\myve\scripts\python.exe -c "import setuptools;
__file__='e:\\temp_n~1\\pip-build-1xigxu\\scipy\\setup.py';exec(compile(open(__f
ile__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d e:\temp_
n~1\tmp07__zrpip-wheel-:
  lapack_opt_info:
  openblas_lapack_info:
    libraries openblas not found in ['g:\\myve\\lib', 'C:\\']
    NOT AVAILABLE

  lapack_mkl_info:
  mkl_info:
    libraries mkl,vml,guide not found in ['g:\\myve\\lib', 'C:\\']
    NOT AVAILABLE

    NOT AVAILABLE

  atlas_3_10_threads_info:
  Setting PTATLAS=ATLAS
    libraries tatlas,tatlas not found in g:\myve\lib
    libraries lapack_atlas not found in g:\myve\lib …
Run Code Online (Sandbox Code Playgroud)

python numpy

36
推荐指数
4
解决办法
9万
查看次数

"错误:命令'x86_64-linux-gnu-gcc'以退出状态1失败"在virtualenv中

环境:Linux Mint 17 Cinnamon.

显示此错误:

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)

在以下情况下尝试以下内容时virtualenv:

pip install lxml
pip install pillow
pip install pycrypto
pip install pymongo (fails but still shows in pip freeze)
Run Code Online (Sandbox Code Playgroud)

这里有几个解决方案建议安装python2.7-dev:

安装Pillow错误:安装脚本退出并显示错误:命令'x86_64-linux-gnu-gcc'失败,退出状态为1

通过pip安装错误在virtualenv中安装lxml:命令'x86_64-linux-gnu-gcc'失败

枕头安装错误:命令'gcc'失败,退出状态为1

致命错误:Python.h:没有这样的文件或目录

我对这个建议很困惑,因为我的理解是使用类似的东西:

sudo apt-get install python2.7-dev
Run Code Online (Sandbox Code Playgroud)

将它添加到Python的main*system*实例中,而不是将其添加到Python中virtualenv.(见 - https://unix.stackexchange.com/a/56392/92486)

我可以python2.7-dev只添加到virtualenvPython 的版本吗?

pip virtualenv linux-mint python-2.7

25
推荐指数
3
解决办法
7万
查看次数

在CentOS上找不到Python.h文件

我正在尝试在CentOS机器上编译用C编写的Python扩展.我正进入(状态

error: Python.h: No such file or directory
Run Code Online (Sandbox Code Playgroud)

它在ubuntu上运行正常,我使用apt-get安装了python-dev.

我尝试使用安装python-devel

yum install python-devel
Run Code Online (Sandbox Code Playgroud)

但它已经安装好了.我该如何解决这个错误?

c python centos

23
推荐指数
3
解决办法
5万
查看次数

如何为Cygwin安装apt-cyg?

在这里采取形式- 解释如何安装apt-cyg

安装apt-cyg

你可能听说过的和apt-get(Ubuntu的),百胜/ DNF(Fedora的),吃豆子(ARCH),或冲泡键(Mac OS X)... ..关于Cygwin的.The类似的程序叫apt-CYG程序.

安装apt-cyg很简单.首先,保存此文件:https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg.然后,使用文件资源管理器在"下载"文件夹中查找该文件,并将其移动到C:\ cygwin\bin中.然后,打开Cygwin并输入"chmod + x/bin/apt-cyg".这告诉Cygwin你希望能够执行apt-cyg命令.最后,输入"apt- cyg mirror ftp://sourceware.org/pub/cygwin ".这会设置apt-cyg以在下载程序时使用官方存储库.

听起来很简单.但我有一个错误.

本教程未指定保存该文件的名称和扩展名.

apt-cyg.txt把它保存为,并将其移入C:\cygwin64\bin

这不起作用.运行时apt-cyg,我收到错误:bad interpreter: No such file or directory

如何为Cygwin安装apt-cyg?  - 错误

我的猜测是扩展或文件名很糟糕.我应该使用什么名称和扩展名?

这个过程还有更多步骤吗?

注意:我刚刚在Windows 10上安装了cygwin.请不要假设我已经安装了其他工具.

cygwin

19
推荐指数
5
解决办法
3万
查看次数

编译Cython扩展错误 - Pycharm IDE

非零退出代码(1): _ pydevd_bundle/pydevd_cython.c:13:20:致命错误:Python.h:没有此类文件或目录编译终止.错误:命令'x86_64-linux-gnu-gcc'以退出状态1失败

请帮我解决尝试在PyCharm中安装Cython的错误.

python compiler-errors cython pycharm python-3.x

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