# Compiling legacy UAVCAN GUI tool

**URL:** <https://forum.opencyphal.org/t/compiling-legacy-uavcan-gui-tool/1038>\
**Category:** Applications & Usage\
**Created:** [December 22, 2020, 9:56am UTC](https://forum.opencyphal.org/t/compiling-legacy-uavcan-gui-tool/1038 "2020-12-22T09:56:12Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![anton](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/a/d9b06d/32.png) [@anton](https://forum.opencyphal.org/u/anton)\
**Post date:** [December 22, 2020, 9:56am UTC](https://forum.opencyphal.org/t/compiling-legacy-uavcan-gui-tool/1038/1 "2020-12-22T09:56:12Z")

</div>

Hello, I try to compile the legacy GUI tool on Windows (yes, I know about UAVCANv1 and Yukon, but I need UAVCANv0 at the moment), but without success.  
The uavcan\_gui\_tool packages was installed without any problems (only PyQtGraph is not compatible with my Python 3.8, so I had to modify ptime.py), I can start it and it works good.  
But when I try to do “bdist\_msi” or 'build\_exe" I get this error message:

> cx\_Freeze.common.ConfigError: cannot find file/directory named build\hatched\_eggs\uavcan

cx\_freeze was installed before compilation.

What could be a reason?

Thank you!

---

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [December 22, 2020, 10:01am UTC](https://forum.opencyphal.org/t/compiling-legacy-uavcan-gui-tool/1038/2 "2020-12-22T10:01:08Z")

</div>

A debugging session is in order. See if the following is executed correctly and if there are any missing outputs in the specified directory:

> <https://github.com/UAVCAN/gui_tool/blob/65375977cdedb130c1838ab237ad66e4d37e4d58/setup.py#L152-L166>

---

<div class="post-metadata">

**Author:** ![anton](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/a/d9b06d/32.png) [@anton](https://forum.opencyphal.org/u/anton)\
**Post date:** [December 22, 2020, 10:28am UTC](https://forum.opencyphal.org/t/compiling-legacy-uavcan-gui-tool/1038/3 "2020-12-22T10:28:49Z")

</div>

> [@pavel.kirienko](#):
>
> `unpacked_eggs_dir`

This directory doesn’t exist: \build\hatched\_eggs’  
But build approach doesn’t show any errors.  
Where have I to find this dir to check?

---

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [December 22, 2020, 10:39am UTC](https://forum.opencyphal.org/t/compiling-legacy-uavcan-gui-tool/1038/4 "2020-12-22T10:39:25Z")

</div>

It is supposed to be created in your current working directory, which should be the root of the repository (that is, where `setup.py` is). Maybe you should try an older version of Python to see if the problem is version-specific.

---

<div class="post-metadata">

**Author:** ![anton](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/a/d9b06d/32.png) [@anton](https://forum.opencyphal.org/u/anton)\
**Post date:** [December 22, 2020, 11:05am UTC](https://forum.opencyphal.org/t/compiling-legacy-uavcan-gui-tool/1038/5 "2020-12-22T11:05:46Z")

</div>

What is the best choice? 3.7 or lower?

---

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [December 22, 2020, 11:07am UTC](https://forum.opencyphal.org/t/compiling-legacy-uavcan-gui-tool/1038/6 "2020-12-22T11:07:07Z")

</div>

Try 3.5 first because IIRC it is the latest version that has actually been tested with the old GUI tool.

---

<div class="post-metadata">

**Author:** ![anton](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/a/d9b06d/32.png) [@anton](https://forum.opencyphal.org/u/anton)\
**Post date:** [December 22, 2020, 12:13pm UTC](https://forum.opencyphal.org/t/compiling-legacy-uavcan-gui-tool/1038/7 "2020-12-22T12:13:55Z")

</div>

I have manually copied uavcan directory from site-packages to \build\hatched\_eggs, now it is running. But another error:

> FileNotFoundError: [Errno 2] No such file or directory: ‘c:\users\anton\appdata\local\programs\python\python38\lib\site-packages\uavcan-1.0.0.dev33-py3.8.egg\uavcan-1.0.0.dev33.dist-info\METADATA’

I have already renamed this directory to “uavcan-1.0.0.dev33.dist-info” because of missing LICENSE file, but METADATA is really missing there.

---

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [December 22, 2020, 12:16pm UTC](https://forum.opencyphal.org/t/compiling-legacy-uavcan-gui-tool/1038/8 "2020-12-22T12:16:22Z")

</div>

I don’t really know what is happening there, sorry. I see that you are still using Python 3.8, have you tried an older version?

---

<div class="post-metadata">

**Author:** ![anton](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/a/d9b06d/32.png) [@anton](https://forum.opencyphal.org/u/anton)\
**Post date:** [January 7, 2021, 1:55pm UTC](https://forum.opencyphal.org/t/compiling-legacy-uavcan-gui-tool/1038/9 "2021-01-07T13:55:21Z")

</div>

Hello Pavel, I finally could compile it.

The way with an older Python version was not so really productive, almost every used package must be installed with downgrading option, there are a lot of mutually exclusive dependencies, so I’ve tried to get it to work with my current 3.8 installation.  
After a lot of tests I found a right and simple possibility to achieve the goal. I had to downgrade cx\_Freeze to 6.1 and to modify setup.py by excluding uavcan package from include\_files.

Hope it helps other developers.

---

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [January 12, 2021, 4:52pm UTC](https://forum.opencyphal.org/t/compiling-legacy-uavcan-gui-tool/1038/10 "2021-01-12T16:52:23Z")

</div>

Hey Anton, I am currently doing the same thing and `setup.py bdist_msi` fails at `build_exe` executed by cx\_Freeze with:

```auto
ImportError: No module named 'uavcan_gui_tool __main__'

```

There is no typo here: it is literally looking for **`uavcan_gui_tool __main__ `** (not `uavcan_gui_tool. __main__ ` which would be understandable).

I tried feeding it an empty stub `uavcan_gui_tool __main__.py` but it didn’t help. I am using cx\_Freeze v6.1 (other versions fail for different reasons). Do you happen to have a suggestion for me here?

Thanks in advance.
