Civlo85 / gsmHat

Using the Waveshare GSM/GPRS/GNSS Hat for Raspberry Pi with Python
MIT License
61 stars 26 forks source link

pip3 install gsmHat does not work #1

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hi, Just for info: I could install the library from Github but installing the library from pip3 throws SyntaxError.

I am using python 3.7.3 and also have the latest version of pip3.

Below is the detail of the error I am getting:

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting gsmHat Using cached https://www.piwheels.org/simple/gsmhat/gsmHat-0.2-py3-none-any.whl Collecting datetime (from gsmHat) Using cached https://files.pythonhosted.org/packages/73/22/a5297f3a1f92468cc737f8ce7ba6e5f245fcfafeae810ba37bd1039ea01c/DateTime-4.3-py2.py3-none-any.whl Collecting logging (from gsmHat) Using cached https://files.pythonhosted.org/packages/93/4b/979db9e44be09f71e85c9c8cfc42f258adfb7d93ce01deed2788b2948919/logging-0.4.9.6.tar.gz Complete output from command python setup.py egg_info: running egg_info creating pip-egg-info/logging.egg-info writing pip-egg-info/logging.egg-info/PKG-INFO writing dependency_links to pip-egg-info/logging.egg-info/dependency_links.txt writing top-level names to pip-egg-info/logging.egg-info/top_level.txt writing manifest file 'pip-egg-info/logging.egg-info/SOURCES.txt' Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-1jx6x948/logging/setup.py", line 13, in packages = ["logging"], File "/usr/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 296, in run self.find_sources() File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 303, in find_sources mm.run() File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 534, in run self.add_defaults() File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 570, in add_defaults sdist.add_defaults(self) File "/usr/lib/python3.7/distutils/command/sdist.py", line 226, in add_defaults self._add_defaults_python() File "/usr/lib/python3/dist-packages/setuptools/command/sdist.py", line 127, in _add_defaults_python build_py = self.get_finalized_command('build_py') File "/usr/lib/python3.7/distutils/cmd.py", line 298, in get_finalized_command cmd_obj = self.distribution.get_command_obj(command, create) File "/usr/lib/python3.7/distutils/dist.py", line 857, in get_command_obj klass = self.get_command_class(command) File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 845, in get_command_class self.cmdclass[command] = cmdclass = ep.load() File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2411, in load return self.resolve() File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2417, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "/usr/lib/python3/dist-packages/setuptools/command/build_py.py", line 15, in from setuptools.lib2to3_ex import Mixin2to3 File "/usr/lib/python3/dist-packages/setuptools/lib2to3_ex.py", line 12, in from lib2to3.refactor import RefactoringTool, get_fixers_from_package File "/usr/lib/python3.7/lib2to3/refactor.py", line 18, in import logging File "/tmp/pip-install-1jx6x948/logging/logging/init.py", line 618 raise NotImplementedError, 'emit must be implemented '\ ^ SyntaxError: invalid syntax

Civlo85 commented 3 years ago

Thanks for contributing!

I solved this Issue within the new release v_03. The wrong logging package was included in the setup file.