Comments (13)
You do not need to edit the path if you launch the Pico project generator from outside the Pico developer prompts
But I guess if you do that, then the "Build after project created" option of pico-project-generator won't work?
from pico-setup-windows.
With the modifications in pico-env.cmd I can use the pico command prompt environment that contains all the paths etc. and have a "full" python at my disposal.
If I use an "ordinary" command prompt, the project generator does not even start. Error message is "Unable to find the 'arm-none-eabi-gcc' compiler....".
So the GUI-version of the project generator needs a "pico environment" and tkinter at the same time.
from pico-setup-windows.
Just out of curiosity, is there a reason we can't do that? https://docs.python.org/3/using/windows.html#installing-without-ui
Yes. One of the goals of this Windows installer is to have a stable distribution which will continue to work exactly as it does today. If we run the Python installer instead of bundling the embedded distribution, it will not actually install the version we want if the user already has a newer version installed, which can potentially break stability for us.
This is actually the approach that I had before it became the official installer. There is a configuration file - x64.json - which will build the installer that way. However that was always problematic because installing anything globally can break for many reasons.
from pico-setup-windows.
Okay there is a hack-free way to use the Pico project generator on Windows:
- Install the SDK with this installer.
- Install the full version of Python from https://www.python.org/downloads/windows/.
- Open a Pico - Developer Command Prompt window.
cd
to the location where you have downloaded/cloned pico-project-generator.- Launch using py.exe instead of python.exe:
py pico_project.py --gui
-- this will use the latest installed version (the full version) instead of the embedded distribution with the SDK.
Thanks for figuring that out. I'll update the README with this information.
from pico-setup-windows.
According to https://github.com/raspberrypi/pico-setup-windows/blob/master/config/x64-standalone.json it installs python-3.9.13-embed-amd64.zip
and https://docs.python.org/3/using/windows.html#windows-embeddable says "Tcl/tk (including all dependants, such as Idle), pip and the Python documentation are not included."
ping @ndabas (author of this repo) and @JamesH65 (author of pico-project-generator )
from pico-setup-windows.
Thanks for the clarification. So this is a feature not a bug :-).
For users of the python project generator GUI the simplest solution is most probably to (additionally) install a regular Python package and change the path to python.exe in "....\Pico SDK v1.5.0\pico-env.cmd". At least, this works fine for me.
from pico-setup-windows.
Yes, that's the thing -- we can only include the embedded distribution in our installer, which doesn't have support for Tcl/tk. The Python included with the SDK installer is sufficient only for the SDK build process, and isn't intended for general-purpose use beyond that.
The workaround, like you've figured out, is simply to install Python as usual. You do not need to edit the path if you launch the Pico project generator from outside the Pico developer prompts or VS Code.
from pico-setup-windows.
I guess the solution might be to create a Windows installer for pico-project-generator that fixes everything up properly and adds a shortcut to the Start menu to launch it. Modifying the path in a batch file, while a workaround for now, is not something that we should expect all users to do.
from pico-setup-windows.
Hmm, a bit of a PITA to fix I suspect. I'd hoped that the Project generator would be installed just by cloning the repo or copying the .py file, along with associated installs of Python/TkInter on all platforms. Just set the SDK path and it should all hang together. Sadly this appears not to be the case on Windows. You can set the compiler path on the command line with --cpath which might be an option, in combination with the SDK path. Or maybe a small install batch file for Windows although I am a bit out of touch with Windows stuff nowadays to know if that would be sufficient.
from pico-setup-windows.
The 'proper' way to do it would be to somehow get a Python distribution with Tcl/tk support in the SDK installer. We would either need to compile it ourselves in the build or use the hacky method of transplanting the needed files from the full installer into the embedded dist.
If we did it on the project generator side, the installer would install the full Python dist if needed, and a batch file to set up the paths correctly (or specify the compiler path on the command line) would be sufficient.
from pico-setup-windows.
The 'proper' way to do it would be to somehow get a Python distribution with Tcl/tk support in the SDK installer.
Just out of curiosity, is there a reason we can't do that? https://docs.python.org/3/using/windows.html#installing-without-ui
from pico-setup-windows.
Okay there is a hack-free way to use the Pico project generator on Windows:
- Install the SDK with this installer.
- Install the full version of Python from https://www.python.org/downloads/windows/.
- Open a Pico - Developer Command Prompt window.
cd
to the location where you have downloaded/cloned pico-project-generator.- Launch using py.exe instead of python.exe:
py pico_project.py --gui
-- this will use the latest installed version (the full version) instead of the embedded distribution with the SDK.
from pico-setup-windows.
Tested in windows sandbox. Works fine. Thanks!
If you add a .cmd file (e.g. GenerateShortcut.cmd) to the project generator archive containing
echo cd %cd% > "%PICO_INSTALL_PATH%\generator.cmd"
echo py.exe pico_project.py --gui >> "%PICO_INSTALL_PATH%\generator.cmd"
the user can simply start a Pico Developer Comand Prompt, cd to the location of the project generator and run this cmd file once. From then on, it is sufficient to open the Developer Command Prompt and simply type "generator" to start the project generator.
from pico-setup-windows.
Related Issues (20)
- No way to build Pico W examples from VSCode Cmake tab HOT 5
- New install not working HOT 12
- v1.5.1 does not create all registry keys anymore HOT 8
- Pico - Visual Studio Code link does nothing if VS code is not in PATH HOT 2
- Installer not checking PowerShell execution policy HOT 2
- Latest pico installer downloading as unconfirmed[random_number].crdownload HOT 2
- Problem finding path with new project HOT 2
- Installer Cant Get Pased The Choose Location HOT 2
- Installer able to install Pico_W SDK? HOT 3
- Keeping the SDK repo updated as often as possible HOT 2
- Installer not working on Windows 11 on Arm64 HOT 6
- TinyUSB are not visible in VSCode workspace HOT 4
- Use of $env:COMSPEC may be invalid in some cases. HOT 1
- No suitable code signing certificates found HOT 6
- GDB Error 1 in Visual Studio Code on Windows HOT 5
- Changing from debug to build and run for a Pico W HOT 11
- The system cannot find the file specified. HOT 2
- Add local Visual Studio Code just like other included software HOT 7
- cmake issue HOT 1
- Another cmake issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pico-setup-windows.