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

Issues setting up the environment #2

Open
tensarflow opened this issue Sep 29, 2022 · 7 comments
Open

Issues setting up the environment #2

tensarflow opened this issue Sep 29, 2022 · 7 comments

Comments

@tensarflow
Copy link

Hi there, thanks for the contribution! Awesome work!

Unfortunately I'm having issues setting up the environment for training, inferencing, visualizing etc. For example I get errors regarding Cython not being installed while installing glump, while creating the conda env. Another one is dask, which gave me an error during execution of the synthetic data generation for not being installed after the conda environment was created. Another one is seaborn, that was an issue when executing the data visualization notebook. I tried to find compatible versions and was able to work around some of the errors. Now I am stuck at the jinja2 package. And I'm thinking that I'm doing something wrong because I doubt that this procedure is how you intended the environment.yaml file to work. Could you share the system details of the environment you are using?
I tried many things, including reinstalling conda.

I have a workstation with 2x RTX3090 and an intel i9 processor. Nvidia driver 470 is installed. Conda is up to date.

I would appreciate any input. Thanks in advance.

@stefanvdpalen
Copy link

Hey @tensarflow,

Coincidentally i was also running into the same problem this morning. I found a way around it, however i don't think it is the full solution. I commented these lines out of the environment:
- ./deps/bullet3
- ./deps/job-runner

Then I've used:

$ conda env update --file environment.yaml --prune

Then it also gave me the error related to glumpy. Which i installed manually:

$ pip install glumpy==1.1.0.

Then i ran this line again:

$ conda env update --file environment.yaml --prune

Now they installed all the files in the environment file except bullet3 and job-runner, which i think need to be installed manually.

I don't think this is the best solution, however i think it should work.

Kind regards,

Stefan

@tensarflow
Copy link
Author

tensarflow commented Sep 29, 2022

Thanks for the response @stefanvdpalen,

I just found out that the RTX3090 is only compatible with Cuda 11.1 and upwards. So I only defined that version and removed the version specifications of all the other packages, hoping for conda to find the compatible versions (btw, does conda do that?). After that I removed the environment and recreated it with the new environment.yaml. It seemed to work. I have no other package or "cant import" errors anymore. Instead I got another error when executing the visualization notebook. I created another issue for that here: #3

This is my current environment.yaml file for conda:

name: cosypose
channels:
   - conda-forge
   - pytorch
dependencies:
  - python
  - pinocchio
  - assimp
  - pytorch
  - cudatoolkit=11.3
  - torchvision
  - cudnn
  - rclone
  - gxx_linux-64
  - git-lfs
  - ffmpeg
  - bzip2
  - git
  - cmake
  - pip
  - numpy
  - pillow
  - ipython
  - pip:
      - ./deps/bullet3
      - ./deps/job-runner
      - imageio
      - simplejson
      - opencv-python
      - opencv-contrib-python
      - torchnet
      - tqdm
      - lxml
      - transforms3d
      - distributed
      - joblib
      - pandas
      - xarray
      - pyarrow
      - matplotlib
      - bokeh
      - plyfile
      - trimesh
      - pycollada
      - shapely
      - wget
      - pypng
      - PyOpenGL
      - Cython
      - ipdb
      - colorama
      - scikit-video
      - scikit-image
      - scikit-learn
      - pyyaml
      - ipykernel
      - scipy
      - pywavefront
      - jupyter-client
      - jupyter-core
      - jupyter-server-proxy
      - jupyterlab
      - jupyterlab-server
      - dask
      - dask-jobqueue
      - seaborn

@Toefinder
Copy link

Toefinder commented Dec 21, 2022

I ran into the same issue with glumpy even after some of the fixes implemented to solve the issue. Even though Cython is declared as pip dependency before glumpy in environment.yaml file, somehow conda create still fails to find Cython...

In the end I had to resort to changing glumpy version to 1.2.0 as suggested by this comment

@swtyree
Copy link

swtyree commented Jan 20, 2023

I'm also encountering an issue with installing ./deps/bullet3 while setting up the condo environment. I've reproduced the error when directly calling pip install . from deps/bullet3 after installing the conda environment. The full error is tool long to paste (and overflows my terminal scrollback), but here are some lines (with many lines omitted with "..."):

...
    -- random_urdfs/676/676.urdf
    -- random_urdfs/253/253.urdf
    -- random_urdfs/253/253.obj/home/big_white/miniconda3/envs/cosypose_SR/lib/python3.7/site-packages/setuptools/dist.py:547: UserWarning: The version specified ('2.5.5_eglpatched') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.
      "details." % version
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-xrowzgiq/setup.py", line 522, in <module>
        package_data={'pybullet_data': need_files})
      File "/home/big_white/miniconda3/envs/cosypose_SR/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 185, in setup
        return run_commands(dist)
      File "/home/big_white/miniconda3/envs/cosypose_SR/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
        dist.run_commands()
      File "/home/big_white/miniconda3/envs/cosypose_SR/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
        self.run_command(cmd)
      File "/home/big_white/miniconda3/envs/cosypose_SR/lib/python3.7/site-packages/setuptools/dist.py", line 1208, in run_command
        super().run_command(command)
      File "/home/big_white/miniconda3/envs/cosypose_SR/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
        cmd_obj.ensure_finalized()
      File "/home/big_white/miniconda3/envs/cosypose_SR/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
        self.finalize_options()
      File "/home/big_white/miniconda3/envs/cosypose_SR/lib/python3.7/site-packages/setuptools/command/egg_info.py", line 219, in finalize_options
        parsed_version = parse_version(self.egg_version)
      File "/home/big_white/miniconda3/envs/cosypose_SR/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/version.py", line 266, in __init__
        raise InvalidVersion(f"Invalid version: '{version}'")
    pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: '2.5.5-eglpatched'
    
    -- random_urdfs/253/253.mtl
    -- random_urdfs/967/967.obj
    -- random_urdfs/967/967.mtl
...
    -- quadruped/microtaur/fr13_s102_lowerscaled.stl
    -- quadruped/microtaur/toe_brake.stl
    -- quadruped/microtaur/channel_4inch.stl
    packages
    ['pybullet_envs', 'pybullet_data', 'pybullet_utils', 'pybullet_envs.baselines', 'pybullet_envs.prediction', 'pybullet_envs.bullet', 'pybullet_envs.minitaur', 'pybullet_envs.agents', 'pybullet_envs.deep_mimic', 'pybullet_envs.examples', 'pybullet_envs.minitaur.envs', 'pybullet_envs.minitaur.actuatornet', 'pybullet_envs.minitaur.agents', 'pybullet_envs.minitaur.envs.env_randomizers', 'pybullet_envs.minitaur.agents.ppo', 'pybullet_envs.minitaur.agents.tools', 'pybullet_envs.minitaur.agents.scripts', 'pybullet_envs.agents.ppo', 'pybullet_envs.agents.tools', 'pybullet_envs.deep_mimic.env', 'pybullet_envs.deep_mimic.learning', 'pybullet_envs.deep_mimic.learning.nets', 'pybullet_envs.deep_mimic.learning.solvers', 'pybullet_data.policies', 'pybullet_data.policies.ppo', 'pybullet_data.policies.ppo.minitaur_trotting_env', 'pybullet_data.policies.ppo.minitaur_reactive_env', 'pybullet_utils.examples']
    -----
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

@swtyree
Copy link

swtyree commented Jan 20, 2023

As noted in #10 (comment), initial results seem to indicate that it might be safe to simply replace pip install ./deps/bullet3 with pip install pybullet. With that fix, I can run, e.g., python -m cosypose.scripts.run_cosypose_eval --config tless-siso.

@swtyree
Copy link

swtyree commented Jan 24, 2023

I just submitted a pull request (#11) with my fixes. I would appreciate it if others could test this setup to see if it addresses your issues. Thanks!

@Toefinder
Copy link

@tensarflow Have your issues been addressed after the PR merge? If so, can we 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

No branches or pull requests

4 participants