Notifications
Clear all

Need help with Installing Python with Geany on Windows 10

21 Posts
5 Users
3 Likes
4,487 Views
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  

I've installed Geany 1.37.1 on windows.

I've installed python 3.9 on windows.

How do I get Geany to recognize python 3?   It can't seem to find it.

It's my understanding it needs to be set up in this builds dialog box.

Set build commands

But I don't know what to type in here.

Thanks.

 

DroneBot Workshop Robotics Engineer
James


   
Quote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  

No fans of Geany? 😥 

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
(@yurkshirelad)
Member
Joined: 3 years ago
Posts: 493
 

I've only used Geany on Linux. Perhaps you have to provide the full path to the python executable? I haven't used Python on Windows for a long time, but is the Python binary still pythonw.exe, or is it now python.exe?

Edit: Probably you need to add python to the Windows path: https://geek-university.com/python/add-python-to-the-windows-path/  


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  

I found the following 2 paths in my systems environment dialog box.

C:\Users\James\AppData\Local\Programs\Python\Python39\Scripts\

C:\Users\James\AppData\Local\Programs\Python\Python39

I placed the first path with the Scripts as the compiler?

I placed the second path to launch python in the genie dialog box.

But still no results.

Geany still doesn't recognize that python is installed.

 

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@robo-pi

Although I have used Geany on the RPi to write some FreeBASIC programs I hadn't used it with Window 10 So I decided to download Python and this came up,

pythonSplash

 

So I selected Add Python 3.9 to PATH

Then I downloaded and installed Geany on Window 10.

I selected File/New (with Template) in the Geany editor and chose main.py from the list.

I chose Build/Compile and then Build/Execute and it worked ok.

Personally I avoid software that requires you navigate the system to set paths and so on.

Last year while getting my head around programming with Python I just used the Python Shell and Idle.
I just noticed in the Python Shell access to the paths,

File/Path Browser

 


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  
Posted by: @robotbuilder

I selected File/New (with Template) in the Geany editor and chose main.py from the list.

I just reinstalled python and Geany and it still doing the same thing as before.

Can you look at the dialog box in Geany under Build "set build commands" and tell me what you have for compile and execute?

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  

I am getting the following error message when I try to run python in Geany.

Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

But I don't know how to disable the Manage App Execution Aliases from Settings ?

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@robo-pi

Can you look at the dialog box in Geany under Build "set build commands" and tell me what you have for compile and execute?

Unfortunately I don't know anything about setting properties and so on.  If the program doesn't just work I discard it. The machinations of "building" isn't something I understand.

geanyProjectProperties2

 

 


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@robo-pi

There must be help online somewhere,
http://introtopython.org/programming_environment_windows.html#Telling-Geany-how-to-find-Python

I just hate it when you have to go through some convoluted process of magical incantations just to get something to work.  It is one reason I gave up on C++ because I couldn't make use of the libraries which required following a long list of instructions as to what to enter into a lot of forms and the compiler still couldn't find them.

 

 


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  

I finally got it.    During my travels Microsoft Store popped up offered to install python 3.9 so I let it do it and now it's working.

 

I once had problem with Geany.

She was being a bit of a meanie.

She refused to run code in my cyber abode.

But now I'm a Python Houdini.  😊 

DroneBot Workshop Robotics Engineer
James


   
huckOhio reacted
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  
Posted by: @robotbuilder

It is one reason I gave up on C++

Perseverance!

To each their own on what software they wanna use but C++ is too popular for me to give up on.

Of course, I haven't had any problems with C++ myself it's been a very nice language.

Although I do prefer Python for certain applications.

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 5 years ago
Posts: 1037
 

@robo-pi

James, I just installed Geany 1.37.1 on my Win10 laptop.  Under "Build/Set Build Commands" the window that opened appeared to be blank when I open that window up after starting Geany for the first time after the fresh install.  I then typed "print("Hello World!")" into the editor.  Then selected "Build/Execute" (guess I could have used F5) and after saving the program the terminal window opened and showed "Hello World!" and prompted me to press any key to continue along with a note that the program exited with code: 0.

I then looked at the "Build/Set Build Commands" again and there had been changes.  Here is what I now see (and it looks just like what @robotbuilder posted):

GeanySetBuild

 I appears to me that Geany is using the Environment variable to find Python.  What I found in my environment path for Python 3.9 was just what you found except for the username, mine being "n4tty" where yours was "james" instead.

Can you change your "Set Build Commands" to match mine and robotbuilders?  Or have you already tried that?

You said you reinstalled and got the same results, but did you happen to look at the "Set Build Commands" window before "Executing" a program for the first time to see if it was blank?

Also, when you installed did you right click on the Geany install program and install as an Administrator?  That is how I installed my copy and don't know if there would or would not be a difference in the install that might be the cause of your issue.

Good luck and keep us posted.  I'm sure you will!  🤣 😎 

SteveG


   
ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 5 years ago
Posts: 1037
 

@robo-pi

And I did not see your post about "Success" before I gave my reply above!

I started to delete it but thought it might just be some help with the issue in the future.

And now we have a poem from out favorite poet! 😎 

SteveG


   
ReplyQuote
(@yurkshirelad)
Member
Joined: 3 years ago
Posts: 493
 

Glad to hear you got it working - Windows and its apps can be a pain sometimes. Success!


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 
Posted by: @robo-pi
Posted by: @robotbuilder

It is one reason I gave up on C++

Perseverance!

To each their own on what software they wanna use but C++ is too popular for me to give up on.

Of course, I haven't had any problems with C++ myself it's been a very nice language.

Although I do prefer Python for certain applications.

Perseverance? Yeah a bit short on that I like things to be made easy not hard.

I used TurboC++ on the old DOS machines no libraries required,  direct access to hardware.

Anyway glad to see you have Python up and running 🙂

 


   
ReplyQuote
Page 1 / 2