Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instalation end with "Command "python setup.py egg_info" failed with error code 1" #43

Open
eladhen opened this issue Mar 28, 2018 · 1 comment

Comments

@eladhen
Copy link

eladhen commented Mar 28, 2018

I'm trying to install glucometerutils to get data from my Freestyle Libre. I'm running Linux Mint 18.3. Python 3.5.2. I'm by no means a developer so I'm probably doing something wrong, but I would really want to run this.

This is the output of me trying to follow the Example Usage:

eladhen@elad-mint ~ $ python3 -m venv $(pwd)/glucometerutils-venv
eladhen@elad-mint ~ $ . glucometerutils-venv/bin/activate
(glucometerutils-venv) eladhen@elad-mint ~ $ DRIVER=fslibre
(glucometerutils-venv) eladhen@elad-mint ~ $ pip install git+https://github.com/Flameeyes/glucometerutils.git#egg=project[${DRIVER}]
Collecting project[fslibre] from git+https://github.com/Flameeyes/glucometerutils.git#egg=project[fslibre]
  Cloning https://github.com/Flameeyes/glucometerutils.git to /tmp/pip-build-e_e8w2sk/project
  Running setup.py (path:/tmp/pip-build-e_e8w2sk/project/setup.py) egg_info for package project produced metadata for project name glucometerutils. Fix your #egg=project fragments.
Collecting construct (from glucometerutils)
  Downloading construct-2.9.41.tar.gz (54kB)
    100% |████████████████████████████████| 61kB 232kB/s 
Collecting hidapi (from glucometerutils)
  Downloading hidapi-0.7.99.post21.tar.gz (51kB)
    100% |████████████████████████████████| 61kB 1.4MB/s 
    Complete output from command python setup.py egg_info:
    Compiling /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Plex/Scanners.py because it changed.
    Compiling /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Plex/Actions.py because it changed.
    Compiling /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Compiler/Pythran.py because it changed.
    Compiling /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Compiler/Lexicon.py because it changed.
    Compiling /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Compiler/Scanning.py because it changed.
    Compiling /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Compiler/Parsing.py because it changed.
    Compiling /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Compiler/Visitor.py because it changed.
    Compiling /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Compiler/FlowControl.py because it changed.
    Compiling /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Compiler/Code.py because it changed.
    Compiling /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Runtime/refnanny.pyx because it changed.
    Compiling /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Compiler/FusedNode.py because it changed.
    Compiling /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Tempita/_tempita.py because it changed.
    Compiling /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/StringIOTree.py because it changed.
    [ 1/13] Cythonizing /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Compiler/Code.py
    [ 2/13] Cythonizing /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Compiler/FlowControl.py
    [ 3/13] Cythonizing /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Compiler/FusedNode.py
    [ 4/13] Cythonizing /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Compiler/Lexicon.py
    [ 5/13] Cythonizing /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Compiler/Parsing.py
    [ 6/13] Cythonizing /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Compiler/Pythran.py
    [ 7/13] Cythonizing /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Compiler/Scanning.py
    [ 8/13] Cythonizing /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Compiler/Visitor.py
    [ 9/13] Cythonizing /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Plex/Actions.py
    [10/13] Cythonizing /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Plex/Scanners.py
    [11/13] Cythonizing /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Runtime/refnanny.pyx
    [12/13] Cythonizing /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/StringIOTree.py
    [13/13] Cythonizing /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Tempita/_tempita.py
    Unable to find pgen, not compiling formal grammar.
    /usr/lib/python3.5/distutils/dist.py:261: UserWarning: Unknown distribution option: 'python_requires'
      warnings.warn(msg)
    warning: no files found matching '2to3-fixers.txt'
    warning: no files found matching 'Doc/*'
    warning: no files found matching '*.pyx' under directory 'Cython/Debugger/Tests'
    warning: no files found matching '*.pxd' under directory 'Cython/Debugger/Tests'
    warning: no files found matching '*.pxd' under directory 'Cython/Utility'
    warning: no files found matching 'pyximport/README'
    /tmp/easy_install-t6bbaz0k/Cython-0.28.1/Cython/Plex/Scanners.c:19:20: fatal error: Python.h: No such file or directory
    compilation terminated.
    Traceback (most recent call last):
      File "/usr/lib/python3.5/distutils/unixccompiler.py", line 118, in _compile
        extra_postargs)
      File "/usr/lib/python3.5/distutils/ccompiler.py", line 909, in spawn
        spawn(cmd, dry_run=self.dry_run)
      File "/usr/lib/python3.5/distutils/spawn.py", line 36, in spawn
        _spawn_posix(cmd, search_path, dry_run=dry_run)
      File "/usr/lib/python3.5/distutils/spawn.py", line 159, in _spawn_posix
        % (cmd, exit_status))
    distutils.errors.DistutilsExecError: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/command/bdist_egg.py", line 161, in run
        cmd = self.call_command('install_lib', warn_dir=0)
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/command/bdist_egg.py", line 147, in call_command
        self.run_command(cmdname)
      File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/command/install_lib.py", line 23, in run
        self.build()
      File "/usr/lib/python3.5/distutils/command/install_lib.py", line 109, in build
        self.run_command('build_ext')
      File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/command/build_ext.py", line 49, in run
        _build_ext.run(self)
      File "/usr/lib/python3.5/distutils/command/build_ext.py", line 338, in run
        self.build_extensions()
      File "/usr/lib/python3.5/distutils/command/build_ext.py", line 447, in build_extensions
        self._build_extensions_serial()
      File "/usr/lib/python3.5/distutils/command/build_ext.py", line 472, in _build_extensions_serial
        self.build_extension(ext)
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/command/build_ext.py", line 174, in build_extension
        _build_ext.build_extension(self, ext)
      File "/usr/lib/python3.5/distutils/command/build_ext.py", line 532, in build_extension
        depends=ext.depends)
      File "/usr/lib/python3.5/distutils/ccompiler.py", line 574, in compile
        self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
      File "/usr/lib/python3.5/distutils/unixccompiler.py", line 120, in _compile
        raise CompileError(msg)
    distutils.errors.CompileError: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/sandbox.py", line 154, in save_modules
        yield saved
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/sandbox.py", line 195, in setup_context
        yield
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/sandbox.py", line 243, in run_setup
        DirectorySandbox(setup_dir).run(runner)
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/sandbox.py", line 273, in run
        return func()
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/sandbox.py", line 242, in runner
        _execfile(setup_script, ns)
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/sandbox.py", line 46, in _execfile
        exec(code, globals, locals)
      File "/tmp/easy_install-t6bbaz0k/Cython-0.28.1/setup.py", line 285, in <module>
      File "/usr/lib/python3.5/distutils/core.py", line 163, in setup
        raise SystemExit("error: " + str(msg))
    SystemExit: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 1087, in run_setup
        run_setup(setup_script, args)
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/sandbox.py", line 246, in run_setup
        raise
      File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
        self.gen.throw(type, value, traceback)
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/sandbox.py", line 195, in setup_context
        yield
      File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
        self.gen.throw(type, value, traceback)
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/sandbox.py", line 166, in save_modules
        saved_exc.resume()
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/sandbox.py", line 141, in resume
        six.reraise(type, exc, self._tb)
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/pkg_resources/_vendor/six.py", line 685, in reraise
        raise value.with_traceback(tb)
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/sandbox.py", line 154, in save_modules
        yield saved
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/sandbox.py", line 195, in setup_context
        yield
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/sandbox.py", line 243, in run_setup
        DirectorySandbox(setup_dir).run(runner)
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/sandbox.py", line 273, in run
        return func()
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/sandbox.py", line 242, in runner
        _execfile(setup_script, ns)
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/sandbox.py", line 46, in _execfile
        exec(code, globals, locals)
      File "/tmp/easy_install-t6bbaz0k/Cython-0.28.1/setup.py", line 285, in <module>
      File "/usr/lib/python3.5/distutils/core.py", line 163, in setup
        raise SystemExit("error: " + str(msg))
    SystemExit: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-e_e8w2sk/hidapi/setup.py", line 123, in <module>
        install_requires = ['setuptools>=19.0'],
      File "/usr/lib/python3.5/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/dist.py", line 269, in __init__
        self.fetch_build_eggs(attrs['setup_requires'])
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/dist.py", line 313, in fetch_build_eggs
        replace_conflicting=True,
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/pkg_resources/__init__.py", line 826, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1092, in best_match
        return self.obtain(req, installer)
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1104, in obtain
        return installer(requirement)
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/dist.py", line 380, in fetch_build_egg
        return cmd.easy_install(req)
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 663, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 693, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 873, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 1101, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "/home/eladhen/glucometerutils-venv/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 1089, in run_setup
        raise DistutilsError("Setup script exited with %s" % (v.args[0],))
    distutils.errors.DistutilsError: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-e_e8w2sk/hidapi/
You are using pip version 8.1.1, however version 9.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
@hexop
Copy link

hexop commented Feb 29, 2020

I ran into the same problem, the solution is to install the python 3 development files, it should be called python3-dev or python3-devel.
I also had to install libsub-devel and set my C compiler (CC variable) to gcc instead of clang.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants