- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I am experimenting with the above and has problem when install cysecuretools using macOS terminal for example project "secure Blinky LED FreeRTOS". I have attachment the terminal log below.
Note: The log is when I run the "pip install -U cysecuretools" in macOS terminal.
Still, I get 1 error msg for same command executed in ModusToolBox project terminal window. Only difference in last few lines compared with attachment log.
"note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for cmsis-pack-manager
Failed to build cmsis-pack-manager
ERROR: Could not build wheels for cmsis-pack-manager, which is required to install pyproject.toml-based projects"
In addition, I have error with the following commands. What do they do?
update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2
error is "zsh: command not found: update-alternatives"
I am running ModusToolbox_2.4.0.5972 and Python3.10.3
Also, Does anyone know how to set environment variables for the above so I do not need to retype these 3 commands every time I reboot the OS?
echo 'alias python=python3' >> ~/.bash_profile
echo 'alias pip=pip3' >> ~/.bash_profile
source ~/.bash_profile
Thanks and Regards
CW
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please close this thread. Problem resolved. It seems cysecuretools only support 32 bit python version. I manage get cysecuretools working after changing to version python-3.9.8-macosx10.9.pkg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @chwaitang,
When you install ModusToolbox you should have cysecuretools already present in the MTB environment. You need not separately install cysecuretools again.
In addition to that, I believe you have Python 3.1 and Python 2.7. The minimum prerequisite is Python 3.6.
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rakshith,
Thanks for reply. I am new to macOS. I did following in ModusToolbox terminal;
tangcw@Tangs-MacBook-Pro cm4_app % python --version
zsh: command not found: python
tangcw@Tangs-MacBook-Pro cm4_app % python3 --version
Python 3.10.3
tangcw@Tangs-MacBook-Pro cm4_app %
So what is the version registered with ModusToolbox? How can I switch to version 3.10.3?
Please state step by step the way to do that if possible.
Otherwise can I uninstall ModusToobox and then re-install? I remember I did not install any Python app b4 ModusToolbox installation. I installed ver 3.10.3 later. Will that help?
Warm regards
CW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rakshith,
I have done:
1) full re-install of python ver 3.10.2
2) install pyenv and set global to ver 3.10.2
3) remove and reinstall of ModusToolbox_2.4.0.5972-macos-install.pkg
4) installed and added CMSIS Packs perspective in ModusToolbox
5) download and installed cypress CMSIS pack for device CYB0644ABZI-S2D44 for Secure Blinky LED FreeRTOS example in my CY8CKIT-064B0S2-4343W WiFi BT secure boot pioneer kit.
6) checked cysecuretools is not installed by default when installing ModusToolBox 2.4
7) run "pip install cysecuretools" in ModusToolBox terminal window
😎 The log attached below.
The error is Could not build wheels for cmsis-pack-manager, which is required to install pyproject.toml-based projects.
I am running ModusToolBox 2.4 on macOS Monterey 12.3
I can see no other way out of this. Please advise.
Warm regards
CW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In addition, I have upload zip archive of secure Blink example for you to see build error:
File "/Users/tangcw/mtw1/Secure_Blinky_LED_FreeRTOS/libs/TARGET_CY8CKIT-064B0S2-4343W/psoc64_postbuild.py", line 22, in <module>
from cysecuretools import CySecureTools
ModuleNotFoundError: No module named 'cysecuretools'
Pls advise how to overcome problem.
Warm regards
CW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi CW,
I tried it out on a mac device. As you said, cysecuretools is not installed by default on Mac. I missed that. However, I was able to get the cysecuretools working without any issue.
By default, the python version was 2.7 and so I used this command in the terminal -
pip3 install cysecuretools
This worked for me and I was able to get cysecuretools working and I confirmed this by running the command -
cysecuretools --help
I assume that you have tried the same and that did not work for you. Can you please run 'pip3 list' and share the list of modules so that I can compare it with mine?
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rakshith,
tangcw@Tangs-MacBook-Pro cmsis-pack-manager-main % pip3 list
Package Version
------------------ ---------
appdirs 1.4.4
certifi 2021.10.8
cffi 1.15.0
cmsis-pack-manager 0.4.0
milksnake 0.1.5
pip 22.0.4
pycparser 2.21
PyYAML 6.0
setuptools 58.1.0
tangcw@Tangs-MacBook-Pro cmsis-pack-manager-main %
Warm regards
CW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry,
this is latest list after i run pip install cysecuretools in Mac terminal. Result is failed build wheel for cryptography but can build wheel for CMSIS pack manager. Next I run pip install cysecuretools in ModusToolBox terminal and get error of fail build wheel for CMSIS pack manager but no mentioned error when build cryptography.
Below is the result list:
tangcw@Tangs-MacBook-Pro cmsis-pack-manager-main % pip3 list
Package Version
------------------ ---------
appdirs 1.4.4
cbor 1.0.0
certifi 2021.10.8
cffi 1.15.0
cmsis-pack-manager 0.4.0
intelhex 2.3.0
milksnake 0.1.5
pip 22.0.4
pyasn1 0.4.8
pycparser 2.21
pyelftools 0.28
PyYAML 6.0
rsa 4.8
setuptools 50.3.2
six 1.16.0
sortedcontainers 2.4.0
wcwidth 0.2.5
tangcw@Tangs-MacBook-Pro cmsis-pack-manager-main %
Pls advise
Warm regards, CW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Again sorry,
this is latest after running pip install wheel (I am not sure if it is this wheel)
tangcw@Tangs-MacBook-Pro cysecuretools-release-v3.1.0 % pip list
Package Version
------------------ ---------
appdirs 1.4.4
cbor 1.0.0
certifi 2021.10.8
cffi 1.15.0
cmsis-pack-manager 0.4.0
intelhex 2.3.0
milksnake 0.1.5
pip 22.0.4
protobuf 3.20.0rc2
pyasn1 0.4.8
pycparser 2.21
pyelftools 0.28
PyYAML 6.0
rsa 4.8
setuptools 50.3.2
six 1.16.0
sortedcontainers 2.4.0
wcwidth 0.2.5
wheel 0.37.1. <----
But still same error. Attached log for running pip3 install cysecuretools from macOS terminal and ModusToolBox terminal.
See the difference of able to build wheel for CMSIS-pack-manager but fail build for cryptography but the other fail build for CMSIS-pack-manager.
Warm regards
CW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please close this thread. Problem resolved. It seems cysecuretools only support 32 bit python version. I manage get cysecuretools working after changing to version python-3.9.8-macosx10.9.pkg