Skip to content
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

error buiding wheel for esim_py #48

Open
TensorFlowing opened this issue Apr 28, 2022 · 5 comments
Open

error buiding wheel for esim_py #48

TensorFlowing opened this issue Apr 28, 2022 · 5 comments

Comments

@TensorFlowing
Copy link

TensorFlowing commented Apr 28, 2022

I got a confusing error when buiding wheel for esim_py.
I followed the README:
$ cd esim_py
$ pip install .

And I got the following error message:

Building wheels for collected packages: esim-py
Building wheel for esim-py (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/bob/anaconda3/envs/vid2e/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-jg63bbet/setup.py'"'"'; file='"'"'/tmp/pip-req-build-jg63bbet/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-s032vb4j
cwd: /tmp/pip-req-build-jg63bbet/
Complete output (44 lines):
running bdist_wheel
running build
running build_ext
CMake Error: The current CMakeCache.txt directory /tmp/pip-req-build-jg63bbet/build/temp.linux-x86_64-3.9/CMakeCache.txt is different than the directory /media/bob/Seagate/z_event_camera/rpg_vid2e-master/esim_py/build/temp.linux-x86_64-3.9 where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt
CMake Error: The source "/tmp/pip-req-build-jg63bbet/CMakeLists.txt" does not match the source "/media/bob/Seagate/z_event_camera/rpg_vid2e-master/esim_py/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory.
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-req-build-jg63bbet/setup.py", line 53, in
setup(
File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/init.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/tmp/pip-req-build-jg63bbet/setup.py", line 31, in run
self.build_extension(ext)
File "/tmp/pip-req-build-jg63bbet/setup.py", line 49, in build_extension
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-req-build-jg63bbet', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-req-build-jg63bbet/build/lib.linux-x86_64-3.9', '-DPYTHON_EXECUTABLE=/home/bob/anaconda3/envs/vid2e/bin/python', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.

ERROR: Failed building wheel for esim-py
Running setup.py clean for esim-py
Failed to build esim-py
Installing collected packages: esim-py
Running setup.py install for esim-py ... error
ERROR: Command errored out with exit status 1:
command: /home/bob/anaconda3/envs/vid2e/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-jg63bbet/setup.py'"'"'; file='"'"'/tmp/pip-req-build-jg63bbet/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-ua79m_eq/install-record.txt --single-version-externally-managed --compile --install-headers /home/bob/anaconda3/envs/vid2e/include/python3.9/esim-py
cwd: /tmp/pip-req-build-jg63bbet/
Complete output (82 lines):
running install
/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_ext
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /home/bob/anaconda3/envs/vid2e/bin/python (found version "3.9.12")
-- Found PythonLibs: /home/bob/anaconda3/envs/vid2e/lib/libpython3.9.so
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Found pybind11: /home/bob/anaconda3/envs/vid2e/include (found version "2.6.1" )
CMake Error at CMakeLists.txt:5 (find_package):
By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "OpenCV", but
CMake did not find one.

  Could not find a package configuration file provided by "OpenCV" with any
  of the following names:

    OpenCVConfig.cmake
    opencv-config.cmake

  Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
  "OpenCV_DIR" to a directory containing one of the above files.  If "OpenCV"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!
See also "/tmp/pip-req-build-jg63bbet/build/temp.linux-x86_64-3.9/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-req-build-jg63bbet/setup.py", line 53, in <module>
    setup(
  File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
  File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 148, in setup
    return run_commands(dist)
  File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
    dist.run_commands()
  File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
    self.run_command(cmd)
  File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command
    super().run_command(command)
  File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
    cmd_obj.run()
  File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/command/install.py", line 68, in run
    return orig.install.run(self)
  File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/_distutils/command/install.py", line 664, in run
    self.run_command('build')
  File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command
    super().run_command(command)
  File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
    cmd_obj.run()
  File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command
    super().run_command(command)
  File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
    cmd_obj.run()
  File "/tmp/pip-req-build-jg63bbet/setup.py", line 31, in run
    self.build_extension(ext)
  File "/tmp/pip-req-build-jg63bbet/setup.py", line 49, in build_extension
    subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
  File "/home/bob/anaconda3/envs/vid2e/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-req-build-jg63bbet', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-req-build-jg63bbet/build/lib.linux-x86_64-3.9', '-DPYTHON_EXECUTABLE=/home/bob/anaconda3/envs/vid2e/bin/python', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
----------------------------------------

ERROR: Command errored out with exit status 1: /home/bob/anaconda3/envs/vid2e/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-jg63bbet/setup.py'"'"'; file='"'"'/tmp/pip-req-build-jg63bbet/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-ua79m_eq/install-record.txt --single-version-externally-mana

@gintautas12358
Copy link

Got the same problem too

@gintautas12358
Copy link

I resolved the problem by installing installing opencv, but then the problem with cuda pops up. So install cuda normaly on the machine and everything for esim_py should work

@Turgibot
Copy link

easy fix is to run this line:

export OpenCV_DIR=/home//anaconda3/envs/event_cnn/share/OpenCV

@fabian57fabian
Copy link

I also had this problem.
May it be because i installed miniconda3 instead of anaconda?

I tried to export OpenCV_DIR but don't have a OpenCV folder inside env_anme/shared

Any toughts?

@jhw0510
Copy link

jhw0510 commented Nov 26, 2024

I ran the code in a linux server and solved the problem by installing OPENCV. Note that this is not the opencv-python for python, but the C++ version that was compiled and installed directly. Then I installed it through sudo apt install libopencv-dev (Ubuntu)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants