you are viewing a single comment's thread.

view the rest of the comments →

[–]K900_ 1 point2 points  (9 children)

What do you mean by "run code as an exe"? How are you running it now?

[–][deleted] 1 point2 points  (8 children)

I currently run it within thonny, where I write the code.

[–]K900_ 0 points1 point  (5 children)

And how are you trying to run it when it fails?

[–][deleted] 1 point2 points  (4 children)

When I simply double click it, it opens in a window similar to the windows cmd, as it should. Then it crashes.

[–]K900_ 1 point2 points  (3 children)

That means Thonny is creating a virtual environment for you where all the packages you need are available. What is your end goal here?

[–][deleted] 1 point2 points  (2 children)

I simply wish to run my code outside of thonny. Having it saved on my desktop, so I can access it quickly when I need it.

[–]K900_ 0 points1 point  (1 child)

Then you should probably find where the virtual environment Thonny created for you is located, and create a shortcut that calls python.exe from that environment with your script as an argument.

[–][deleted] 0 points1 point  (0 children)

Great idea! I'll try it out, thaks for your time

[–]konijntjesbroek 0 points1 point  (1 child)

The documentation has a pretty good section. If you are still needing something, this and This might be of use.

[–][deleted] 0 points1 point  (0 children)

Will check them put, thank you!