limap
limap copied to clipboard
install Ive error
python -m pip install -Ive . conda environment occurs error: subprocess-exited-with-error
× python setup.py develop did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /data/miniconda3/envs/limap/bin/python -c '
exec(compile('"'"''"'"''"'"'
# This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
#
# - It imports setuptools before invoking setup.py, to enable projects that directly
# import from `distutils.core` to work with newer packaging standards.
# - It provides a clear error message when setuptools is not installed.
# - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
# setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
# manifest_maker: standard file '"'"'-c'"'"' not found".
# - It generates a shim setup.py, for handling setup.cfg-only projects.
import os, sys, tokenize
try:
import setuptools
except ImportError as error:
print(
"ERROR: Can not execute `setup.py` since setuptools is not available in "
"the build environment.",
file=sys.stderr,
)
sys.exit(1)
__file__ = %r
sys.argv[0] = __file__
if os.path.exists(__file__):
filename = __file__
with tokenize.open(__file__) as f:
setup_py_code = f.read()
else:
filename = "<auto-generated setuptools caller>"
setup_py_code = "from setuptools import setup; setup()"
exec(compile(setup_py_code, filename, "exec"))
'"'"''"'"''"'"' % ('"'"'/ali-nas/loc/limap/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' develop --no-deps
cwd: /ali-nas/loc/limap/
error: subprocess-exited-with-error
× python setup.py develop did not run successfully. │ exit code: 1 ╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Hi. I did not encounter this issue myself. Maybe this can help? https://github.com/pypa/packaging-problems/issues/573
I hava try to build dockerfile and the limap-internal.git is missing so turn to conda environment. And I have seen the dockerfile update, I think that will solve my problem and thanks for the reply.
I do use anaconda myself, so this should not be a problem. But glad that it works for you now : )
Hello @B1ueber2y , I have also encountered the same mistake as @Gotta-C . May I ask what happened?
Hi @LikeRain0 I have not encountered this issue before. May I ask what Python version you are using? Also, does this help? https://github.com/pypa/packaging-problems/issues/573
My Python version is Python 3.9.10,and my pip version is pip 23.1.1.
I think the key to the problem is “ERROR: Can not execute setup.py since setuptools is not available in the build environment.”
I will try to find a solution.
@LikeRain0 I think maybe the cuda image caused,the dockerfile based on nvidia/cuda:11.5.2-devel-ubuntu20.04,update dockerfile and add RUN pip install wheel before RUN the last line, the docker image build successfully, but I use A30 gpu cuda11.2 driver and A30 highest support cuda 11.4, so I rebuild based on nvidia/cuda:11.2.0-base-ubuntu18.04 and encountered the same problem again, that explain conda environment couldn't build because based on current cuda11.2 @B1ueber2y will you release a common image or uncoupled the cuda version?I have not find the submodules dependence
@LikeRain0 I have try another machine with cuda 11.6 and all goes well. you can upgrade your cuda driver.
OK, it is indeed related to the CUDA version. I have also updated the CUDA version to address this issue. It is recommended to explain it in readme @B1ueber2y
hello, @Gotta-C , @B1ueber2y . Now,I have successfully configured it on my local computer, but now I am reconfiguring it on the server and the following issues have occurred when run “python -m pip install -Ive .”
` [ 24%] Building CXX object limap/CMakeFiles/limap.dir/base/linetrack.cc.o
In file included from /home/ccy/ccy/limap/limap/util/types.h:10,
from /home/ccy/ccy/limap/limap/base/camera.h:13,
from /home/ccy/ccy/limap/limap/base/camera.cc:1:
/home/ccy/ccy/limap/limap/base/camera.cc: In member function ‘void limap::Camera::set_max_image_dim(const int&)’:
/home/ccy/ccy/limap/limap/base/camera.cc:204:20: error: ‘IsUndistorted’ was not declared in this scope
204 | THROW_CHECK_EQ(IsUndistorted(), true);
| ^~~~~~~~~~~~~
/home/ccy/ccy/limap/limap/util/log_exceptions.h:84:43: note: in definition of macro ‘THROW_CHECK_OP’
84 | __ThrowCheckOpImpl(FILE, LINE, (val1 op val2), val1, val2,
| ^~~~
/home/ccy/ccy/limap/limap/base/camera.cc:204:5: note: in expansion of macro ‘THROW_CHECK_EQ’
204 | THROW_CHECK_EQ(IsUndistorted(), true);
| ^~~~~~~~~~~~~~
[ 25%] Building CXX object limap/CMakeFiles/limap.dir/base/line_dists.cc.o
/home/ccy/ccy/limap/limap/base/image_collection.cc: In member function ‘bool limap::ImageCollection::IsUndistorted() const’:
/home/ccy/ccy/limap/limap/base/image_collection.cc:405:25: error: ‘const class limap::Camera’ has no member named ‘IsUndistorted’
405 | if (!it->second.IsUndistorted())
| ^~~~~~~~~~~~~
make[2]: *** [limap/CMakeFiles/limap.dir/build.make:90: limap/CMakeFiles/limap.dir/base/camera.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [limap/CMakeFiles/limap.dir/build.make:132: limap/CMakeFiles/limap.dir/base/image_collection.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:667: limap/CMakeFiles/limap.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Traceback (most recent call last):
File "
× python setup.py develop did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /home/ccy/anaconda3/envs/limap/bin/python -c '
exec(compile('"'"''"'"''"'"'
# This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
#
# - It imports setuptools before invoking setup.py, to enable projects that directly
# import from `distutils.core` to work with newer packaging standards.
# - It provides a clear error message when setuptools is not installed.
# - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
# setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
# manifest_maker: standard file '"'"'-c'"'"' not found".
# - It generates a shim setup.py, for handling setup.cfg-only projects.
import os, sys, tokenize
try:
import setuptools
except ImportError as error:
print(
"ERROR: Can not execute `setup.py` since setuptools is not available in "
"the build environment.",
file=sys.stderr,
)
sys.exit(1)
__file__ = %r
sys.argv[0] = __file__
if os.path.exists(__file__):
filename = __file__
with tokenize.open(__file__) as f:
setup_py_code = f.read()
else:
filename = "<auto-generated setuptools caller>"
setup_py_code = "from setuptools import setup; setup()"
exec(compile(setup_py_code, filename, "exec"))
'"'"''"'"''"'"' % ('"'"'/home/ccy/ccy/limap/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' develop --no-deps
cwd: /home/ccy/ccy/limap/
error: subprocess-exited-with-error
× python setup.py develop did not run successfully. │ exit code: 1 ╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.`
But my Cmake version(3.26.3) and cuda version(11.6), as well as Python(3.9.16), torch(1.13.1), tochvision(0.14.1), and the ones I have successfully configured locally, are consistent.
Do you know what's going on here?
i have meet the same problem, do u find a good solution?
i have meet the same problem, do u find a good solution?
Hi @RivaLei , I have fixed this error by using Colmap 3.8 (release) https://github.com/colmap/colmap/releases
I think Colmap 3.8 dev version lead to linking error build.
i have meet the same problem, do u find a good solution?
Hi @RivaLei , I have fixed this error by using Colmap 3.8 (release) https://github.com/colmap/colmap/releases
I think Colmap 3.8 dev version lead to linking error build.
Could you please explain how you specifically repaired it?@quachconghoang
i have meet the same problem, do u find a good solution?
Hi @RivaLei , I have fixed this error by using Colmap 3.8 (release) https://github.com/colmap/colmap/releases I think Colmap 3.8 dev version lead to linking error build.
Could you please explain how you specifically repaired it?@quachconghoang
I see these crashes come from Cmake native build (C++ libs) from the submodules , so that becareful with environment & dependency.
I just carefully followed the Readme:
- Upgrade cmake > 3.17. (I'm using Ubuntu 20.04 so that i have to build and install cmake from source code),
- Build Colmap release version (Colmap on git - master will have some changes):
- https://github.com/colmap/colmap/archive/refs/tags/3.8.zip
- Tutorial: https://colmap.github.io/install.html#linux
- I build Colmap with Cuda 11.8 (I think non-cuda is still ok)
- Python environment:
- Use Conda to create new environment - I choose Python 3.10 for longterm use.
- Install latest pytorch v1 (1.13.1) by conda is still ok.
- Install requirements packages by using Pip (pypi) for most packages (I got similar crash when using all packages from conda).
Good luck.
i have meet the same problem, do u find a good solution?
Hi @RivaLei , I have fixed this error by using Colmap 3.8 (release) https://github.com/colmap/colmap/releases
I think Colmap 3.8 dev version lead to linking error build.
@quachconghoang thx! i find that the g++ version is old in my case (limap needs g++9.x while mine is g++ 4.x). so i make it by updating the g++ version. it works for me.
i have meet the same problem, do u find a good solution?
Hi @RivaLei , I have fixed this error by using Colmap 3.8 (release) https://github.com/colmap/colmap/releases
I think Colmap 3.8 dev version lead to linking error build.
@quachconghoang thx! i have checked the verison of the colmap (3.8). Then i found that the g++ version is too old in my case ( limap needs g++ > 9.0 while mine is 4.x). so i update it. luckly, it works for me~
I have success in python -m pip install -Ive . in my docker(ubuntu20.04) and when I run python -c "import limap" occurs error:
root@67318b:/home/limap# python -c "import limap"
Traceback (most recent call last):
File "
I build Colmap(3.8) with Cuda 11.3, the torch is torch==1.12.0 torchvision==0.13.0, cmake is 3.23.0, python is 3.9. Can someone help me?
I have success in python -m pip install -Ive . in my docker(ubuntu20.04) and when I run python -c "import limap" occurs error:
root@67318b:/home/limap# python -c "import limap" Traceback (most recent call last): File "", line 1, in File "/home/limap/limap/init.py", line 6, in from . import point2d File "/home/limap/limap/point2d/init.py", line 1, in from .superpoint import * File "/home/limap/limap/point2d/superpoint/init.py", line 1, in from .main import run_superpoint File "/home/limap/limap/point2d/superpoint/main.py", line 12, in from hloc import extract_features ModuleNotFoundError: No module named 'hloc'
I build Colmap(3.8) with Cuda 11.3, the torch is torch==1.12.0 torchvision==0.13.0, cmake is 3.23.0, python is 3.9. Can someone help me?
As the error message suggest, you do not have hloc installed. Please check if the submodule Hierarchical-Localization is successfully pulled in third-party, and try pip install -r requirements.txt again (or just pip install -e third-party/Hierarchical-Localization).