Python Forum
Geany configuration help - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Geany configuration help (/thread-4702.html)



Geany configuration help - mlytle0 - Sep-03-2017

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



RE: Geany configuration help - metulburr - Sep-04-2017

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=



RE: Geany configuration help - mlytle0 - Sep-04-2017

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.


RE: Geany configuration help - metulburr - Sep-04-2017

try pip3 install matplotlib. Do you have multiple installs of python3.x? Did you compile one or more?


RE: Geany configuration help - mlytle0 - Sep-04-2017

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...