编译过程中出现importerror "No Module named Setuptools"错误,需要把Setuptools安装一下
sudo apt-get install python-setuptoolspython 3.x 安装命令:
sudo apt-get install python3-setuptoolsapt-get命令出现错误
Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: libpython3.5-dev : Depends: libpython3.5-stdlib (= 3.5.1-10) but 3.5.2-2ubuntu0~16.04.1 is to be installed Depends: libpython3.5 (= 3.5.1-10) but 3.5.2-2ubuntu0~16.04.1 is to be installed E: Unable to correct problems, you have held broken packages.解决方法:使用aptitude工具下载:aptitude 与 apt-get 一样,是 Debian 及其衍生系统中功能极其强大的包管理工具。与 apt-get 不同的是,aptitude 在处理依赖问题上更佳一些。
sudo apt-get install aptitude # 重新下载 sudo aptitude install python3-setuptools在lightgbm包下有python-package包,进去安装即可,注意可能有提醒 permission denied,所以加上 --user。如果安装python2版本则只需改为 python setup.py install --user 即可。