Python 2.7:没有名为设置工具的模块

时间:2017-04-09 22:57:58

标签: python python-2.7 installation

我正在尝试从github克隆并安装keras包。当我运行sudo python setup.py install时,它会显示no module named setuptools。我看了一些python 3的帖子;但是,这个解决方案对我不起作用。我正在从Windows计算机上工作。我正在使用python 2.7。我尝试了以下命令:python -m pip install -U pip setuptools来自此网站:https://packaging.python.org/installing/。然而,似乎没有任何工作。

1 个答案:

答案 0 :(得分:1)

If you are working on Windows then you should be typing batch commands, not bash (Linux, OSX), therefore, sudo ... should not be used by you.

  • Firstly, I would recommend to install pip, it will make package update and installation a lot easier. Save it as get-pip.py and run the following in the directory the file is located python get-pip.py. Official pip website.

  • Then install upgrade pip which will also install the latest versions of setuptools and wheel with this python -m pip install -U pip setuptools.