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

Problem with python wrapper build #1081

Closed
fatrybl opened this issue Jan 31, 2022 · 8 comments · Fixed by #1145
Closed

Problem with python wrapper build #1081

fatrybl opened this issue Jan 31, 2022 · 8 comments · Fixed by #1145

Comments

@fatrybl
Copy link

fatrybl commented Jan 31, 2022

Hello everyone,
i faced a problem with building GTSAM with python wrapper/
What i do:

  1. dowloaded repo, mkdir build && cd build
  2. cmake -DCMAKE_BUILD_TYPE=Debug -DGTSAM_BUILD_PYTHON=1 -DCMAKE_INSTALL_PREFIX:PATH=$HOME/mark/gtsam_lib/ .. (tried to install to default usr/local/ , same result)
  3. make check -j6 . All tested passed 0 errors out of 265
  4. make install -j6. All installed , no errors , all is fine
  5. Now: make python-install
    and get this:
    image
  6. make python-test
    and give me this:
    image

Im not professional in CMAKE and all the stuff like this, but maybe anyone has an idea what going wrong ?
Additionally, my python does not see gtsam. I cant import it.
I have Linux Mint 20 and Python 3.8.10 installed by default

@ProfFan
Copy link
Collaborator

ProfFan commented Jan 31, 2022

I think we should change the README to advise people to NOT use python-install. As demonstrated in #1075 , the existence of the python-install appears to be rather confusing to first-time users.

@fatrybl I suggest you to install the python toolbox with:

cd <your build folder> # normally <gtsam>/build
pip install --user ./python

As for the error you are seeing, please report back your current operating system and GCC version.

@dellaert
Copy link
Member

I love python-install ! What's wrong with it?

@dellaert
Copy link
Member

I think the issue - which we should document properly - is that users that don't have install privileges in their regular python build should build gtsam withn a virtualenv or conda environment.

@dellaert
Copy link
Member

On Mac, for instance, system python is still 2.7. I also think no one should install in /usr/local

@fatrybl
Copy link
Author

fatrybl commented Feb 1, 2022

@ProfFan thank you for a decision. I used pip install --user ./python and python wrapper has been successfully installed to /home/mark/.local/lib/Python3.8/site-packages/ . My GCC is 9.3.0, Linux Mint 20.3 Cinnamon, kernel 5.4.0-97-generic.
@dellaert Could you please clarify how to install with python-install and proper permissions? sudo make python-install did not help. I dont really want to use any environments as conda or others. Seems like there should be an option to install wrapper to $HOME/.local/lib/Python3.8/site-packages/ as with a method above

@catproof
Copy link

I tried everything in the following thread: #714 as well as in this current thread. I am still getting the error listed here when trying to build.

Does anyone have any tips/tricks/advice? Thanks in advance.

@catproof
Copy link

@ProfFan @dellaert @fatrybl

@varunagrawal
Copy link
Collaborator

If you're getting a PythonConfig.cmake error, that means you most likely don't have the dev files for your interpreter installed. For a vanilla Ubuntu system, that would be apt-get install python3-dev.

@varunagrawal varunagrawal linked a pull request Mar 24, 2022 that will close this issue
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 a pull request may close this issue.

5 participants