开发者社区> 问答> 正文

初学Python,只会写简单的代码。手头有份Python代码,但是调用C模块生成?报错

报错内容如下:

Traceback (most recent call last):
  File "E:\Python27\setup.py", line 16, in <module>
    from setuptools import setup, find_packages
ImportError: No module named setuptools

我在调试之前,做了以下相关的安装:

[Cython](www.cython.org). Runtime requirements are the 
Python packages [numpy](www.numpy.org), [scipy](www.scipy.org),
[dateutil](https://labix.org/python-dateutil), [sqlalchemy](www.sqlalchemy.org), 
[sympy](http://sympy.org) and [jinja2](http://jinja.pocoo.org). The setup.py script described below
will pull these requirements automatically, but depending on your OS you might favor to install
them using your system's package manager.
Some of the decoder implementations require additional software, namely 
[GLPK](http://www.gnu.org/software/glpk/) (with C headers),
[IBM CPLEX](http://www.ibm.com/software/commerce/optimization/cplex-optimizer/), and
[Gurobi](http://gurobi.com). The first is open source, the others have free academic licenses
available.


We use the alternative gurobi python API called [gurobimh](https://github.com/supermihi/gurobimh).

有哪位大神指点,感激不尽!!

展开
收起
爱吃鱼的程序员 2020-06-10 10:15:54 571 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    错误好像是你没有安装 <spanstyle="font-family:方正悠黑,Verdana,sans-serif,宋体;font-size:14px;line-height:22px;background-color:#FFFFFF;">setuptools这个模块。用pip安装或者你搜一下怎么安装要么没安装上;要么安装了,但路径没添加到PYTHONPATH中

    2020-06-10 10:16:11
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
From Python Scikit-Learn to Sc 立即下载
Data Pre-Processing in Python: 立即下载
双剑合璧-Python和大数据计算平台的结合 立即下载