Iβm trying to install Meshtastic Python API on Macbook Air M1 (2020), without success.
Installation fails on pygatt
.
Here is console output.
% pip install --upgrade pip pygatt pytap2 wheel mesthtastic
Requirement already satisfied: pip in /Users/tekk/.platformio/penv/lib/python3.9/site-packages (21.2.4)
Collecting pip
Using cached pip-21.3-py3-none-any.whl (1.7 MB)
Collecting pygatt
Using cached pygatt-4.0.5.tar.gz (40 kB)
Collecting pytap2
Using cached pytap2-2.1.0-py3-none-any.whl (5.5 kB)
Requirement already satisfied: wheel in /Users/tekk/.platformio/penv/lib/python3.9/site-packages (0.37.0)
ERROR: Could not find a version that satisfies the requirement mesthtastic (from versions: none)
ERROR: No matching distribution found for mesthtastic
WARNING: You are using pip version 21.2.4; however, version 21.3 is available.
You should consider upgrading via the '/Users/tekk/.platformio/penv/bin/python -m pip install --upgrade pip' command.
tekk@AiruzivtelaTekk firmware-1.2.45.b674054 % pip3 install --upgrade pip pygatt pytap2 wheel mesthtastic
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pip in /Users/tekk/Library/Python/3.8/lib/python/site-packages (21.3)
Collecting pygatt
Using cached pygatt-4.0.5.tar.gz (40 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: pytap2 in /Users/tekk/Library/Python/3.8/lib/python/site-packages (2.1.0)
Requirement already satisfied: wheel in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages (0.33.1)
Collecting wheel
Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)
ERROR: Could not find a version that satisfies the requirement mesthtastic (from versions: none)
ERROR: No matching distribution found for mesthtastic
tekk@AiruzivtelaTekk firmware-1.2.45.b674054 % pip3 install --upgrade pip pytap2 wheel mesthtastic
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pip in /Users/tekk/Library/Python/3.8/lib/python/site-packages (21.3)
Requirement already satisfied: pytap2 in /Users/tekk/Library/Python/3.8/lib/python/site-packages (2.1.0)
Requirement already satisfied: wheel in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages (0.33.1)
Collecting wheel
Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)
tekk@AiruzivtelaTekk firmware-1.2.45.b674054 % pip3 install --upgrade meshtastic
Defaulting to user installation because normal site-packages is not writeable
Collecting meshtastic
Using cached meshtastic-1.2.40-py3-none-any.whl (63 kB)
Requirement already satisfied: pyserial>=3.4 in /Users/tekk/Library/Python/3.8/lib/python/site-packages (from meshtastic) (3.5)
Requirement already satisfied: pyqrcode>=1.2.1 in /Users/tekk/Library/Python/3.8/lib/python/site-packages (from meshtastic) (1.2.1)
Requirement already satisfied: tabulate>=0.8.9 in /Users/tekk/Library/Python/3.8/lib/python/site-packages (from meshtastic) (0.8.9)
Requirement already satisfied: pypubsub>=4.0.3 in /Users/tekk/Library/Python/3.8/lib/python/site-packages (from meshtastic) (4.0.3)
Requirement already satisfied: dotmap>=1.3.14 in /Users/tekk/Library/Python/3.8/lib/python/site-packages (from meshtastic) (1.3.24)
Requirement already satisfied: protobuf>=3.13.0 in /Users/tekk/Library/Python/3.8/lib/python/site-packages (from meshtastic) (3.18.1)
Collecting pygatt>=4.0.5
Using cached pygatt-4.0.5.tar.gz (40 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: timeago>=1.0.15 in /Users/tekk/Library/Python/3.8/lib/python/site-packages (from meshtastic) (1.0.15)
Requirement already satisfied: pexpect>=4.6.0 in /Users/tekk/Library/Python/3.8/lib/python/site-packages (from meshtastic) (4.8.0)
Requirement already satisfied: ptyprocess>=0.5 in /Users/tekk/Library/Python/3.8/lib/python/site-packages (from pexpect>=4.6.0->meshtastic) (0.7.0)
Requirement already satisfied: enum-compat in /Users/tekk/Library/Python/3.8/lib/python/site-packages (from pygatt>=4.0.5->meshtastic) (0.0.3)
Building wheels for collected packages: pygatt
Building wheel for pygatt (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /Library/Developer/CommandLineTools/usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/kq/y336n3157pd60bz9gn39jyxr0000gn/T/pip-install-i1dmgg0t/pygatt_f414e8b0bd494db6b2e2a4233e9bc8f4/setup.py'"'"'; __file__='"'"'/private/var/folders/kq/y336n3157pd60bz9gn39jyxr0000gn/T/pip-install-i1dmgg0t/pygatt_f414e8b0bd494db6b2e2a4233e9bc8f4/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/kq/y336n3157pd60bz9gn39jyxr0000gn/T/pip-wheel-0zysg846
cwd: /private/var/folders/kq/y336n3157pd60bz9gn39jyxr0000gn/T/pip-install-i1dmgg0t/pygatt_f414e8b0bd494db6b2e2a4233e9bc8f4/
Complete output (27 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/kq/y336n3157pd60bz9gn39jyxr0000gn/T/pip-install-i1dmgg0t/pygatt_f414e8b0bd494db6b2e2a4233e9bc8f4/setup.py", line 16, in <module>
setup(
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 164, in setup
_install_setup_requires(attrs)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 159, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/dist.py", line 699, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 779, in resolve
dist = best[req.key] = env.best_match(
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1064, in best_match
return self.obtain(req, installer)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1076, in obtain
return installer(requirement)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/dist.py", line 758, in fetch_build_egg
return fetch_build_egg(self, req)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/installer.py", line 133, in fetch_build_egg
wheel.install_as_egg(dist_location)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/wheel.py", line 99, in install_as_egg
self._install_as_egg(destination_eggdir, zf)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/wheel.py", line 107, in _install_as_egg
self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/wheel.py", line 128, in _convert_metadata
os.mkdir(destination_eggdir)
FileExistsError: [Errno 17] File exists: '/private/var/folders/kq/y336n3157pd60bz9gn39jyxr0000gn/T/pip-install-i1dmgg0t/pygatt_f414e8b0bd494db6b2e2a4233e9bc8f4/.eggs/coverage-6.0.2-py3.8-macosx-10.14-arm64.egg'
----------------------------------------
ERROR: Failed building wheel for pygatt
Running setup.py clean for pygatt
ERROR: Command errored out with exit status 1:
command: /Library/Developer/CommandLineTools/usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/kq/y336n3157pd60bz9gn39jyxr0000gn/T/pip-install-i1dmgg0t/pygatt_f414e8b0bd494db6b2e2a4233e9bc8f4/setup.py'"'"'; __file__='"'"'/private/var/folders/kq/y336n3157pd60bz9gn39jyxr0000gn/T/pip-install-i1dmgg0t/pygatt_f414e8b0bd494db6b2e2a4233e9bc8f4/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
cwd: /private/var/folders/kq/y336n3157pd60bz9gn39jyxr0000gn/T/pip-install-i1dmgg0t/pygatt_f414e8b0bd494db6b2e2a4233e9bc8f4
Complete output (27 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/kq/y336n3157pd60bz9gn39jyxr0000gn/T/pip-install-i1dmgg0t/pygatt_f414e8b0bd494db6b2e2a4233e9bc8f4/setup.py", line 16, in <module>
setup(
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 164, in setup
_install_setup_requires(attrs)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 159, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/dist.py", line 699, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 779, in resolve
dist = best[req.key] = env.best_match(
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1064, in best_match
return self.obtain(req, installer)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1076, in obtain
return installer(requirement)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/dist.py", line 758, in fetch_build_egg
return fetch_build_egg(self, req)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/installer.py", line 133, in fetch_build_egg
wheel.install_as_egg(dist_location)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/wheel.py", line 99, in install_as_egg
self._install_as_egg(destination_eggdir, zf)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/wheel.py", line 107, in _install_as_egg
self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/wheel.py", line 128, in _convert_metadata
os.mkdir(destination_eggdir)
FileExistsError: [Errno 17] File exists: '/private/var/folders/kq/y336n3157pd60bz9gn39jyxr0000gn/T/pip-install-i1dmgg0t/pygatt_f414e8b0bd494db6b2e2a4233e9bc8f4/.eggs/coverage-6.0.2-py3.8-macosx-10.14-arm64.egg'
----------------------------------------
ERROR: Failed cleaning build dir for pygatt
Failed to build pygatt
Installing collected packages: pygatt, meshtastic
Running setup.py install for pygatt ... error
ERROR: Command errored out with exit status 1:
command: /Library/Developer/CommandLineTools/usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/kq/y336n3157pd60bz9gn39jyxr0000gn/T/pip-install-i1dmgg0t/pygatt_f414e8b0bd494db6b2e2a4233e9bc8f4/setup.py'"'"'; __file__='"'"'/private/var/folders/kq/y336n3157pd60bz9gn39jyxr0000gn/T/pip-install-i1dmgg0t/pygatt_f414e8b0bd494db6b2e2a4233e9bc8f4/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/kq/y336n3157pd60bz9gn39jyxr0000gn/T/pip-record-8ybzos5h/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/tekk/Library/Python/3.8/include/python3.8/pygatt
cwd: /private/var/folders/kq/y336n3157pd60bz9gn39jyxr0000gn/T/pip-install-i1dmgg0t/pygatt_f414e8b0bd494db6b2e2a4233e9bc8f4/
Complete output (27 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/kq/y336n3157pd60bz9gn39jyxr0000gn/T/pip-install-i1dmgg0t/pygatt_f414e8b0bd494db6b2e2a4233e9bc8f4/setup.py", line 16, in <module>
setup(
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 164, in setup
_install_setup_requires(attrs)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 159, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/dist.py", line 699, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 779, in resolve
dist = best[req.key] = env.best_match(
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1064, in best_match
return self.obtain(req, installer)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1076, in obtain
return installer(requirement)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/dist.py", line 758, in fetch_build_egg
return fetch_build_egg(self, req)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/installer.py", line 133, in fetch_build_egg
wheel.install_as_egg(dist_location)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/wheel.py", line 99, in install_as_egg
self._install_as_egg(destination_eggdir, zf)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/wheel.py", line 107, in _install_as_egg
self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/wheel.py", line 128, in _convert_metadata
os.mkdir(destination_eggdir)
FileExistsError: [Errno 17] File exists: '/private/var/folders/kq/y336n3157pd60bz9gn39jyxr0000gn/T/pip-install-i1dmgg0t/pygatt_f414e8b0bd494db6b2e2a4233e9bc8f4/.eggs/coverage-6.0.2-py3.8-macosx-10.14-arm64.egg'
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Developer/CommandLineTools/usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/kq/y336n3157pd60bz9gn39jyxr0000gn/T/pip-install-i1dmgg0t/pygatt_f414e8b0bd494db6b2e2a4233e9bc8f4/setup.py'"'"'; __file__='"'"'/private/var/folders/kq/y336n3157pd60bz9gn39jyxr0000gn/T/pip-install-i1dmgg0t/pygatt_f414e8b0bd494db6b2e2a4233e9bc8f4/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/kq/y336n3157pd60bz9gn39jyxr0000gn/T/pip-record-8ybzos5h/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/tekk/Library/Python/3.8/include/python3.8/pygatt Check the logs for full command output.
Suggestions are very welcome.