Closed danzimmerman closed 2 years ago
Many thanks for the great bug report and digging around! I'd like to further pin down the issue.
What happens if you mamba install python=3.9
again, then create a new environment with mamba create -n test python=3.8 pywin32
and mamba activate test
. Can you then python and/or mamba in that test environment, or does it fail as well?
What happens if you mamba install python=3.9 again, then create a new environment with mamba create -n test python=3.8 pywin32 and mamba activate test. Can you then python and/or mamba in that test environment, or does it fail as well?
Seems like after running mamba install python=3.9
in base
, the base
and test
environment work, but the galactic
environment is broken.
test
environment setup:
base
environment setup
galactic
environment setup
mamba info
(test)
(base)
(galactic)
Hmmm.. trickier than I'd like it to be ;). How about installing colcon-common-extensions in the test environment now? Then cmake and compilers etc, and then ros-galactic-base? When does it break?
Adding to test
colcon-common-extensions
is finecmake
is finevs2019_win-64
is fine (wanted to check it early)compilers
is finepkg-config
is fineninja
is fineros-galactic-ros-base
breaks itros-galactic-ros-base
changes:
I also tried making two minimal environments with the specific different Python builds
(base) C:\code>mamba create --name test_orig python=3.8.12=h900ac77_2_cpython pywin32
(base) C:\code>mamba create --name test_alt python=3.8.12=h7840368_2_cpython pywin32
Those environments both work. I'll drill down further when I get a chance, but if there's anything that feels more likely in the ROS base packages/dependencies I can try that first.
Thanks for hanging in there, @danzimmerman! Very weird error still .. @wolfv @traversaro do you have any input?
Those packages look "suspicious" and might be worth trying to add package by package: getopt-win32 m2w64-gcc-libgfortran m2w64-gcc-libs m2w64-gmp m2w64-libwinpthread-git
But honestly I'm not sure what's going on ..
We've just rebuilt the Windows packages. Could you please try whether your problems are now resolved (note that we build against python=3.9)?
@Tobias-Fischer Yes, looks like it's working 👍
note that we build against python=3.9
All the distributions have been switched over to 3.9, yeah? The "Getting Started" page still says
mamba create -n ros_env python=3.8
I followed everything in the instructions verbatim except initializing the galactic
environment with Python 3.9. Mambaforge base environment is Python 3.9.7.
Great!
Issue Description
I'm having trouble installing ROS2 Galactic on Windows 11 according to the Getting Started Instructions.
The steps up to and including
mamba install ros-galactic-desktop
are fine.However,
mamba
breaks after runningAny subsequent
mamba
commands error out withIn prior debugging, I isolated the issue to the installation of
pywin32
that's required bycolcon-common-extensions
. An example of the full error is given below.mamba info
Full Error Output:Interim Solution
It appears that downgrading to Python 3.8 in the
(base)
environment is sufficient to fix this for my freshmambaforge
installation:However, based on the prior attempt described below, I also expect that the
pywin32
version in(base)
and my(galactic)
ROS2 environment also needs to match.Prior Attempt
I reported this initially in the Robostack Gitter chat using an existing
miniconda3
installation. This attempt uses a fresh install ofmambaforge
to follow the instructions exactly instead. The specific error thrown there was different:I fixed my
miniconda3
installation by installing the same version ofpywin32
in the base environment, as suggested byhttps://github.com/mhammond/pywin32/issues/1730#issuecomment-884849762
Also potentially related:
https://github.com/jupyter/notebook/issues/4980
pywin32
Postinstall ScriptThe
pywin32
installation instructions have a batch script that attempts to clean up after previouspywin32
installations.https://github.com/mhammond/pywin32#installing-via-pip
However, running this postinstall script on my
miniconda3
installation simply triggered a number of runtime DLL load errors, possibly by deleting something from the base environmentpywin32
.I still had to upgrade
pywin32
in the base environment on myminconda3
installation. The postinstall script also broke my Noetic installation, so I thinkpywin32
andpython
might have to match in ALL of the different virtual environments related to a single base environment.This suggests that the
mambaforge
installation might have to remain isolated to Robostack ROS and only Robostack ROS.I haven't dug into the postinstall script to figure out what it does, but I don't recommend running it if you have other virtual environments that depend on
pywin32
. They may break.Summary
It appears that to successfully install Robostack ROS2 Galactic with
colcon-common-extensions
on Windows, it is necessary to downgrade to Python 3.8 in the base environment and possibly ensure that thepywin32
versions in the base and ROS2 environments match.