I can't find lib_audio_dsp repository!

Discussions relating to the XK-EVK-XU316
User avatar
xhuw
Verified
Active Member
Posts: 54
Joined: Wed May 22, 2024 2:36 pm

Post by xhuw »

Thanks Al, It looks like pip was trying to build matplotlib (a third-party dependency of ours) from source. I have never seen this happen before as it usually downloads precompiled binaries. I need to investigate what scenarios this will occur in.

I agree that the setup guide needs some work. We have it in the backlog, so expect some improvement in the next release.
XMOS Software Engineer

Image
alwalker
Experienced Member
Posts: 100
Joined: Sun Apr 08, 2018 11:19 pm

Post by alwalker »

Hi xhuw,

Thanks very much, I'm on holiday for the next couple of weeks so you have a bit of time. Can I suggest doing the lib_audio_dsp setup from scratch on a box-fresh Win 11 PC so that there are no existing software installations that might modify the behaviour of pip etc.?

I understand that with the available resources it might take time for the formal documentation to be updated, but posting a step-by-step installation guide on this forum would be a helpful interim measure.

Do you have a timescale for the lib_audio_dsp v2.0 release please?

Kind regards,

Al
alwalker
Experienced Member
Posts: 100
Joined: Sun Apr 08, 2018 11:19 pm

Post by alwalker »

Hi xhuw,

Any updates please?
alwalker
Experienced Member
Posts: 100
Joined: Sun Apr 08, 2018 11:19 pm

Post by alwalker »

Hi,

I see that lib_audio_dsp v1.3.0 has just been released and that the installation sequence has been changed from v1.2.0.

Is this change intended to resolve the issue that I encountered please?

Kind regards,

Al
User avatar
xhuw
Verified
Active Member
Posts: 54
Joined: Wed May 22, 2024 2:36 pm

Post by xhuw »

Hey Al, 1.3.0 is intended to solve some of the issues with the setup guide. The docs are attached to the GitHub release here https://github.com/xmos/lib_audio_dsp/r ... tag/v1.3.0

I remember you posted a specific issue with installing matplotlib, which I have not investigated, so you may encounter that again. If you do, then it would be useful if you could give us some more details about your system (OS version, architecture)

We will be pushing updates to the appnotes AN02014 and an02015 next week which have been thoroughly tested on multiple windows machines.

https://www.xmos.com/file/an02014-integ ... nce-design

https://www.xmos.com/file/an02015-run-t ... pplication
XMOS Software Engineer

Image
alwalker
Experienced Member
Posts: 100
Joined: Sun Apr 08, 2018 11:19 pm

Post by alwalker »

Hi xhuw,

I'm running a Windows 11 installation on an Intel Core i5-8279U CPU @ 2.40GHz with 16.0 GB RAM

Currently Windows 11 Pro version 23H2 OS build 22631.5189

I first ran the XTC Tools 15.3.1 Command Prompt to launch Windows Terminal and set the environment, and then navigated to my workspace folder.

I just started the installation of v1.3.0, however appear to have hit a snag where the version of Python is not detected. As you can see from the attached when I run cmake -B build -G Ninja, I get the following issue reported on line 7:

Excluding lib_audio_dsp stages as Python not available

As you can see from the bottom of the attachment python --version does not work, however py --version reports the Python version correctly.

Settings > Apps > Advanced app settings > App execution aliases doesn't provide the abilty to create an alias between these two versions of the Python version command.

Any ideas please?

Kind regards,

Al
You do not have the required permissions to view the files attached to this post.
User avatar
xhuw
Verified
Active Member
Posts: 54
Joined: Wed May 22, 2024 2:36 pm

Post by xhuw »

Hey, looks like windows is being "helpful" here by assuming you would use the windows store to get python.

There are 2 possible reasons this problem is appearing:

1. When you installed python the install directory was not added to your PATH.
2. The windows App execution alias is being used in favour of what is on your path.

To solve 1:

- Find the installation directory of your Python 3.13.1 (it's often something like C:\Users\<YourUsername>\AppData\Local\Programs\Python\Python313 or C:\Program Files\Python313).
- Find the Scripts subdirectory within that (e.g., ...\Python313\Scripts).
- Add both of these directories to your system's PATH environment variable. From the start menu -> search "view advanced system settings" -> click "environment variables" -> under "user variables" find and double click on "Path" -> add both directories and move them to the top.
python-on-path.png
To solve 2:

Go to advanced app aliases (you mentioned) and turn off the aliases for python:
python-app-alias.png
You do not have the required permissions to view the files attached to this post.
XMOS Software Engineer

Image
User avatar
xhuw
Verified
Active Member
Posts: 54
Joined: Wed May 22, 2024 2:36 pm

Post by xhuw »

Hey Al, was just chatting with a colleague about this and the better solution would be for you to use a python virtual environment. Also we recommend python 3.12 as this is what we have tested.


To create a virtual environment called ".venv" in the current directory, run the following command:

Code: Select all

py -3.12 -m venv .venv
Then to activate it run:

Code: Select all

.venv\Scripts\activate
This will add python to your path for the current session. Every time you open a new terminal you will have to reactivate the virtual environment for it to work

A python virtual environment wont have any pip packages installed so you will need to reinstall the python dependencies
XMOS Software Engineer

Image
alwalker
Experienced Member
Posts: 100
Joined: Sun Apr 08, 2018 11:19 pm

Post by alwalker »

Hi xhuw,

I installed Python 3.12 and set the Environment Variables path as shown:

250507 Python312 Path.png
I then followed the installation instructions in the v1.3.0 documentation, but launching the Python virtual environment prior to the CMake process, however I still get a slightly differently worded error:

Excluding lib_audio_dsp stages as audio_dsp Python package not available

Please see attached.

kind regards,

Al
You do not have the required permissions to view the files attached to this post.
User avatar
xhuw
Verified
Active Member
Posts: 54
Joined: Wed May 22, 2024 2:36 pm

Post by xhuw »

nice! now cmake _is_ finding python, but the audio_dsp package isn't installed in the virtual environment. So with the virtual environment active, install the dependencies

Code: Select all

pip install -e C:\Workspace\XMOS\XTC_15.3.1\lib_audio_dsp_sandbox\lib_audio_dsp\python

pip install notebook==7.2.1
_then_ rerun cmake and that warning will hopefully disappear and you will be able to compile the application
XMOS Software Engineer

Image