General chat, help, discussion and ideas about the Mu code editor. Don't be afraid to ask a question. We're friendly! Please follow the Code of Conduct (https://www.python.org/psf/codeofconduct/)
Hi. I'm following intro tutorial for CircuitPython in Pi Pico, which recommends installing mu-editor. I'm on Debian stable (11). Python is 3.9.2. I cannot install as advertised: https://codewith.mu/en/howto/1.1/install_with_python -- pip3 install mu-editor==1.1.0b7
:
ERROR: Could not find a version that satisfies the requirement mu-editor==1.1.0b7
ERROR: No matching distribution found for mu-editor==1.1.0b7
If I use use pip3 install mu-editor
, it tries to install 1.0.3, but it fails for mathplotlib:
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pca8ytmu/matplotlib_053e1007bf484bad8018b187f23514a0/setup.py'"'"'; __file__='"'"'/tmp/pip-install-pca8ytmu/matplotlib_053e1007bf484bad8018b187f23514a0/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-0r7sbbla
cwd: /tmp/pip-install-pca8ytmu/matplotlib_053e1007bf484bad8018b187f23514a0/
Complete output (62 lines):
============================================================================
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [2.2.2]
python: yes [3.9.2 (default, Feb 28 2021, 17:03:44) [GCC
10.2.1 20210110]]
platform: yes [linux]
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.19.5]
install_requires: yes [handled by setuptools]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
freetype: no [The C/C++ header for freetype2 (ft2build.h)
could not be found. You may need to install the
development package.]
png: no [pkg-config information for 'libpng' could not
be found.]
qhull: yes [pkg-config information for 'libqhull' could not
be found. Using local copy.]
...
Please advise.
sudo apt install libfreetype-dev
, mathplotlib seems happy. The next problem is pygame. I wonder if I should abort at this point and just use VS code :-(sudo apt install libsdl1.2-dev libsdl-ttf2.0-dev libfreetype6-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libportmidi-dev
. No I end up with Building wheel for pygame (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9igsxkay/pygame_6a41b23add4f4feb8e3713de30c2dcc8/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9igsxkay/pygame_6a41b23add4f4feb8e3713de30c2dcc8/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-wg2dvztt
cwd: /tmp/pip-install-9igsxkay/pygame_6a41b23add4f4feb8e3713de30c2dcc8/
..
---
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
----------------------------------------
ERROR: Failed building wheel for pygame
Running setup.py clean for pygame
Successfully built matplotlib
Failed to build pygame
...
Running setup.py install for pygame ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9igsxkay/pygame_6a41b23add4f4feb8e3713de30c2dcc8/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9igsxkay/pygame_6a41b23add4f4feb8e3713de30c2dcc8/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-l0g9h5re/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/hhrutz/.local/include/python3.9/pygame
cwd: /tmp/pip-install-9igsxkay/pygame_6a41b23add4f4feb8e3713de30c2dcc8/
Complete output (501 lines):
...
src_c/pypm.c:6419:26: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
6419 | __pyx_type_4pypm_Output.tp_print = 0;
| ^
src_c/pypm.c:6434:25: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
6434 | __pyx_type_4pypm_Input.tp_print = 0;
| ^
...
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9igsxkay/pygame_6a41b23add4f4feb8e3713de30c2dcc8/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9igsxkay/pygame_6a41b23add4f4feb8e3713de30c2dcc8/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-l0g9h5re/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/hhrutz/.local/include/python3.9/pygame Check the logs for full command output.
$ mu-editor
Traceback (most recent call last):
File "/usr/bin/mu-editor", line 33, in <module>
sys.exit(load_entry_point('mu-editor==1.0.3', 'console_scripts', 'mu-editor')())
File "/usr/bin/mu-editor", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/usr/share/mu-editor/mu/app.py", line 34, in <module>
from mu.interface import Window
File "/usr/share/mu-editor/mu/interface/__init__.py", line 1, in <module>
from .main import Window
File "/usr/share/mu-editor/mu/interface/main.py", line 38, in <module>
from mu.interface.editor import EditorPane
File "/usr/share/mu-editor/mu/interface/editor.py", line 25, in <module>
from PyQt5.Qsci import QsciScintilla, QsciLexerPython, QsciAPIs
ModuleNotFoundError: No module named 'PyQt5.Qsci'
pip3 install shortcut
shortcut mu-editor