Coder Social home page Coder Social logo

locusrobotics / catkin_virtualenv Goto Github PK

View Code? Open in Web Editor NEW
78.0 78.0 26.0 301 KB

Bundle python requirements in a catkin package via virtualenv

Home Page: http://wiki.ros.org/catkin_virtualenv

CMake 27.70% Python 69.88% Shell 1.76% EmberScript 0.65%

catkin_virtualenv's People

Contributors

abencz avatar ablakey avatar arne48 avatar dlu avatar doomerdinger avatar garyservin avatar gavanderhoorn avatar iory avatar knorth55 avatar kronos30 avatar locus-services avatar mjohnson459 avatar nokutu avatar paulbovbel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

catkin_virtualenv's Issues

0.6 in Kinetic and Melodic?

Yes, those are 'old', but there are some of us still using them :)

Is there anything technical blocking a release of 0.6 into Kinetic and Melodic?

Usage with overlay workspaces

I just found the package and it looks good for my own workspace. However, I was wondering how to use it with overlay workspaces. Are overlays not supported? If they are supported, how would the virtualenv be managed in that case?

GPL copyleft with regards to this library

It is my understanding that with a typical use case with a GPL library if code uses it, that code must also be GPL (roughly, I know it is a lot more complicated).
Given that this library is GPL, one could assume libraries that use it must be GPL as well.

However, an example use case cited by this library is locusrobotics/aiorospy, which is MIT even though it uses this library.

Is this in error? Is the GPL copyleft not applicable with the way this library is used by downstream packages - since it is a bit unusual?

If this is more relevent to the aiorospy repo, I can close this and make an issue there instead. Likewise for if I should post this on answers.ros instead.

This question seems somewhat related to this one, but not quite the same I don't think.

Request to update ros-noetic-catkin-virtualenv to 0.10.0

We are setting up the runtime platform for an established software product based on ROS Noetic, and we'd really like to avoid installing python2 if possible. This is the one package we depend on that requires python2. Would you be able to update the ROS Noetic distro for ros-noetic-catkin-virtualenv to latest tagged release 0.10.0 so we can avoid pulling python2 into our environment? Thanks!

Does catkin_virtualenv have to be "installed" and if so, how?

I want to use a py3 based package, py_tree v. 2.1. I am working with ROS Melodic. I have followed the readme instructions as best I can. Do I need to explicitly install catkin_virtualenv? If so, do I use pip, pip3 or apt-get install?

I am getting this error from catkin_make:

-- Could NOT find catkin_virtualenv (missing: catkin_virtualenv_DIR)
-- Could not find the required component 'catkin_virtualenv'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "catkin_virtualenv"
  with any of the following names:

    catkin_virtualenvConfig.cmake
    catkin_virtualenv-config.cmake

  Add the installation prefix of "catkin_virtualenv" to CMAKE_PREFIX_PATH or
  set "catkin_virtualenv_DIR" to a directory containing one of the above
  files.  If "catkin_virtualenv" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  prrexamples/CMakeLists.txt:10 (find_package)

ros-kinetic-catkin-virtualenv dependency issue

Hello,

I just started having some dependency issues on kinetic with the 0.6.1 release, as it requires catkin-pkg==0.4.20, but the default apt version is 0.4.22

$ apt-cache policy python-catkin-pkg
python-catkin-pkg:
  Installed: 0.4.22-100
  Candidate: 0.4.22-100
  Version table:
 *** 0.4.22-100 500
        500 http://packages.ros.org/ros/ubuntu xenial/main amd64 Packages
        500 http://packages.ros.org/ros/ubuntu xenial/main i386 Packages
        100 /var/lib/dpkg/status
     0.2.10-2 500
        500 http://jp.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        500 http://jp.archive.ubuntu.com/ubuntu xenial/universe i386 Packages

Seems to be working fine when I manually bump the requirements.txt to 0.4.22.

The error I got:

ERROR: Could not find a version that satisfies the requirement catkin-pkg==0.4.20 (from -r /opt/ros/kinetic/share/catkin_virtualenv/requirements.txt (line 1)) (from versions: none)
ERROR: No matching distribution found for catkin-pkg==0.4.20 (from -r /opt/ros/kinetic/share/catkin_virtualenv/requirements.txt (line 1))

Also, had no problems when testing with melodic, as ros-melodic-catkin-virtualenv still resolves to version 0.5.2

Investigate rostest failures in python 3

See https://travis-ci.org/locusrobotics/catkin_virtualenv/jobs/309225972

[ROSUNIT] Outputting test results to /root/catkin_ws/build/test_catkin_virtualenv_py3/test_results/test_catkin_virtualenv_py3/rostest-test_virtualenv_script.xml
Traceback (most recent call last):
  File "/root/catkin_ws/src/catkin_virtualenv/test_catkin_virtualenv_py3/test/test_virtualenv_script", line 33, in <module>
    rostest.rosrun('test_catkin_virtualenv', 'test_virtualenv_script', TestVirtualenv, sys.argv)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rostest/__init__.py", line 146, in rosrun
    result = rosunit.create_xml_runner(package, test_name, result_file).run(suite)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosunit/xmlrunner.py", line 275, in run
    result.print_report(stream, time_taken, out_s, err_s)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosunit/xmlrunner.py", line 202, in print_report
    stream.write(ET.tostring(self.xml(time_taken, out, err).getroot(), encoding='utf-8', method='xml'))
TypeError: must be str, not bytes
[Testcase: testtest_virtualenv_script_py3] ... ok

Interaction/integration with pkgs that have setup.py?

I'm not a Python expert, but I'm looking to use catkin_virtualenv to distribute a Python-based tool - with quite some dependencies not available as a Debian (or other) package - as a catkin pkg.

This pkg has a setup.py which installs two modules and a nr of scripts (entrypoints).

Is there a way for catkin_virtualenv to use it, or would I have to recreate what it does in the added CMakeLists.txt?

Can we stack catkin venv workspaces ?

Just the question in the title : Can we stack (underlay / overlay) workspaces built with virtualenvs ?

One of the design decision I made early for catkin_pip was to not go the full virtualenv way, because :

  • venvs are not made to stack up ( AFIK it was never considered in the design) on top of each other, from what I could gather,
  • if we can go the python way, we want to be fully dynamic and then get rid of the whole catkin build layer anyway.

But with catkin_pip I am having issues with the recent pip version ( and the changing --target / --prefix options) when I build the "environment" by hand, so maybe the catkin + venv solution is better after all ?

So I am curious if there is any return on experience on your side on this topic, if there is any specific limitation on catkin_venv that catkin_pip could do differently, or if you think catkin_pip should adopt some similar design decision ?
Thanks for any light you can shed on this!

Override bloom `dh_shlibdeps` behavior? Issues pip dependencies that bundle shared libraries

I am using catkin_virtualenv 0.6.1 (this is the only version that's currently published for ROS Melodic and Noetic, see this issue), and some of my pip dependencies bundle shared libraries in them.

After successfully building my package with catkin_virtualenv as a dependency, I am attempting to use Bloom to create a rosdebian package:

bloom-generate rosdebian \
  --ros-distro melodic \
  --os-name ubuntu \
  --os-version bionic

debian/rules binary

The resulting debian/rules Makefile is throwing errors from dh_shlibdeps for all of my pip dependencies that bundle shared libraries, for example:

#24 42.65 dpkg-shlibdeps: error: cannot find library libgfortran-ed201abd.so.3.0.0 needed by debian/ros-melodic-redacted-pkg-name/opt/ros/melodic/share/redacted_pkg_name/venv/lib/python3.6/site-packages/numpy/.libs/libopenblasp-r0-34a18dc3.3.7.so (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '')

But libgfortran-ed201abd.so.3.0.0 is correctly bundled in the numpy pip package:

# ls -l install/share/redacted_pkg_name/venv/lib/python3.6/site-packages/numpy/.libs/
total 30028
-rwxr-xr-x 1 root root  1023960 Dec  7 21:58 libgfortran-ed201abd.so.3.0.0
-rwxr-xr-x 1 root root 29724672 Dec  7 21:58 libopenblasp-r0-34a18dc3.3.7.so

I think what's tripping up dh_shlibdeps is the fact that pip doesn't publicly set an LD_LIBRARY_PATH in the venv nor an RPATH in the "consuming" shared lib (libopenblasp in this case), so if you ldd libopenblasp-r0-34a18dc3.3.7.so it will say that it can't find libgfortran.

But this is expected, as pip does its own internal shared library resolution at runtime.


What is the proper way to get around this in my CI pipeline? Basically in my bloom-generate call (or after it), I need to either turn off dh_shlibdeps, or at least tell it not to worry about shared libs bundled within the packages in the venv.

I feel like this has to be something folks have run into before when using catkin_virtualenv with Bloom, especially since many ROS applications work with sensor data and the like, and thus depend on pip packages that bundle shared libraries.

I appreciate the help!!

New kinetic release?

#39 asked for 0.3.0 and that got into Melodic.

Would it be possible to get a new release into Kinetic as well?

Perhaps even 0.4.0?

catkin_make fails on `venv_lock`

I git cloned the master branch to my catkin workspaces src. Attempting to run catkin_make results in the following error.

OS: Ubuntu 20.04
ROS Version: Noetic

CMake Error at catkin_virtualenv/catkin_virtualenv/cmake/catkin_generate_virtualenv.cmake:144 (add_custom_target):
  add_custom_target cannot create target "venv_lock" because another target
  with the same name already exists.  The existing target is a custom target
  created in source directory
  "/home/toor/workspace/ros/src/catkin_virtualenv/test_catkin_virtualenv".
  See documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
  catkin_virtualenv/test_catkin_virtualenv_inherited/CMakeLists.txt:8 (catkin_generate_virtualenv)


-- +++ processing catkin package: 'test_catkin_virtualenv_py3_isolated'
-- ==> add_subdirectory(catkin_virtualenv/test_catkin_virtualenv_isolated)
CMake Error at catkin_virtualenv/catkin_virtualenv/cmake/catkin_generate_virtualenv.cmake:144 (add_custom_target):
  add_custom_target cannot create target "venv_lock" because another target
  with the same name already exists.  The existing target is a custom target
  created in source directory
  "/home/toor/workspace/ros/src/catkin_virtualenv/test_catkin_virtualenv".
  See documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
  catkin_virtualenv/test_catkin_virtualenv_isolated/CMakeLists.txt:8 (catkin_generate_virtualenv)


-- +++ processing catkin package: 'ldlidar'
-- ==> add_subdirectory(ldlidar)
-- Configuring incomplete, errors occurred!
See also "/home/toor/workspace/ros/dev_build/CMakeFiles/CMakeOutput.log".
See also "/home/toor/workspace/ros/dev_build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

Mixing non virtualenv packages with virtualenv packages

Hey locusrobotics,

great job with creating a virtualenv wrapper. Saved me a lot of time rewriting a python 3 library!
Now I would like to mix my package with non virtualenv packages inside of the workspace. However when building the workspace, the catkin_virtualenv package gets built fine. Though other packages invoking "catkin_install_python" cannot be built throwing:

<my_package> loaded catkin_virtualenv, but never invoked 'catkin_generate_virtualenv'
CMakeLists.txt:29 (catkin_install_python)

It seems to be the problem, that the catkin_install_python macro gets overwritten and obligates the creation of a virtualenv first, I guess. Maybe that is desired... Do you have any suggestions if and how I could solve that, without putting all of my other packages into their personal virtualenv just using the standard interpreter?

Thanks, DerNeuburger

Install space script shouldn't be reliant on the current system's absolute path

Unless my understanding is off, the catkin install space is supposed to be thought of as for deployment purposes. catkin-virtual-env seems to create a script that has absolute paths embedded in it. Anonymised output from version 0.6.1:

#!/usr/bin/env bash
exec /home/USER/WS/install/share/PACKAGE/venv/bin/python /home/USER/WS/install/share/PACKAGE/catkin_virtualenv_scripts/SCRIPT "$@"

This will break if your ROS deployment's install space is isn't in the exact same path with the same username. I had a look and there doesn't seem to have been any changes that would fix this since 0.6.1 and I can't see any options to fix this. #63 seems to have fixed a similar issue in different contexts.

The alternative is catkin_install_python creating a script that figures out where it itself is and uses relative paths to find the venv and true script (which is probably possible with some ROS environment variables (e.g. packages can be installed and found by ROS in any directory listed in ROS_PACKAGE_PATH) or one of the find-own-path bash commands.

ament support (ament_virtualenv)

Hello!

I'd like to ask if an ament port of this tool (ie: ament_virtualenv) is in the making or planned or even conceivable.

My understanding of the build process is limited, so also I'd be happy to get an evaluation of the work required.
It seems like most of the cmake commands used in catkin_virtualenv don't have a direct counterpart in ament_cmake, and since ament has two separate build types for Cmake projects and Python projects, splitting the package into two (ie. ament_virtualenv for the Python code and amend_cmake_virtualenv for the Cmake integration) may be necessary.

Furthermore, catkin_pkg, catkin.find_in_workspaces and rospkg seem to be not available in an ament build environment either.

If no concept for ament_virtualenv exists yet, I'd like to start the discussion about making one.

Thank you for your work and your time!

Startup Error after bloom packaging

I am using this package to wrap up some ROS utility classes and scripts. I included it into my Jenkins build-deploy pipeline and all goes well, including the deb file packaging. However, when I attempt

rosrun <package> <script name>

I get an import error when it tries to pull in rospy:

ImportError: cannot import name _remove_dead_weakref

This is a system library, so I wonder if rosrun is not activating the virtual environment correctly. Has anyone run into a similar issue when deploying with this tool?

Update: I ran my build-deploy process using the test_catkin_virtualenv package and had the same error output, but generated from a rosunit import.

Expand the version_regex pattern

Getting this error:

[ 10%] Generating ../generated_requirements.txt
Traceback (most recent call last):
  File "/home/michael/rasa_ws/src/catkin_virtualenv/cmake/combine_requirements.py", line 60, in <module>
    sys.exit(combine_requirements(**vars(args)))
  File "/home/michael/rasa_ws/src/catkin_virtualenv/cmake/combine_requirements.py", line 39, in combine_requirements
    requirement = requirements.Requirement(requirement_string)
  File "/home/michael/rasa_ws/src/catkin_virtualenv/src/catkin_virtualenv/requirements.py", line 85, in __init__
    self.version = SemVer(fields[1])
  File "/home/michael/rasa_ws/src/catkin_virtualenv/src/catkin_virtualenv/requirements.py", line 34, in __init__
    string, self.version_regex.pattern))
RuntimeError: Invalid requirement version 1.0.post1, must match ^[0-9\.]+$
slang/CMakeFiles/slang_generate_virtualenv.dir/build.make:69: recipe for target 'generated_requirements.txt' failed

with this requirements.txt:

absl-py==0.5.0
astor==0.7.1
attrs==18.2.0
Automat==0.7.0
backports.functools-lru-cache==1.5
backports.weakref==1.0.post1
boto3==1.9.8
botocore==1.12.8
certifi==2018.8.24
chardet==3.0.4
cloudpickle==0.5.6
coloredlogs==10.0
constantly==15.1.0
cycler==0.10.0Could not find a version that satisfies the requirement backports.weakref==1.0 (from -r /home/michael/rasa_ws/build/generated_requirements.txt (line 5)) (from versions: 1.0rc1, 1.0.post1)
No matching distribution found for backports.weakref==1.0 (from -r /home/michael/rasa_ws/build/generated_requirements.txt (line 5))
docutils==0.14
enum34==1.1.6
funcsigs==1.0.2
functools32==3.2.3.post2
future==0.16.0
futures==3.2.0
gast==0.2.0
gevent==1.3.6
greenlet==0.4.15
grpcio==1.15.0
humanfriendly==4.16.1
hyperlink==18.0.0
idna==2.7
incremental==17.5.0
jmespath==0.9.3
jsonschema==2.6.0
kiwisolver==1.0.1
klein==17.10.0
Markdown==2.6.11
matplotlib==2.2.3
mock==2.0.0
monotonic==1.5
numpy==1.15.1
packaging==17.1
pathlib==1.0.1
pbr==4.2.0
protobuf==3.6.1
PyHamcrest==1.9.0
pyparsing==2.2.1
python-crfsuite==0.9.6
python-dateutil==2.7.3
pytz==2018.5
PyYAML==3.13
rasa-nlu==0.13.4
requests==2.19.1
s3transfer==0.1.13
scikit-learn==0.19.2
scipy==1.1.0
simplejson==3.16.0
six==1.11.0
sklearn-crfsuite==0.3.6
subprocess32==3.5.2
tabulate==0.8.2
tensorboard==1.10.0
tensorflow==1.10.1
termcolor==1.1.0
tqdm==4.26.0
Twisted==18.7.0
typing==3.6.6
urllib3==1.23
Werkzeug==0.14.1
zope.interface==4.5.0

So the line backports.weakref==1.0.post1 is failing it, specifically the post characters.

If I remove the posts from all versions, I see the pip error:

Could not find a version that satisfies the requirement backports.weakref==1.0 (from -r /home/michael/rasa_ws/build/generated_requirements.txt (line 5)) (from versions: 1.0rc1, 1.0.post1)
No matching distribution found for backports.weakref==1.0 (from -r /home/michael/rasa_ws/build/generated_requirements.txt (line 5))

So I can't use this package with the version_regex pattern as it is. It seems to me like this regex should
be more permissive, given that it's common practice in semantic versioning to do -rc, -SNAPSHOT, etc. depending on the language. Frankly I don't think .post is very descriptive or helpful, but eh, it's not my library... ¯\_(ツ)_/¯

Edit: I see why the regex is strict: casting to int in line 36 of requirements.py. I'd recommend just chopping off anything that can't be cast and calling that the internal _version.

Support VCS requirements

Consider a package defining a requirement in editable format (as documented here):

-e git+https://github.com/timtadh/pyflwor.git@f3861f73b2bf6106a0363c15d5de040d8b01d50f#egg=pyflwor

catkin_virtualenv (0.3.0) fails with a parse error as follows:

Scanning dependencies of target catkin_virtualenv_editable_error_generate_virtualenv
[ 33%] Generating generated_requirements.txt
Traceback (most recent call last):
  File "/home/nlimpert/dev/rosin_ws/src/catkin_virtualenv/catkin_virtualenv/scripts/combine_requirements", line 71, in <module>
    sys.exit(combine_requirements(**vars(args)))
  File "/home/nlimpert/dev/rosin_ws/src/catkin_virtualenv/catkin_virtualenv/scripts/combine_requirements", line 43, in combine_requirements
    requirement = Requirement(requirement_string)
  File "/usr/lib/python2.7/dist-packages/packaging/requirements.py", line 94, in __init__
    requirement_string[e.loc:e.loc + 8]))
packaging.requirements.InvalidRequirement: Invalid requirement, parse error at "'-e git+h'"
CMakeFiles/catkin_virtualenv_editable_error_generate_virtualenv.dir/build.make:70: recipe for target 'generated_requirements.txt' failed
make[2]: *** [generated_requirements.txt] Error 1
make[2]: *** Deleting file 'generated_requirements.txt'
CMakeFiles/Makefile2:163: recipe for target 'CMakeFiles/catkin_virtualenv_editable_error_generate_virtualenv.dir/all' failed
make[1]: *** [CMakeFiles/catkin_virtualenv_editable_error_generate_virtualenv.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

Note: The particular line was taken from executing pip freeze - (re-)installing it via pip install -r requirements.txt works.


Please find a small example package here.

ros-noetic-catkin-virtualenv dependency issue

I'm not sure this is the right place to log this issue, but the release of noetic on ubuntu 20 can't resolve it's own dependencies.

ros-noetic-catkin-virtualenv depends on python-virtualenv, which is not found.

Perhaps it is just a typo from python3-virtualenv? Curiously, the package also depends on virtualenv (without python-, found), so perhaps this dependency is not required at all.

Error:

$ sudo apt install ros-noetic-catkin-virtualenv
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
 ros-noetic-catkin-virtualenv : Depends: python-virtualenv but it is not installable
E: Unable to correct problems, you have held broken packages.

Failure with Python 3.10

I'm doing some tests in Ubuntu 22.04, and I'm seeing that requirements.txt generation is failing. The issue seems to be that with Python 3.10, venv internally installs packages into venv/local/bin instead of venv/bin, which makes the catkin_virtualenv fail when running pip-compile.

rospack dependency declaration missing?

This may be me doing something that is unsupported, but while building a package that build_depends on catkin_virtualenv in a prerelease build (following this procedure), I get errors about rospack not being a known command during the CMake configuration phase for that package.

Seems to be caused by cmake/catkin_generate_virtualenv.cmake using rosrun to invoke the various Python scripts in catkin_virtualenv (here).

These seem to go away after adding a build_export_depend on rospack to catkin_virtualenvs manifest (I get other errors then, but that's for another issue).

allow use of [ and ] in requirements.txt

"RuntimeError: Invalid requirement name apache-beam[gcp]==2.4, must match ^[A-Za-z0-9_-]+$"

this is a valid requirement name, needs updating. also that regex seems like it should include "<" and ">" chars as well, as per #12

catkin_virtualenv is resolvable by rosdep but not installable

I am trying to install catkin_virtualenv, it is listed as a ros package http://wiki.ros.org/catkin_virtualenv I can see that it resolves to using rosdep but I can't seem to install it.

~/workspace/tmp$ rosdep resolve catkin_virtualenv
#apt
ros-noetic-catkin-virtualenv
~/workspace/tmp$ rosdep install catkin_virtualenv

ERROR: Rosdep cannot find all required resources to answer your query
Missing resource catkin_virtualenv
ROS path [0]=/opt/ros/noetic/share/ros
ROS path [1]=/home/toor/workspace/tmp/src
ROS path [2]=/opt/ros/noetic/share

installing local python packages into virtualenv

this is not an issue but a question, please let me know if there's a more appropriate forum.

let's say I have a local python package, "foo", which is specified in the packages arg of generate_distutils_setup. in my requirements.txt, I have two dependencies, bar and baz. after running catkin_build, I cannot import bar or baz without activating the virtualenv, as expected. however, I /can/ import foo both inside and outside the virtualenv (though the import fails outside, due to the dependencies on bar and baz).

foo is not installed on my system, e.g. if I try to import foo without running catkin build python will not be able to find foo.

is this WAI? is there a way to structure my build such that foo is only discoverable when the virtualenv is activated?

Why does it install `pip` into the generated virtualenv?

The issue that I'm having is that building a component that uses catkin-virtualenv twice with some Python dependencies getting changed dies with this error:

  File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1573, in X509StoreFlags
    CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'

I've traced it down to catkin-virtualenv installing pip into the venv that it creates.

However, the version of that pip is different from the system pip.

Which means that when I try to build again, and catkin tried to install the deps into the virtual environment, it calls pip which is a hybrid of two pip versions, and they don't agree on pyopenssl (I think), leading to this traceback from crypto.

This begs the question though...

Why install pip into the generated venv?

What is the rationale for that?

Support subdirectory in VCS requirements

I want to use subdirectory syntax in requirements.txt to install a python module in a subdirectory of a repository:

-e git+https://github.com/cocodataset/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI

subdirectory syntax is written at https://pip.pypa.io/en/stable/reference/pip_install/#vcs-support
However, I encountered the following error when I ran catkin build:

Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/catkin_virtualenv/combine_requirements", line 85, in <module>
    sys.exit(combine_requirements(**vars(args)))
  File "/opt/ros/kinetic/lib/catkin_virtualenv/combine_requirements", line 56, in combine_requirements
    requirement_string, str(vcs_err), str(semver_err)))
RuntimeError: Could not match requirement -e git+https://github.com/cocodataset/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI for VCS (No match for ^(?P<scheme>git|git\+https|git\+ssh|git\+git|hg\+http|hg\+https|hg\+static-http|hg\+ssh|svn|svn\+svn|svn\+http|svn\+https|svn\+ssh|bzr\+http|bzr\+https|bzr\+ssh|bzr\+sftp|bzr\+ftp|bzr\+lp)://((?P<login>[^/@]+)@)?(?P<path>[^#@]+)(@(?P<revision>[^#]+))?(#egg=(?P<name>[^&]+))?$) or SemVer (Invalid requirement, parse error at "'-e git+h'")
make[2]: *** [generated_requirements.txt] Error 1

#40 doesn't seem to support the subdirectory syntax.

How do you run this?

after reading all the documentation and spending a lot of time searching the web I still do not understand how to use this package. There is no launch file and no information on how to actually use this package. Any help is much appreciated, thanks!

Using generated virtualenv in dynamic_reconfigure

Is it possible to use the generated virtual environment to generate dynamic_reconfigure parameters? As I understand, dynamic_reconfigure's .cfg files are just Python scripts, so I imagine it would be possible to execute them in any environment.

Background on my usecase (the Why?)
I am using XML files to describe a simulation environment. Each file can have multilpe scenarios or things that can happen in that environment. There is a library for parsing these XML files, which I would like to use to retrieve the set of possible (environment, scenario) tuples and allow each of them to be selected via dynamic_reconfigure.

ModuleNotFoundError: No module named 'catkin_pkg'

Hi!
I am trying to use this repo, but I cannot handle some problems.
Namely, when I try to catkin_make workspace I get error:

[ 25%] Generate virtualenv in /home/piotr/catkin_ws/build/venv
Traceback (most recent call last):
  File "/home/piotr/catkin_ws/src/catkin_virtualenv/catkin_virtualenv/scripts/venv_init", line 24, in <module>
    from catkin_virtualenv.venv import Virtualenv
  File "/home/piotr/catkin_ws/src/catkin_virtualenv/catkin_virtualenv/src/catkin_virtualenv/venv.py", line 33, in <module>
    from .collect_requirements import collect_requirements
  File "/home/piotr/catkin_ws/src/catkin_virtualenv/catkin_virtualenv/src/catkin_virtualenv/collect_requirements.py", line 25, in <module>
    from catkin.find_in_workspaces import find_in_workspaces
  File "/opt/ros/melodic/lib/python2.7/dist-packages/catkin/find_in_workspaces.py", line 39, in <module>
    from catkin_pkg.packages import find_packages
ModuleNotFoundError: No module named 'catkin_pkg'

I did not modify package at all.
Full error message: pastebin

Thank you in advance!

Build failures on O(S)R(F) buildfarm: "no attribute '__legacy__'"

tl;dr: before I set USE_SYSTEM_PACKAGES FALSE and increase the size of my package by 34 MB, do you recognise the below described error?


Long version: not asking you to fix anything (yet ;) ), just curious whether you've ran into this yourself perhaps (which could save me quite some time).

Builds of a released ROS package (haros_catkin) which depends on catkin_virtualenv have been failing for a long time on Kinetic and Melodic on all architectures except amd64 for some reason (I don't even know for how long already, as the mailhost for build.ros.org is on a spamlist, and I've not received any emails from it since Sept 2019).

Example error from a failed build:
Installing pip, wheel...done.
Running virtualenv with interpreter /usr/bin/python2
  ERROR: Command errored out with exit status 1:
   command: /tmp/binarydeb/ros-melodic-haros-catkin-0.1.1/obj-aarch64-linux-gnu/venv/bin/python /tmp/binarydeb/ros-melodic-haros-catkin-0.1.1/obj-aarch64-linux-gnu/venv/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpabxgc0
       cwd: /tmp/pip-install-yQ6DgO/lazy-object-proxy
  Complete output (10 lines):
  Traceback (most recent call last):
    File "/tmp/binarydeb/ros-melodic-haros-catkin-0.1.1/obj-aarch64-linux-gnu/venv/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 257, in <module>
      main()
    File "/tmp/binarydeb/ros-melodic-haros-catkin-0.1.1/obj-aarch64-linux-gnu/venv/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 240, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/tmp/binarydeb/ros-melodic-haros-catkin-0.1.1/obj-aarch64-linux-gnu/venv/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 85, in get_requires_for_build_wheel
      backend = _build_backend()
    File "/tmp/binarydeb/ros-melodic-haros-catkin-0.1.1/obj-aarch64-linux-gnu/venv/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 76, in _build_backend
      obj = getattr(obj, path_part)
  AttributeError: 'module' object has no attribute '__legacy__'
  ----------------------------------------
ERROR: Command errored out with exit status 1: /tmp/binarydeb/ros-melodic-haros-catkin-0.1.1/obj-aarch64-linux-gnu/venv/bin/python /tmp/binarydeb/ros-melodic-haros-catkin-0.1.1/obj-aarch64-linux-gnu/venv/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpabxgc0 Check the logs for full command output.

This repeats a few times (because of retries).

It fails on arm64, armhf and i386, but not on amd64. This makes it difficult to diagnose, as I don't have access to any of those platforms (or at least: not easily). Tests with amd64 succeed.

Searching for the errors seems to suggest it has something to do with setuptools being old and --use-system-packages, where this could somehow lead to the system-provided setuptools being found before the one in the venv, causing pip failures (fi: pypa/pip#6164 (comment)), or because of running pip commands with the CWD being one which contains a setup.py (pypa/pip#6164 (comment)).

Disabling --use-system-packages is supported by catkin_virtualenv, but will increase the size of the package significantly (34MB+) and is not guaranteed to work (iiuc the linked issue).

Problems building a catkin package with catkin_virtualenv due to `requirements.in`

I am currently trying to run your setup on https://github.com/NVlabs/Deep_Object_Pose.

I have updated packages.xml and CMakeLists.txt accordingly and run catkin_make on catkin_virtualenv.

I get the following error when running: catkin_make -DCATKIN_WHITELIST_PACKAGES="dope": and trying to use requiments.in.

>>$ catkin_make -DCATKIN_WHITELIST_PACKAGES="dope"
Base path: /media/juan/sdd/ros/noetic/ros_ws
Source space: /media/juan/sdd/ros/noetic/ros_ws/src
Build space: /media/juan/sdd/ros/noetic/ros_ws/build
Devel space: /media/juan/sdd/ros/noetic/ros_ws/devel
Install space: /media/juan/sdd/ros/noetic/ros_ws/install
####
#### Running command: "cmake /media/juan/sdd/ros/noetic/ros_ws/src -DCATKIN_WHITELIST_PACKAGES=dope -DCATKIN_DEVEL_PREFIX=/media/juan/sdd/ros/noetic/ros_ws/devel -DCMAKE_INSTALL_PREFIX=/media/juan/sdd/ros/noetic/ros_ws/install -G Unix Makefiles" in "/media/juan/sdd/ros/noetic/ros_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /media/juan/sdd/ros/noetic/ros_ws/devel
-- Using CMAKE_PREFIX_PATH: /media/juan/sdd/ros/noetic/ros_ws/devel;/opt/ros/noetic
-- This workspace overlays: /media/juan/sdd/ros/noetic/ros_ws/devel;/opt/ros/noetic
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.10", minimum required is "3") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Using Debian Python package layout
-- Using empy: /usr/lib/python3/dist-packages/em.py
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /media/juan/sdd/ros/noetic/ros_ws/build/test_results
-- Forcing gtest/gmock from source, though one was otherwise available.
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /usr/bin/python3 (found version "3.8.10") 
-- Using Python nosetests: /usr/bin/nosetests3
-- catkin 0.8.10
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- Using CATKIN_WHITELIST_PACKAGES: dope
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 1 packages in topological order:
-- ~~  - dope
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'dope'
-- ==> add_subdirectory(vision/dope)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- Using system site packages
-- Using virtualenv to run Python nosetests: 
CMake Warning at python_tools/catkin_virtualenv/catkin_virtualenv/cmake/catkin_install_python.cmake:52 (message):
  Making /media/juan/sdd/ros/noetic/ros_ws/src/vision/dope/nodes/camera
  non-executable.  Otherwise 'rosrun dope camera' will not work as expected.
Call Stack (most recent call first):
  vision/dope/CMakeLists.txt:178 (catkin_install_python)


CMake Warning at python_tools/catkin_virtualenv/catkin_virtualenv/cmake/catkin_install_python.cmake:52 (message):
  Making /media/juan/sdd/ros/noetic/ros_ws/src/vision/dope/nodes/dope
  non-executable.  Otherwise 'rosrun dope dope' will not work as expected.
Call Stack (most recent call first):
  vision/dope/CMakeLists.txt:178 (catkin_install_python)


CMake Warning at python_tools/catkin_virtualenv/catkin_virtualenv/cmake/catkin_install_python.cmake:52 (message):
  Making /media/juan/sdd/ros/noetic/ros_ws/src/vision/dope/scripts/train.py
  non-executable.  Otherwise 'rosrun dope train.py' will not work as
  expected.
Call Stack (most recent call first):
  vision/dope/CMakeLists.txt:178 (catkin_install_python)


-- Configuring done
-- Generating done
-- Build files have been written to: /media/juan/sdd/ros/noetic/ros_ws/build
####
#### Running command: "make -j8 -l8" in "/media/juan/sdd/ros/noetic/ros_ws/build"
####
Scanning dependencies of target dope_generate_virtualenv
make[2]: *** No rule to make target '/media/juan/sdd/ros/noetic/ros_ws/src/requirements.in', needed by '/media/juan/sdd/ros/noetic/ros_ws/src/vision/dope/requirements.txt'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:2088: vision/dope/CMakeFiles/dope_generate_virtualenv.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
Invoking "make -j8 -l8" failed

I am not sure if this is failing due to the presence of .py files in nodes and scripts, or something else?

The contents of package.xml is:

<?xml version="1.0"?>
<package format="2">
  <name>dope</name>
  <version>0.0.0</version>
  <description>The DOPE package for deep object pose estimation</description>

  <!-- One maintainer tag required, multiple allowed, one person per tag -->
  <!-- Example:  -->
  <!-- <maintainer email="[email protected]">Jane Doe</maintainer> -->
  <maintainer email="[email protected]">jtremblay</maintainer>


  <!-- One license tag required, multiple allowed, one license per tag -->
  <!-- Commonly used license strings: -->
  <!--   BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
  <license>CC BY-NC-SA 4.0</license>


  <!-- Url tags are optional, but multiple are allowed, one per tag -->
  <!-- Optional attribute type can be: website, bugtracker, or repository -->
  <!-- Example: -->
  <url type="website">https://research.nvidia.com/publication/2018-09_Deep-Object-Pose</url>


  <!-- Author tags are optional, multiple are allowed, one per tag -->
  <!-- Authors do not have to be maintainers, but could be -->
  <!-- Example: -->
  <!-- <author email="[email protected]">Jane Doe</author> -->


  <!-- The *depend tags are used to specify dependencies -->
  <!-- Dependencies can be catkin packages or system dependencies -->
  <!-- Examples: -->
  <!-- Use depend as a shortcut for packages that are both build and exec dependencies -->
  <!--   <depend>roscpp</depend> -->
  <!--   Note that this is equivalent to the following: -->
  <!--   <build_depend>roscpp</build_depend> -->
  <!--   <exec_depend>roscpp</exec_depend> -->
  <!-- Use build_depend for packages you need at compile time: -->
  <!--   <build_depend>message_generation</build_depend> -->
  <!-- Use build_export_depend for packages you need in order to build against this package: -->
  <!--   <build_export_depend>message_generation</build_export_depend> -->
  <!-- Use buildtool_depend for build tool packages: -->
  <!--   <buildtool_depend>catkin</buildtool_depend> -->
  <!-- Use exec_depend for packages you need at runtime: -->
  <!--   <exec_depend>message_runtime</exec_depend> -->
  <!-- Use test_depend for packages you need only for testing: -->
  <!--   <test_depend>gtest</test_depend> -->
  <!-- Use doc_depend for packages you need only for building documentation: -->
  <!--   <doc_depend>doxygen</doc_depend> -->
  <buildtool_depend>catkin</buildtool_depend>

  <!-- virtualenv -->
  <build_depend>catkin_virtualenv</build_depend>
  
  <depend>camera_info_manager_py</depend>
  <depend>cv_bridge</depend>
  <depend>geometry_msgs</depend>
  <depend>message_filters</depend>
  <depend>python-argparse</depend>
  <depend>resource_retriever</depend>
  <depend>rospy</depend>
  <depend>sensor_msgs</depend>
  <depend>std_msgs</depend>
  <depend>tf</depend>
  <depend>vision_msgs</depend>
  <depend>visualization_msgs</depend>
  <depend>python3-pyrr-pip</depend>
  <depend>python-pytorch-pip</depend>
  <depend>python3-numpy</depend>
  <depend>python3-scipy</depend>
  <depend>python3-opencv</depend>
  <depend>python3-pil</depend>
  <depend>python-configparser</depend>
  
  <!-- The export tag contains other, unspecified, tags -->
  <export>
    <pip_requirements>requirements.txt</pip_requirements>
  </export>
</package>

And the CMakeLists.txt file is:

cmake_minimum_required(VERSION 2.8.3)
project(dope)

## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
  cv_bridge
  geometry_msgs
  message_filters
  resource_retriever
  rospy
  sensor_msgs
  std_msgs
  tf
  vision_msgs
  visualization_msgs
  catkin_virtualenv
)

# Generate the virtualenv
catkin_generate_virtualenv(
  # Specify the input requirements for this package that catkin_virtualenv will automatically lock.
  INPUT_REQUIREMENTS requirements.in
  )

## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)


## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
catkin_python_setup()

################################################
## Declare ROS messages, services and actions ##
################################################

## To declare and build messages, services or actions from within this
## package, follow these steps:
## * Let MSG_DEP_SET be the set of packages whose message types you use in
##   your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
## * In the file package.xml:
##   * add a build_depend tag for "message_generation"
##   * add a build_depend and a exec_depend tag for each package in MSG_DEP_SET
##   * If MSG_DEP_SET isn't empty the following dependency has been pulled in
##     but can be declared for certainty nonetheless:
##     * add a exec_depend tag for "message_runtime"
## * In this file (CMakeLists.txt):
##   * add "message_generation" and every package in MSG_DEP_SET to
##     find_package(catkin REQUIRED COMPONENTS ...)
##   * add "message_runtime" and every package in MSG_DEP_SET to
##     catkin_package(CATKIN_DEPENDS ...)
##   * uncomment the add_*_files sections below as needed
##     and list every .msg/.srv/.action file to be processed
##   * uncomment the generate_messages entry below
##   * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)

## Generate messages in the 'msg' folder
# add_message_files(
#   FILES
#   Message1.msg
#   Message2.msg
# )

## Generate services in the 'srv' folder
# add_service_files(
#   FILES
#   Service1.srv
#   Service2.srv
# )

## Generate actions in the 'action' folder
# add_action_files(
#   FILES
#   Action1.action
#   Action2.action
# )

## Generate added messages and services with any dependencies listed here
# generate_messages(
#   DEPENDENCIES
#   std_msgs
# )

################################################
## Declare ROS dynamic reconfigure parameters ##
################################################

## To declare and build dynamic reconfigure parameters within this
## package, follow these steps:
## * In the file package.xml:
##   * add a build_depend and a exec_depend tag for "dynamic_reconfigure"
## * In this file (CMakeLists.txt):
##   * add "dynamic_reconfigure" to
##     find_package(catkin REQUIRED COMPONENTS ...)
##   * uncomment the "generate_dynamic_reconfigure_options" section below
##     and list every .cfg file to be processed

## Generate dynamic reconfigure parameters in the 'cfg' folder
# generate_dynamic_reconfigure_options(
#   cfg/DynReconf1.cfg
#   cfg/DynReconf2.cfg
# )

###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if your package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
  CATKIN_DEPENDS geometry_msgs sensor_msgs std_msgs vision_msgs visualization_msgs
#  DEPENDS system_lib
)

###########
## Build ##
###########

## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
# include
  ${catkin_INCLUDE_DIRS}
)

## Declare a C++ library
# add_library(${PROJECT_NAME}
#   src/${PROJECT_NAME}/dope/dope.cpp
# )

## Add cmake target dependencies of the library
## as an example, code may need to be generated before libraries
## either from message generation or dynamic reconfigure
# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

## Declare a C++ executable
## With catkin_make all packages are built within a single CMake context
## The recommended prefix ensures that target names across packages don't collide
# add_executable(${PROJECT_NAME}_node src/dope_vis_node.cpp)

## Rename C++ executable without prefix
## The above recommended prefix causes long target names, the following renames the
## target back to the shorter version for ease of user use
## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node"
# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "")

## Add cmake target dependencies of the executable
## same as for the library above
# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

## Specify libraries to link a library or executable target against
# target_link_libraries(${PROJECT_NAME}_node
#   ${catkin_LIBRARIES}
# )

#############
## Install ##
#############

# all install targets should use catkin DESTINATION variables
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html

## Mark executable scripts (Python etc.) for installation
## in contrast to setup.py, you can choose the destination
install(FILES requirements.txt
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)

catkin_install_python(PROGRAMS
  nodes/camera
  nodes/dope
  scripts/train.py
  DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})

## Mark executables and/or libraries for installation
# install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_node
#   ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
#   LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
#   RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )

## Mark cpp header files for installation
# install(DIRECTORY include/${PROJECT_NAME}/
#   DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
#   FILES_MATCHING PATTERN "*.h"
#   PATTERN ".svn" EXCLUDE
# )

## Mark other files for installation (e.g. launch and bag files, etc.)
# install(FILES
#   # myfile1
#   # myfile2
#   DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
# )

#############
## Testing ##
#############

## Add gtest based cpp test target and link libraries
# catkin_add_gtest(${PROJECT_NAME}-test test/test_dope_vis.cpp)
# if(TARGET ${PROJECT_NAME}-test)
#   target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
# endif()

## Add folders to be run by python nosetests
# catkin_add_nosetests(test)

This is my current file structure:

── CMakeLists.txt
├── config
│   ├── camera_info.yaml
│   ├── config_pose.yaml
│   ├── config_pose.yaml~
│   ├── config_pose.yaml.orig
│   └── config_pose.yaml.orig~
├── doc
│   └── camera_tutorial.md
├── docker
│   ├── Dockerfile.noetic
│   ├── init_workspace.sh
│   ├── readme.md
│   └── run_dope_docker.sh
├── dope_objects.png
├── launch
│   ├── camera.launch
│   └── dope.launch
├── license.md
├── nodes
│   ├── camera
│   └── dope
├── package.xml
├── readme.md
├── requirements.in
├── requirements.txt
├── scripts
│   └── train.py
├── setup.py
├── src
│   └── dope
├── weights

If I comment requirement.in, then I get another set of incompatibility errors with dependencies as shown below:

####
#### Running command: "make -j8 -l8" in "/media/juan/sdd/ros/noetic/ros_ws/build"
####
[ 25%] Generate virtualenv in /media/juan/sdd/ros/noetic/ros_ws/build/venv
True
ERROR: py-deps 1.0.1 has requirement setuptools>=46.1, but you'll have setuptools 44.0.0 which is incompatible.
ERROR: pgraph 1.0.3 has requirement setuptools<47.0,>=46.0, but you'll have setuptools 44.0.0 which is incompatible.
[ 50%] Install requirements to /media/juan/sdd/ros/noetic/ros_ws/build/venv
ERROR: torchtext 0.6.0 requires torch, which is not installed.
ERROR: tensorflow 2.3.1 requires absl-py>=0.7.0, which is not installed.
ERROR: tensorboard 2.4.0 requires absl-py>=0.4, which is not installed.
ERROR: sphinx 3.5.3 requires alabaster<0.8,>=0.7, which is not installed.
ERROR: pytorch-lightning 1.1.0 requires torch>=1.3, which is not installed.
ERROR: hydra-core 1.0.4 requires antlr4-python3-runtime==4.8, which is not installed.
ERROR: tensorflow 2.3.1 has requirement h5py<2.11.0,>=2.10.0, but you'll have h5py 3.1.0 which is incompatible.
ERROR: awscli 1.19.64 has requirement docutils<0.16,>=0.10, but you'll have docutils 0.16 which is incompatible.
ERROR: roboticstoolbox-python 0.6.2 requires ansitable, which is not installed.
ERROR: spatialmath-python 0.8.7 requires ansitable, which is not installed.
ERROR: robosuite 1.2.2 has requirement mujoco-py==2.0.2.13, but you'll have mujoco-py 2.0.2.2 which is incompatible.
[ 75%] Prepare relocated virtualenvs for develspace and installspace
[100%] Per-package virtualenv target
[100%] Built target dope_generate_virtualenv

My current requirements.txt looks as follows:

pyrr==0.10.3
torch==1.6.0
torchvision==0.7.0
numpy==1.17.4
scipy==1.5.2
opencv_python==4.4.0.44
Pillow==8.1.1
configparser==5.0.0

Are these ERROR springing up from dependencies detected with other packages in my PYTHON_PATH?

Selecting a specific Minor version of Python.

The documentation explains that we can pick which major version of Python is used via: PYTHON_VERSION_MAJOR 3 # Default 2

However, as an implementation detail, we can actually pass minor versions too. Eg:
PYTHON_VERSION_MAJOR 3.7 works.

I'm thinking about how to formalize this capability without breaking backwards compatibility. The short term answer is to document this quirk. I think maybe more complete solution is to replace PYTHON_VERSION_MAJOR with PYTHON_VERSION while retaining support for the former.

@paulbovbel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.