Python Forum
Thread Rating:
  • 4 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Geany configuration help
#1
I have just installed matplotlib and I can do the 'import matplotlib' command successfully under python3 in a terminal session. Under Geany, this comes back with an error 'No module named matplotlib'. I have even produced a simple plot in the terminal session, but can't get matplotlib to be recognized in the Geany environment, though normal Python commands execute perfectly under Geany. What could be wrong?

my code here
Reply
#2
Your Geany IDE is using the wrong python interpreter.

In Geany go to Build -> Set Build Commands -> Change command
For my execute command is python3 "%f" where python3 means my python3.6.1 installation. Not sure about windows difference though. Im on linux.

Alternatively you can go to Geany's config file in linux path is/usr/share/geany/filetypes.python. I have no idea what the path is in windows. But you can edit and save there as well for regarding the build section...
...
[build-menu]
# %f will be replaced by the complete filename
# %e will be replaced by the filename without extension
# (use only one of it at one time)
FT_00_LB=_Compile
FT_00_CM=python3 -m py_compile "%f"
FT_00_WD=
FT_02_LB=_Lint
FT_02_CM=pep8 --max-line-length=80 "%f"
FT_02_WD=
error_regex=(.+):([0-9]+):([0-9]+)
EX_00_LB=_Execute
EX_00_CM=python3 "%f"
EX_00_WD=
Recommended Tutorials:
Reply
#3
Yes, I'm on Linux also(Mint). I had guessed that the Python versions might be to blame so in the build commands I had put in 'python3 -m py_ompile "%f"' hoping that would direct the process away from the older python 2.7, but it didn't help. Didn't hurt though. I also thought about the path, but wasn't sure how to check that, not that familiar yet with Linux directory structure, but using your path, found mine is the same, and sure enough where you have 'FT_00_CM=python3 -m py_compile "%f"', I had the same line with python instead of python3. With Supervisor privileges I renamed the filenames.python file to oldfilenames.python, edited a copy of it to make the change to an entry for python3 and replaced the original file. Nothing was broken, but it still acts the same way. Frustrating and puzzling.

Are there any other simple IDE's out there for python? I'd be willing to try another one. Geany is certainly appealing, but if I can't import modules, it's not going to be very useful. It still acts like its seeing the lower python version, but I don't know where else that could be coming from.
Reply
#4
try pip3 install matplotlib. Do you have multiple installs of python3.x? Did you compile one or more?
Recommended Tutorials:
Reply
#5
metulburr, my apologies, my old eyes only saw one of the python3 instances in your listing. I now went back and fixed the lower one and all is working now. I've been fighting this most of the day, and some burnout prevented me from fully seeing your script. Many thanks...
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python modules for accessing the configuration of relevant paths Imago 1 1,357 May-07-2022, 07:28 PM
Last Post: Larz60+
Exclamation "System cannot find path specified"(Geany) kiwi99 2 3,848 Mar-18-2021, 07:37 PM
Last Post: kiwi99
  INI Configuration GUI goofygoo 4 4,517 Jul-19-2020, 08:47 PM
Last Post: goofygoo
  len() function, numbers doesn't work with Geany Editor Penguin827 3 2,989 May-08-2020, 04:08 AM
Last Post: buran
  Read Yaml configuration file in Python binhduonggttn 1 2,068 Feb-11-2020, 05:43 AM
Last Post: ndc85430
  Geany Configuration twallace51 0 4,489 Apr-21-2019, 02:20 PM
Last Post: twallace51
  Beginner Help - Geany and Cmder Pogosaur 2 3,189 Oct-09-2018, 02:15 PM
Last Post: Pogosaur
  Geany editor Mike429W 2 3,685 Sep-20-2018, 09:46 AM
Last Post: Mike429W
  help to execute a py code and good configuration andrebo 2 2,626 Sep-11-2018, 01:00 PM
Last Post: snippsat
  len() function doesn't work with Geany Editor hudabaig 2 3,576 Jun-01-2018, 11:20 PM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020