logston / olimex-ekg-emg

A Python package for gathering data from the Olimex EKG/EMG Shield.
Other
17 stars 7 forks source link

Problems installing ' pip install olimex-ekg-emg ' #4

Closed xiutek closed 8 years ago

xiutek commented 8 years ago

I have tried on Ubuntu 14 and Rasbian, but when I run the command install I get the following error:

Downloading/unpacking olimex-ekg-emg Downloading olimex-ekg-emg-0.1.9.tar.gz (7.9MB): 7.9MB downloaded Running setup.py (path:/tmp/pip-build-MoymIV/olimex-ekg-emg/setup.py) egg_info for package olimex-ekg-emg

warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'

Downloading/unpacking pyserial>=2.7 (from olimex-ekg-emg) Cleaning up... Exception: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main status = self.run(options, args) File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1178, in prepare_files url = finder.find_requirement(req_to_install, upgrade=self.upgrade) File "/usr/lib/python2.7/dist-packages/pip/index.py", line 194, in find_requirement page = self._get_page(main_index_url, req) File "/usr/lib/python2.7/dist-packages/pip/index.py", line 568, in _get_page session=self.session, File "/usr/lib/python2.7/dist-packages/pip/index.py", line 670, in get_page resp = session.get(url, headers={"Accept": "text/html"}) File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 469, in get return self.request('GET', url, _kwargs) File "/usr/lib/python2.7/dist-packages/pip/download.py", line 237, in request return super(PipSession, self).request(method, url, args, _kwargs) File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 457, in request resp = self.send(prep, _send_kwargs) File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 569, in send r = adapter.send(request, _kwargs) File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 362, in send timeout=timeout File "/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 516, in urlopen body=body, headers=headers) File "/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 331, in _make_request httplib_response = conn.getresponse(buffering=True) File "/usr/lib/python2.7/httplib.py", line 1073, in getresponse response.begin() File "/usr/lib/python2.7/httplib.py", line 415, in begin version, status, reason = self._read_status() File "/usr/lib/python2.7/httplib.py", line 371, in _read_status line = self.fp.readline(_MAXLINE + 1) File "/usr/lib/python2.7/socket.py", line 476, in readline data = self._sock.recv(self._rbufsize) File "/usr/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py", line 200, in recv return self.recv(_args, _kwargs) File "/usr/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py", line 188, in recv data = self.connection.recv(_args, *_kwargs) SysCallError: (104, 'Connection reset by peer')

Storing debug log for failure in /home/pi/.pip/pip.log

This is the content of the file pip.log:


/usr/bin/pip run on Sat Feb 13 15:27:32 2016 Downloading/unpacking olimex-ekg-emg Getting page https://pypi.python.org/simple/olimex-ekg-emg/ URLs to search for versions for olimex-ekg-emg:

Please help me :c I have tried everything. After this failed install I did the ' $ exg -p /path/to/port ' (that is /dev/ttyACM0 in my case) and got this error: ' -bash exg: command not found '.

xiutek commented 8 years ago

When running on Python I get:

from olimex.gui import show_exg Traceback (most recent call last): File "", line 1, in ImportError: No module named olimex.gui

xiutek commented 8 years ago

I did also a clean install from the downloaded package and got this error:

root@raspberrypi:/home/pi/EKG/olimex-ekg-emg-0.1.9# python setup.py install running install running bdist_egg running egg_info writing requirements to olimex_ekg_emg.egg-info/requires.txt writing olimex_ekg_emg.egg-info/PKG-INFO writing top-level names to olimex_ekg_emg.egg-info/top_level.txt writing dependency_links to olimex_ekg_emg.egg-info/dependency_links.txt writing entry points to olimex_ekg_emg.egg-info/entry_points.txt reading manifest file 'olimex_ekgemg.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching 'pycache' found under directory '' warning: no previously-included files matching '_.py[co]' found under directory '' writing manifest file 'olimex_ekg_emg.egg-info/SOURCES.txt' installing library code to build/bdist.linux-armv7l/egg running install_lib running build_py creating build creating build/lib.linux-armv7l-2.7 creating build/lib.linux-armv7l-2.7/olimex copying olimex/gui.py -> build/lib.linux-armv7l-2.7/olimex copying olimex/init.py -> build/lib.linux-armv7l-2.7/olimex copying olimex/utils.py -> build/lib.linux-armv7l-2.7/olimex copying olimex/mock.py -> build/lib.linux-armv7l-2.7/olimex copying olimex/constants.py -> build/lib.linux-armv7l-2.7/olimex copying olimex/exg.py -> build/lib.linux-armv7l-2.7/olimex creating build/bdist.linux-armv7l creating build/bdist.linux-armv7l/egg creating build/bdist.linux-armv7l/egg/olimex copying build/lib.linux-armv7l-2.7/olimex/gui.py -> build/bdist.linux-armv7l/egg/olimex copying build/lib.linux-armv7l-2.7/olimex/init.py -> build/bdist.linux-armv7l/egg/olimex copying build/lib.linux-armv7l-2.7/olimex/utils.py -> build/bdist.linux-armv7l/egg/olimex copying build/lib.linux-armv7l-2.7/olimex/mock.py -> build/bdist.linux-armv7l/egg/olimex copying build/lib.linux-armv7l-2.7/olimex/constants.py -> build/bdist.linux-armv7l/egg/olimex copying build/lib.linux-armv7l-2.7/olimex/exg.py -> build/bdist.linux-armv7l/egg/olimex byte-compiling build/bdist.linux-armv7l/egg/olimex/gui.py to gui.pyc File "build/bdist.linux-armv7l/egg/olimex/gui.py", line 65 channel_1, _ = channel_values ^ SyntaxError: invalid syntax

byte-compiling build/bdist.linux-armv7l/egg/olimex/init.py to init.pyc byte-compiling build/bdist.linux-armv7l/egg/olimex/utils.py to utils.pyc byte-compiling build/bdist.linux-armv7l/egg/olimex/mock.py to mock.pyc byte-compiling build/bdist.linux-armv7l/egg/olimex/constants.py to constants.pyc byte-compiling build/bdist.linux-armv7l/egg/olimex/exg.py to exg.pyc installing package data to build/bdist.linux-armv7l/egg running install_data creating build/bdist.linux-armv7l/egg/olimex/mock-data copying mock-data/vt-poly.bin -> build/bdist.linux-armv7l/egg/olimex/mock-data copying mock-data/vt-fast.bin -> build/bdist.linux-armv7l/egg/olimex/mock-data copying mock-data/sinus-pvc.bin -> build/bdist.linux-armv7l/egg/olimex/mock-data copying mock-data/svt.bin -> build/bdist.linux-armv7l/egg/olimex/mock-data copying mock-data/2nd-Type1.bin -> build/bdist.linux-armv7l/egg/olimex/mock-data copying mock-data/2nd-Type2.bin -> build/bdist.linux-armv7l/egg/olimex/mock-data copying mock-data/3rd.bin -> build/bdist.linux-armv7l/egg/olimex/mock-data copying mock-data/nsr.bin -> build/bdist.linux-armv7l/egg/olimex/mock-data copying mock-data/afib.bin -> build/bdist.linux-armv7l/egg/olimex/mock-data copying mock-data/afltr.bin -> build/bdist.linux-armv7l/egg/olimex/mock-data copying mock-data/s-tach.bin -> build/bdist.linux-armv7l/egg/olimex/mock-data copying mock-data/2nd-Type2-pvc.bin -> build/bdist.linux-armv7l/egg/olimex/mock-data copying mock-data/j-brady.bin -> build/bdist.linux-armv7l/egg/olimex/mock-data copying mock-data/s-brady.bin -> build/bdist.linux-armv7l/egg/olimex/mock-data copying mock-data/vt-slow.bin -> build/bdist.linux-armv7l/egg/olimex/mock-data copying mock-data/asys.bin -> build/bdist.linux-armv7l/egg/olimex/mock-data copying mock-data/vf.bin -> build/bdist.linux-armv7l/egg/olimex/mock-data creating build/bdist.linux-armv7l/egg/EGG-INFO copying olimex_ekg_emg.egg-info/PKG-INFO -> build/bdist.linux-armv7l/egg/EGG-INFO copying olimex_ekg_emg.egg-info/SOURCES.txt -> build/bdist.linux-armv7l/egg/EGG-INFO copying olimex_ekg_emg.egg-info/dependency_links.txt -> build/bdist.linux-armv7l/egg/EGG-INFO copying olimex_ekg_emg.egg-info/entry_points.txt -> build/bdist.linux-armv7l/egg/EGG-INFO copying olimex_ekg_emg.egg-info/requires.txt -> build/bdist.linux-armv7l/egg/EGG-INFO copying olimex_ekg_emg.egg-info/top_level.txt -> build/bdist.linux-armv7l/egg/EGG-INFO zip_safe flag not set; analyzing archive contents... creating dist creating 'dist/olimex_ekg_emg-0.1.9-py2.7.egg' and adding 'build/bdist.linux-armv7l/egg' to it removing 'build/bdist.linux-armv7l/egg' (and everything under it) Processing olimex_ekg_emg-0.1.9-py2.7.egg Copying olimex_ekg_emg-0.1.9-py2.7.egg to /usr/local/lib/python2.7/dist-packages Adding olimex-ekg-emg 0.1.9 to easy-install.pth file Installing exg script to /usr/local/bin

Installed /usr/local/lib/python2.7/dist-packages/olimex_ekg_emg-0.1.9-py2.7.egg Processing dependencies for olimex-ekg-emg==0.1.9 Searching for scipy>=0.15.1 Reading https://pypi.python.org/simple/scipy/ Best match: scipy 0.17.0 Downloading https://pypi.python.org/packages/source/s/scipy/scipy-0.17.0.zip#md5=28a4fe29e980804db162524f10873211 Processing scipy-0.17.0.zip Writing /tmp/easy_install-4dFFD3/scipy-0.17.0/setup.cfg Running scipy-0.17.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-4dFFD3/scipy-0.17.0/egg-dist-tmp-2tonpv /usr/lib/python2.7/dist-packages/numpy/distutils/system_info.py:1427: UserWarning: Atlas (http://math-atlas.sourceforge.net/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [atlas]) or by setting the ATLAS environment variable. warnings.warn(AtlasNotFoundError.doc) /usr/lib/python2.7/dist-packages/numpy/distutils/system_info.py:1438: UserWarning: Lapack (http://www.netlib.org/lapack/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [lapack]) or by setting the LAPACK environment variable. warnings.warn(LapackNotFoundError.doc) /usr/lib/python2.7/dist-packages/numpy/distutils/system_info.py:1441: UserWarning: Lapack (http://www.netlib.org/lapack/) sources not found. Directories to search for the sources can be specified in the numpy/distutils/site.cfg file (section [lapack_src]) or by setting the LAPACK_SRC environment variable. warnings.warn(LapackSrcNotFoundError.doc) Warning: distutils distribution has been initialized, it may be too late to add an extension _vqWarning: distutils distribution has been initialized, it may be too late to add an extension _hierarchyWarning: distutils distribution has been initialized, it may be too late to add a subpackage clusterWarning: distutils distribution has been initialized, it may be too late to add a subpackage constantsWarning: distutils distribution has been initialized, it may be too late to add a library dfftpackWarning: distutils distribution has been initialized, it may be too late to add a library fftpackWarning: distutils distribution has been initialized, it may be too late to add an extension _fftpackWarning: distutils distribution has been initialized, it may be too late to add an extension convolveWarning: distutils distribution has been initialized, it may be too late to add a subpackage fftpackRunning from scipy source directory. Warning: distutils distribution has been initialized, it may be too late to add a library machWarning: distutils distribution has been initialized, it may be too late to add a library quadpackWarning: distutils distribution has been initialized, it may be too late to add a library odepackWarning: distutils distribution has been initialized, it may be too late to add a library dopWarning: distutils distribution has been initialized, it may be too late to add an extension _quadpackWarning: distutils distribution has been initialized, it may be too late to add an extension _odepackWarning: distutils distribution has been initialized, it may be too late to add an extension vodeWarning: distutils distribution has been initialized, it may be too late to add an extension lsodaWarning: distutils distribution has been initialized, it may be too late to add an extension _dopWarning: distutils distribution has been initialized, it may be too late to add an extension _test_multivariateWarning: distutils distribution has been initialized, it may be too late to add an extension _test_odeint_bandedWarning: distutils distribution has been initialized, it may be too late to add a subpackage integrateWarning: distutils distribution has been initialized, it may be too late to add a library fitpackWarning: distutils distribution has been initialized, it may be too late to add an extension interpndWarning: distutils distribution has been initialized, it may be too late to add an extension _ppolyWarning: distutils distribution has been initialized, it may be too late to add an extension _fitpackWarning: distutils distribution has been initialized, it may be too late to add an extension dfitpackWarning: distutils distribution has been initialized, it may be too late to add an extension _interpolateWarning: distutils distribution has been initialized, it may be too late to add a subpackage interpolateWarning: distutils distribution has been initialized, it may be too late to add an extension streamsWarning: distutils distribution has been initialized, it may be too late to add an extension mio_utilsWarning: distutils distribution has been initialized, it may be too late to add an extension mio5_utilsWarning: distutils distribution has been initialized, it may be too late to add a subpackage matlabWarning: distutils distribution has been initialized, it may be too late to add a subpackage arffWarning: distutils distribution has been initialized, it may be too late to add a subpackage harwell_boeingWarning: distutils distribution has been initialized, it may be too late to add a subpackage ioerror: no lapack/blas resources found

logston commented 8 years ago

@xiutek Thanks for reaching out. First, I need to have you answer a few questions since the package is only supported on a few OS/Python version configurations.

  1. What OS are you running? Looks like you are running this on a raspberry pi
  2. What Python version are you trying to run this package with? Looks like you might be trying to run this program with Python <= 3.3. This package is specifically for Python 3.4+
logston commented 8 years ago

ps. the first two errors look like errors with your internet connection; not the package.

xiutek commented 8 years ago

Hello, in the previous atempts I was using Raspbian and Ubuntu 14, this time I used a Linux Mint 17 fresh install and got the same results. Im sure im using Python 3.4+ Here is the log.

xiu@xiu-mint ~ $ source my_py3/bin/activate # to activate the python3 environemt(my_py3) xiu@xiu-mint ~ $ python -V Python 3.4.3 (my_py3) xiu@xiu-mint ~ $ pip install olimex-ekg-emg Collecting olimex-ekg-emg Using cached olimex-ekg-emg-0.1.9.tar.gz Collecting pyserial>=2.7 (from olimex-ekg-emg) Using cached pyserial-3.0.1.tar.gz Collecting numpy>=1.9.1 (from olimex-ekg-emg) Using cached numpy-1.10.4.tar.gz Collecting matplotlib>=1.4.2 (from olimex-ekg-emg) Using cached matplotlib-1.5.1.tar.gz Complete output from command python setup.py egg_info:

Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
            matplotlib: yes [1.5.1]
                python: yes [3.4.3 (default, Oct 14 2015, 20:28:29)  [GCC
                        4.8.4]]
              platform: yes [linux]

REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [not found. pip may install it below.]
              dateutil: yes [dateutil was not found. It is required for date
                        axis support. pip/easy_install may attempt to
                        install it after matplotlib.]
                  pytz: yes [pytz was not found. pip will attempt to install
                        it after matplotlib.]
                cycler: yes [cycler was not found. pip will attempt to
                        install it after matplotlib.]
               tornado: yes [tornado was not found. It is required for the
                        WebAgg backend. pip/easy_install may attempt to
                        install it after matplotlib.]
             pyparsing: yes [pyparsing was not found. It is required for
                        mathtext support. pip/easy_install may attempt to
                        install it after matplotlib.]
                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 'qhull' could not be
                        found. Using local copy.]

OPTIONAL SUBPACKAGES
           sample_data: yes [installing]
              toolkits: yes [installing]
                 tests: yes [nose 0.11.1 or later is required to run the
                        matplotlib test suite. Please install it with pip or
                        your preferred tool to run the test suite / using
                        unittest.mock]
        toolkits_tests: yes [nose 0.11.1 or later is required to run the
                        matplotlib test suite. Please install it with pip or
                        your preferred tool to run the test suite / using
                        unittest.mock]

OPTIONAL BACKEND EXTENSIONS
                macosx: no  [Mac OS-X only]
                qt5agg: no  [PyQt5 not found]
                qt4agg: no  [PySide not found; PyQt4 not found]
               gtk3agg: no  [Requires pygobject to be installed.]
             gtk3cairo: no  [Requires cairocffi or pycairo to be installed.]
                gtkagg: no  [Requires pygtk]
                 tkagg: no  [TKAgg requires Tkinter.]
                 wxagg: no  [requires wxPython]
                   gtk: no  [Requires pygtk]
                   agg: yes [installing]
                 cairo: no  [cairocffi or pycairo not found]
             windowing: no  [Microsoft Windows only]

OPTIONAL LATEX DEPENDENCIES
                dvipng: no
           ghostscript: yes [version 9.10]
                 latex: no
               pdftops: yes [version 0.24.5]

OPTIONAL PACKAGE DATA
                  dlls: no  [skipping due to configuration]

============================================================================
                        * The following required packages can not be built:
                        * freetype, png

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-t3wj8w1e/matplotlib (my_py3) xiu@xiu-mint ~ $

logston commented 8 years ago

@xiutek This doesen't look like a bug with the olimex-ekg-emg package. In fact the above error is not due to a bug at all, but due to a missing library:

                        * The following required packages can not be built:
                        * freetype, png

Please install libpng and freetype2 to before attempting to install this package.