-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meet error when using python setup.py install #11
Comments
Of course, you should add import distutils.sysconfig as sysconfig and from distutils.sysconfig import get_python_inc |
It is still not working even after the suggested change and giving the same error as before, please can you check the code again and suggest some other changes for the error |
@ahiliitb Please double-check your env and the error information. Check more details here about installing diffvg: https://github.com/BachiLi/diffvg |
@ma-xu I am just running the colab file :https://colab.research.google.com/drive/1s108WmqSVH9MILOjSAu29QyAEjExOWAP?usp=sharing |
I am encountering a similar issue. The code given in the Google Colab file just gives an error when I Run All. !sudo apt-get install -y libsdl2-image-dev
!git submodule update --init --recursive
!python3 setup.py install
%cd .. And the error received is: -- Configuring incomplete, errors occurred!
See also "/content/LIVE/DiffVG/build/temp.linux-x86_64-cpython-310/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "/content/LIVE/DiffVG/setup.py", line 91, in <module>
setup(name = 'diffvg',
File "/usr/local/lib/python3.10/dist-packages/setuptools/__init__.py", line 107, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.10/dist-packages/setuptools/dist.py", line 1244, in run_command
super().run_command(command)
File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.10/dist-packages/setuptools/command/install.py", line 80, in run
self.do_egg_install()
File "/usr/local/lib/python3.10/dist-packages/setuptools/command/install.py", line 129, in do_egg_install
self.run_command('bdist_egg')
File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.10/dist-packages/setuptools/dist.py", line 1244, in run_command
super().run_command(command)
File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.10/dist-packages/setuptools/command/bdist_egg.py", line 164, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/usr/local/lib/python3.10/dist-packages/setuptools/command/bdist_egg.py", line 150, in call_command
self.run_command(cmdname)
File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.10/dist-packages/setuptools/dist.py", line 1244, in run_command
super().run_command(command)
File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.10/dist-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/command/install_lib.py", line 111, in build
self.run_command('build_ext')
File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.10/dist-packages/setuptools/dist.py", line 1244, in run_command
super().run_command(command)
File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/content/LIVE/DiffVG/setup.py", line 31, in run
super().run()
File "/usr/local/lib/python3.10/dist-packages/setuptools/command/build_ext.py", line 84, in run
_build_ext.run(self)
File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
self.build_extensions()
File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
self._build_extensions_serial()
File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
self.build_extension(ext)
File "/content/LIVE/DiffVG/setup.py", line 64, in build_extension
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/content/LIVE/DiffVG', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/content/LIVE/DiffVG/build/lib.linux-x86_64-cpython-310', '-DPYTHON_INCLUDE_PATH=/usr/include/python3.10', '-DCMAKE_BUILD_TYPE=Release', '-DDIFFVG_CUDA=1']' returned non-zero exit status 1.
/content/LIVE This further causes an error where they say that DiffVG Module is not found. The entire code is the same as what is given in the google colab link on this Github Repo. Can anyone please help me with how I can solve this issue? |
I did not encounter this issue when using the original administrator account on the Linux virtual machine. However, when I switched to a newly created account and tried to build the environment using Miniconda, I encountered an error while using "python setup.py install": "Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)."
To resolve this issue, I modified line 41 in setup.py from:
cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir, '-DPYTHON_INCLUDE_PATH=' + include_path]
to:
cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir, '-DPYTHON_INCLUDE_DIR=' + get_python_inc(), '-DPYTHON_LIBRARY=' + sysconfig.get_config_var('LIBDIR')].
The text was updated successfully, but these errors were encountered: