mrzv / dionysus

Library for computing persistent homology
http://mrzv.org/software/dionysus2
Other
145 stars 31 forks source link

error: --single-version-externally-managed --compile" failed with error code 1 #9

Closed Harleylee closed 6 years ago

Harleylee commented 6 years ago

Hi, I get an installation error when trying to install "dionysus 2" under Windows 10 x64. python 3.6 when I do pip install --verbose dionysus, the error shows below (I have the updated pip, setuptools and wheel ) please tell me if need any more information

CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: Boost_INCLUDE_DIR (ADVANCED) used as include directory in directory C:/Users/HL~~~/AppData/Local/Temp/pip-build-bh2npfav/dionysus/bindings/python used as include directory in directory C:/Users/HL~~~/AppData/Local/Temp/pip-build-bh2npfav/dionysus/bindings/python

-- Configuring incomplete, errors occurred!
See also "C:/Users/HL~~~/AppData/Local/Temp/pip-build-bh2npfav/dionysus/build/temp.win-amd64-3.6/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\HL~~~\AppData\Local\Temp\pip-build-bh2npfav\dionysus\setup.py", line 97, in <module>
    zip_safe=False,
  File "E:\PYTHON\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "E:\PYTHON\lib\distutils\dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "E:\PYTHON\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "E:\PYTHON\lib\site-packages\setuptools\command\install.py", line 61, in run
    return orig.install.run(self)
  File "E:\PYTHON\lib\distutils\command\install.py", line 545, in run
    self.run_command('build')
  File "E:\PYTHON\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "E:\PYTHON\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "E:\PYTHON\lib\distutils\command\build.py", line 135, in run
    self.run_command(cmd_name)
  File "E:\PYTHON\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "E:\PYTHON\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "C:\Users\HL~~~\AppData\Local\Temp\pip-build-bh2npfav\dionysus\setup.py", line 39, in run
    self.build_extension(ext)
  File "C:\Users\HL~~~\AppData\Local\Temp\pip-build-bh2npfav\dionysus\setup.py", line 64, in build_extension
    subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
  File "E:\PYTHON\lib\subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\HL~~~\\AppData\\Local\\Temp\\pip-build-bh2npfav\\dionysus', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\HL~~~\\AppData\\Local\\Temp\\pip-build-bh2npfav\\dionysus\\build\\lib.win-amd64-3.6', '-DPYTHON_EXECUTABLE=E:\\PYTHON\\python.exe', '-Dbuild_examples=OFF', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\HL~~~\\AppData\\Local\\Temp\\pip-build-bh2npfav\\dionysus\\build\\lib.win-amd64-3.6', '-A', 'x64']' returned non-zero exit status 1.
Running setup.py install for dionysus: finished with status 'error'

Cleaning up... Removing source in C:\Users\HL~~~\AppData\Local\Temp\pip-build-bh2npfav\dionysus Command "E:\PYTHON\python.exe -u -c "import setuptools, tokenize;file='C:\Users\HL~\AppData\Local\Temp\pip-build-bh2npfav\dionysus\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\HL~\AppData\Local\Temp\pip-__2fd0ic-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\HL~~~\AppData\Local\Temp\pip-build-bh2npfav\dionysus\ Exception information: Traceback (most recent call last): File "E:\PYTHON\lib\site-packages\pip\basecommand.py", line 215, in main status = self.run(options, args) File "E:\PYTHON\lib\site-packages\pip\commands\install.py", line 342, in run prefix=options.prefix_path, File "E:\PYTHON\lib\site-packages\pip\req\req_set.py", line 784, in install **kwargs File "E:\PYTHON\lib\site-packages\pip\req\req_install.py", line 878, in install spinner=spinner, File "E:\PYTHON\lib\site-packages\pip\utils__init.py", line 707, in call_subprocess % (command_desc, proc.returncode, cwd)) pip.exceptions.InstallationError: Command "E:\PYTHON\python.exe -u -c "import setuptools, tokenize;file='C:\Users\HL~~~\AppData\Local\Temp\pip-build-bh2npfav\dionysus\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\HL~~~\AppData\Local\Temp\pip-2fd0ic-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\HL~~~\AppData\Local\Temp\pip-build-bh2npfav\dionysus\

mrzv commented 6 years ago

Unfortunately, I don't use Windows, so it's next to impossible for me to debug this. The first few lines indicate that you don't have Boost installed, so that would be the first step.

Harleylee commented 6 years ago

Thanks so much for your reply, I do have boost-python(1.63). I followed the instruction of Boost (http://www.boost.org/) and installed it by Visual Studio 2015.. I am not sure is this the problem or should I install it directly on python?

mrzv commented 6 years ago

You don't need boost-python, but you need all the rest of Boost. I'm not quite sure how this works with Visual Studio, but the point is that CMake is not finding Boost.

freckletonj commented 6 years ago

for anyone else coming to this problem on Ubuntu, and since Boost's install instructions are awkward, check the ubuntu package repos, this solved it for me:

apt install libboost-all-dev