安装lightgbm报错ModuleNotFoundError: No module named 'setuptools.wheel'

Mac安装lightgbm命令

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

brew install cmake
brew install gcc --without-multilib

git clone --recursive https://github.com/Microsoft/LightGBM ; cd LightGBM
mkdir build ; cd build
cmake ..
make -j4
 
cd ../python-package
sudo python setup.py install

pip install lightgbm

在进行到sudo python setup,py install时报错

Traceback (most recent call last):
  File "setup.py", line 299, in 
    'Topic :: Scientific/Engineering :: Artificial Intelligence'])
  File "/Users/hely/anaconda/envs/python36/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/Users/hely/anaconda/envs/python36/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/Users/hely/anaconda/envs/python36/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/Users/hely/anaconda/envs/python36/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "setup.py", line 223, in run
    install.run(self)
  File "/Users/hely/anaconda/envs/python36/lib/python3.6/site-packages/setuptools/command/install.py", line 65, in run
    orig.install.run(self)
  File "/Users/hely/anaconda/envs/python36/lib/python3.6/distutils/command/install.py", line 557, in run
    self.run_command(cmd_name)
  File "/Users/hely/anaconda/envs/python36/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/Users/hely/anaconda/envs/python36/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/Users/hely/anaconda/envs/python36/lib/python3.6/site-packages/setuptools/command/install_scripts.py", line 17, in run
    import setuptools.command.easy_install as ei
  File "/Users/hely/anaconda/envs/python36/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 52, in 
    from setuptools.package_index import (
  File "/Users/hely/anaconda/envs/python36/lib/python3.6/site-packages/setuptools/package_index.py", line 31, in 
    from setuptools.wheel import Wheel
ModuleNotFoundError: No module named 'setuptools.wheel'

尝试了使用命令conda update --all对所有包进行更新,并没有setuptools的更新

但在anaconda navigator中有可更新版本,就更了个新,就好了emmmm

我是之前pip、setoptools都没问题的,突然出现问题,怀疑是早上更新版本玄学了

查了好久结果更新就好了2333

你可能感兴趣的:(安装lightgbm报错ModuleNotFoundError: No module named 'setuptools.wheel')