colmap / pycolmap

Python bindings for COLMAP
BSD 3-Clause "New" or "Revised" License
858 stars 125 forks source link

How to resolve conflicts between pycolmap and pytorch #276

Open Lanqingsong opened 3 weeks ago

Lanqingsong commented 3 weeks ago

I tested the simultaneous running of pycolmap and pytorch on multiple Windows devices and multiple versions. As long as the two packages are not imported at the same time, there will be no error. Once pycolmap and pytorch are imported at the same time, an error will be reported. For example, the following code: `` from time import time from fastprogress import progress_bar

from collections import defaultdict from copy import deepcopy import concurrent.futures

import torch

import h5py from copmap import CONFIG,reconstruct_from_db if name == 'main':

a = 0

`` Connected to pydev debugger (build 233.13135.95) Aborted at 1717644328 (unix time) try "date -d @1717644328" if you are using GNU date @ 0x7ff8181d4172 log2f @ 0x7ff7f8bf2408 (unknown) @ 0x7ffffc5fe390 C_specific_handler @ 0x7ff81ad149ff chkstk @ 0x7ff81ac8e466 RtlFindCharInUnicodeString @ 0x7ff81ad139ee KiUserExceptionDispatcher @ 0x7fffe20e264e void cdecl ExceptionPtrRethrow(void const ptr64) @ 0x7fff57b98fde public: void cdecl c10::ivalue::Future::markCompleted(void) __ptr64 @ 0x7fff57f26c32 struct _object ptr64 cdecl THPGenerator_initDefaultGenerator(struct at::Generator) @ 0x7fff66c0df05 (unknown) @ 0x7fff6716ad99 PyInit_pycolmap @ 0x7ffffb4b1080 (unknown) @ 0x7ffffb4b2715 __NLG_Return2 @ 0x7ff81ad14246 RtlCaptureContext2 @ 0x7fff66c10976 (unknown) @ 0x7fff65bb7046 _PyArg_CheckPositional @ 0x7fff65bb3ba9 _PyObject_MakeTpCall @ 0x7fff65cfe5ea _PyArg_NoKwnames @ 0x7fff65b7ab24 _PyObject_GenericGetAttrWithDict @ 0x7fff65b7b6c0 PyObject_GetAttr @ 0x7fff65b5ad41 PyObject_GetAttrString @ 0x7fff66c4610e PyInit_pycolmap @ 0x7fff66ca02fd PyInit_pycolmap @ 0x7fff66c77d0d PyInit_pycolmap @ 0x7fff66c341c0 (unknown) @ 0x7fff66c40b08 PyInit_pycolmap @ 0x7fff66c4060e PyInit_pycolmap @ 0x7fff65c03e28 PyLong_AsSize_t @ 0x7fff65c0403a PyLong_AsSize_t @ 0x7fff65c03f95 PyLong_AsSize_t @ 0x7fff65b6c7db PyType_GenericAlloc @ 0x7fff65b90b68 PyVectorcall_Call

I tried installing pycolmap versions 0.4, 0.5, and 0.6 but none of them worked.

lxy-traviscott commented 2 weeks ago

I meet the same mistake.Do you work it at Windows? maybe the windows is the reason why.Do you solved it?

Zzzyf98 commented 1 week ago

same mistake +1

Zzzyf98 commented 1 week ago

same mistake +1

problem solved, upgrade your PyTorch