Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@JCRPaquin
Copy link

The current build instructions for PyCOLMAP don't work on Windows. This PR adds some additional steps and context that should resolve the problem.

These are intended to clarify multiple snags that I hit while building on Windows.
Warning box markdown isn't rendering properly for READMEs right now.
python -m pip install .
```
- On Windows, after installing COLMAP [via VCPKG](https://colmap.github.io/install.html#id3), run in powershell:
- On Windows, after installing COLMAP [via VCPKG](https://colmap.github.io/install.html#id3):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: not your fault but this link is actually not persistent, and we should link using a markdown reference?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the Windows source-build section anchor is named that way because the section header is a duplicate? Maybe it would be reasonable to add an explicitly named anchor.

Or the link could be removed entirely, maybe? Maybe change this to:

Suggested change
- On Windows, after installing COLMAP [via VCPKG](https://colmap.github.io/install.html#id3):
- On Windows, after installing COLMAP via VCPKG per the installation instructions above:

Copy link
Author

@JCRPaquin JCRPaquin Nov 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created a PR to add a permanent section anchor: colmap/colmap.github.io#19

Accidentally updated the mirror of the site instead of the actual docs. I'll add the anchor to this PR shortly.

```
- On Windows, after installing COLMAP [via VCPKG](https://colmap.github.io/install.html#id3), run in powershell:
- On Windows, after installing COLMAP [via VCPKG](https://colmap.github.io/install.html#id3):
1. Determine the installed COLMAP version via: `<VCPKG-ROOT>\packages\colmap_<TRIPLET>\tools\colmap\colmap.exe help`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: The easier path would be to just run vcpkg install from the root of the colmap repo. Then the version is guaranteed to be consistent.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, noted. That does seem much easier. :)

I'll go verify, then make the edit.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ahojnnes So I tried vcpkg install from the root of the repo and all it did was install the dependencies. Is there another command I should try?

I also tried doing a cmake build using the vcpkg toolchain file, then the pip command in the install docs + some changes to resolve pybind11. That built successfully, but was pretty convoluted and I ultimately can't get the resulting package to load because it fails to resolve DLL dependencies in the vcpkg_installed folder.

For what it's worth, I also couldn't load the resulting package when building the python bindings against the vcpkg install colmap:x64-windows version. It's the same DLL resolution issue caused by vcpkg-built shared libraries living in their own prefix.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there are 3 issues causing the loading problem:

  1. vcpkg shared libraries can't be found
  2. CUDA libraries can't be found
  3. OpenEXR 3.4 is crashing during initialization (something about a null pointer dereference while locking a critical section)

I'll update the build instructions based on the method I originally proposed in my PR, then open a separate issue to track this loading issue.

Copy link
Contributor

@ahojnnes ahojnnes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@sarlinpe
Copy link
Member

Please also update the instructions at https://github.com/colmap/colmap/blob/main/doc/pycolmap/index.rst

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

Successfully merging this pull request may close these issues.

3 participants