xlearn icon indicating copy to clipboard operation
xlearn copied to clipboard

pip3 install xlearn failed

Open johnwanggithub opened this issue 5 years ago • 3 comments

hi there,

when I tried to install xlearn on centos with pip3, it doesn't work.do you know why? thanks a lot.

Collecting xlearn Using cached https://files.pythonhosted.org/packages/ab/1b/9ad0093cac05d6f95d3d768bc855804b18723c72120ce45cd930bd303587/xlearn-0.40a1.tar.gz Building wheels for collected packages: xlearn Running setup.py bdist_wheel for xlearn ... error Complete output from command /opt/xxx/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-cf817976/xlearn/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/pip-wheel-4mwv9jo7 --python-tag cp36: /opt/xxx/anaconda3/lib/python3.6/site-packages/setuptools/dist.py:470: UserWarning: Normalizing '0.40.a1' to '0.40a1' normalized_version, running bdist_wheel running build running build_py Traceback (most recent call last): File "/tmp/pip-install-cf817976/xlearn/setup.py", line 37, in silent_call subprocess.check_output(cmd, stderr=shut_up) File "/opt/xxx/anaconda3/lib/python3.6/subprocess.py", line 336, in check_output **kwargs).stdout File "/opt/xxx/anaconda3/lib/python3.6/subprocess.py", line 418, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['make', '-j4']' returned non-zero exit status 2.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-cf817976/xlearn/setup.py", line 126, in url='https://github.com/aksnzhy/xlearn') File "/opt/xxx/anaconda3/lib/python3.6/site-packages/setuptools/init.py", line 143, in setup return distutils.core.setup(**attrs) File "/opt/xxx/anaconda3/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/opt/xxx/anaconda3/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/opt/xxx/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/opt/xxx/anaconda3/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 204, in run self.run_command('build') File "/opt/xxx/anaconda3/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/xxx/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/opt/xxx/anaconda3/lib/python3.6/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/opt/xxx/anaconda3/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/xxx/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/tmp/pip-install-cf817976/xlearn/setup.py", line 104, in run compile_cpp() File "/tmp/pip-install-cf817976/xlearn/setup.py", line 77, in compile_cpp error_msg='An error has occurred while building xlearn library file') File "/tmp/pip-install-cf817976/xlearn/setup.py", line 41, in silent_call raise Exception(error_msg); Exception: An error has occurred while building xlearn library file


Failed building wheel for xlearn Running setup.py clean for xlearn Failed to build xlearn Installing collected packages: xlearn Running setup.py install for xlearn ... error Complete output from command /opt/xxx/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-cf817976/xlearn/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-w_1vhiru/install-record.txt --single-version-externally-managed --compile: /opt/xxx/anaconda3/lib/python3.6/site-packages/setuptools/dist.py:470: UserWarning: Normalizing '0.40.a1' to '0.40a1' normalized_version, running install running build running build_py Traceback (most recent call last): File "/tmp/pip-install-cf817976/xlearn/setup.py", line 37, in silent_call subprocess.check_output(cmd, stderr=shut_up) File "/opt/xxx/anaconda3/lib/python3.6/subprocess.py", line 336, in check_output **kwargs).stdout File "/opt/xxx/anaconda3/lib/python3.6/subprocess.py", line 418, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['make', '-j4']' returned non-zero exit status 2.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-cf817976/xlearn/setup.py", line 126, in <module>
    url='https://github.com/aksnzhy/xlearn')
  File "/opt/xxx/anaconda3/lib/python3.6/site-packages/setuptools/__init__.py", line 143, in setup
    return distutils.core.setup(**attrs)
  File "/opt/xxx/anaconda3/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/opt/xxx/anaconda3/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/opt/xxx/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/tmp/pip-install-cf817976/xlearn/setup.py", line 93, in run
    install.run(self)
  File "/opt/xxx/anaconda3/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
  File "/opt/xxx/anaconda3/lib/python3.6/distutils/command/install.py", line 545, in run
    self.run_command('build')
  File "/opt/xxx/anaconda3/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/opt/xxx/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/opt/xxx/anaconda3/lib/python3.6/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/opt/xxx/anaconda3/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/opt/xxx/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/tmp/pip-install-cf817976/xlearn/setup.py", line 104, in run
    compile_cpp()
  File "/tmp/pip-install-cf817976/xlearn/setup.py", line 77, in compile_cpp
    error_msg='An error has occurred while building xlearn library file')
  File "/tmp/pip-install-cf817976/xlearn/setup.py", line 41, in silent_call
    raise Exception(error_msg);
Exception: An error has occurred while building xlearn library file

----------------------------------------

Command "/opt/xxx/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-cf817976/xlearn/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-w_1vhiru/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-cf817976/xlearn/

johnwanggithub avatar Jan 02 '19 11:01 johnwanggithub

@johnwanggithub subprocess.CalledProcessError: Command '['make', '-j4']' returned non-zero exit status 2.

It seems that you machine cannot support C++ compiler. Can you check it?

aksnzhy avatar Jan 04 '19 08:01 aksnzhy

thanks a lot for reply.

my machine env is : CentOS release 6.7 (Final)

g++ --version g++ (GCC) 6.4.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

gcc --version gcc (GCC) 6.4.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

what do you mean by"can not support C++compiler" 不能支持C++ compiler啥意思。。

johnwanggithub avatar Jan 04 '19 08:01 johnwanggithub

I encountered the same issue

LiutongZhou avatar Apr 08 '20 02:04 LiutongZhou