Jump to content

python 2.7/3 on geany

Marvzl1357

Hullo,

I have a book of "programming for beginners" for the raspberry pi, but I'm going through on linux mint 16.

I start geany and blahblahblah type in "Import time,pygame" and the rest of the example code, I run it and it straight away comes back with "no module named pygame"

the book says 'fear not, chances are that you're running python 3, go to "build>build commands>execute" and "remove the number "3" from python, next to "execute"'

problem is, it's just showing 'python "%f" '. so no 3 anywhere. 

Bear in mind that this guide was pretty focused on the pi, but it claimed to work with any linux.

Is there a way to test of I'm running python 3 or 2.7? and how can I change it through geany.

 

Thanks

Home is where the heart my desktop is.

Link to comment
Share on other sites

Link to post
Share on other sites

just open a terminal and run 'python' to see if it's installed

try 'python3' as well

 

to solve your problem anyways, it should be enough to go in the terminal and type in

sudo apt-get install python
Link to comment
Share on other sites

Link to post
Share on other sites

 

just open a terminal and run 'python' to see if it's installed

try 'python3' as well

 

to solve your problem anyways, it should be enough to go in the terminal and type in

sudo apt-get install python

so... I've got python 3.3.2+ as well as python 2.7.5+

Can I specify geany to run a specific version?

Home is where the heart my desktop is.

Link to comment
Share on other sites

Link to post
Share on other sites

so... I've got python 3.3.2+ as well as python 2.7.5+

Can I specify geany to run a specific version?

try to look in your /usr/bin directory, there should be several python executables/links for different versions

so, set your geany accordingly, with a command such as

/usr/bin/python3.3 "%f"

edit: in /usr/bin you should find a link named "python", if you modify the executable it points you, that should change the version of python that will run with the command

python "%f"

so that you don't even have to change the geany config

Link to comment
Share on other sites

Link to post
Share on other sites

try to look in your /usr/bin directory, there should be several python executables/links for different versions

so, set your geany accordingly, with a command such as

/usr/bin/python3.3 "%f"

edit: in /usr/bin you should find a link named "python", if you modify the executable it points you, that should change the version of python that will run with the command

python "%f"

so that you don't even have to change the geany config

oh...so, it should be running 2.7?

If so, I'll figure something out, it's late here and I'm going to sleep

Home is where the heart my desktop is.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×