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

Add catkin_pkg to requirements in setup.py #29

Open
fedeceola opened this issue Jul 19, 2023 · 6 comments
Open

Add catkin_pkg to requirements in setup.py #29

fedeceola opened this issue Jul 19, 2023 · 6 comments

Comments

@fedeceola
Copy link

Hi, I would like to install VGN from the setup.py in my project. Would it be possible to add the installation of catkin_pkg as a requirement in the VGN's setup.py? Thanks in advance!

@mbreyer
Copy link
Contributor

mbreyer commented Jul 24, 2023

Hi, I typically first installed the requirements from requirements.txt which contains catkin_pkg before running pip install. I guess one could alternatively add the dependencies to the install_requires field of the setup method inside setup.py, but I have never tried it out since the ROS documentation states that this field has no meaning in ROS and I wanted to keep it compatible with catkin as well.

@fedeceola
Copy link
Author

Hi, thanks for your reply. I'm currently installing the requirements before running pip install as well. What I would like to do is exactly what you mentioned, but adding the catkin_pkg in the install_requires field of my setup.py doesn't work. As far as I know it's not possible to decide the order of installation of the packages. Therefore, the installation of vgn fails because vgn's setup.py imports catkin_pkg before installing it.

@mbreyer
Copy link
Contributor

mbreyer commented Jul 25, 2023

That makes sense. If you do not install the package with catkin anyways, a solution to your problem could be to simply remove the catkin_pkg dependency and add the remaining dependencies to setup.py.

@fedeceola
Copy link
Author

Yes, but in that case the problem is again the installation of vgn. I think that the only way to solve the problem is to remove the catkin_pkg dependency from the vgn's setup.py. If you think that this is doable, to me it would be helpful, otherwise installing catkin_pkg before vgn as I have done so far is not a big problem.

@mbreyer
Copy link
Contributor

mbreyer commented Jul 26, 2023

That should work. Can you try replacing the existing setup.py with the following code?

from setuptools import setup

setup(
    name="vgn",
    version="0.1.0",
    author="Michel Breyer",
    author_email="[email protected]",
    description="Volumetric Grasping Network.",
    packages=[
        "vgn",
        "vgn.utils",
    ],
    package_dir={"": "src"},
    install_requires=[
        "numpy",
        "scipy",
        "pandas",
        "matplotlib",
        "mpi4py",
        "open3d",
        "pybullet==2.7.9",
        "torch",
        "pytorch-ignite",
        "tensorboard",
        "tqdm",
    ],
)

@fedeceola
Copy link
Author

Yes, this setup.py works!

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

2 participants