0

I want to install Python library SleepPY onto my windows 10 but get the following errors...

I installed Python 2.7 onto my Windows 10 (after installing Python 3.9.1).
I installed SleepPY by following the instructions:

git clone https://github.com/elyiorgos/sleeppy.git
cd sleeppy
python setup.py install

...but got this error:

C:\PRIMARY\WORK\sleeppy>python setup.py install
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

So, I used absolute path but got this error:

C:\PRIMARY\WORK\sleeppy>\python27\python setup.py install
Traceback (most recent call last):
  File "setup.py", line 1, in <module>
    import setuptools
ImportError: No module named setuptools

So then I tried the next instruction:
pip install -r requirements.txt ...and got another error:

C:\PRIMARY\WORK\sleeppy>pip install -r requirements.txt
Collecting argparse==1.1
  Downloading argparse-1.1.zip (151 kB)
     |████████████████████████████████| 151 kB 2.2 MB/s
Collecting bitstring==3.1.5
  Downloading bitstring-3.1.5.zip (624 kB)
     |████████████████████████████████| 624 kB 6.4 MB/s
Collecting matplotlib==2.2.4
  Downloading matplotlib-2.2.4.tar.gz (37.0 MB)
     |████████████████████████████████| 37.0 MB 2.2 MB/s
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\doug\appdata\local\programs\python\python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Doug\\AppData\\Local\\Temp\\pip-install-3xcc1o0e\\matplotlib_2bb1334869f24b86835007d17eb16dad\\setup.py'"'"'; __file__='"'"'C:\\Users\\Doug\\AppData\\Local\\Temp\\pip-install-3xcc1o0e\\matplotlib_2bb1334869f24b86835007d17eb16dad\\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 'C:\Users\Doug\AppData\Local\Temp\pip-pip-egg-info-sxywtc1u'
         cwd: C:\Users\Doug\AppData\Local\Temp\pip-install-3xcc1o0e\matplotlib_2bb1334869f24b86835007d17eb16dad\
    Complete output (61 lines):
    ============================================================================
    Edit setup.cfg to change the build options

    BUILDING MATPLOTLIB
                matplotlib: yes [2.2.4]
                    python: yes [3.9.1 (tags/v3.9.1:1e5d33e, Dec  7 2020,
                            17:08:21) [MSC v.1927 64 bit (AMD64)]]
                  platform: yes [win32]

    REQUIRED DEPENDENCIES AND EXTENSIONS
                     numpy: yes [not found. pip may install it below.]
          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 freetype
                            (freetype2\ft2build.h) could not be found.  You may
                            need to install the development package.]
                       png: no  [The C/C++ header for png (png.h) could not be
                            found.  You may need to install the development
                            package.]
                     qhull: yes [pkg-config information for 'libqhull' could not
                            be found. Using local copy.]

    OPTIONAL SUBPACKAGES
               sample_data: yes [installing]
                  toolkits: yes [installing]
                     tests: no  [skipping due to configuration]
            toolkits_tests: no  [skipping due to configuration]

    OPTIONAL BACKEND EXTENSIONS
                    macosx: no  [Mac OS-X only]
                    qt5agg: no  [PySide2 not found; 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: yes [installing; run-time loading from Python Tcl /
                            Tk]
                     wxagg: no  [requires wxPython]
                       gtk: no  [Requires pygtk]
                       agg: yes [installing]
                     cairo: no  [cairocffi or pycairo not found]
                 windowing: yes [installing]

    OPTIONAL LATEX DEPENDENCIES
                    dvipng: no
               ghostscript: no
                     latex: no
                   pdftops: no

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

    ============================================================================
                            * The following required packages can not be built:
                            * freetype, png
                            * Please check http://gnuwin32.sourceforge.net/packa
                            * ges/freetype.htm for instructions to install
                            * freetype
                            * Please check http://gnuwin32.sourceforge.net/packa
                            * ges/libpng.htm for instructions to install png
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

U P D A T E ---------------------------------
I followed suggestions from Boris but no luck...

    C:\Python27>python -m pip install sleeppy
    C:\Python27\python.exe: No module named pip
    
    C:\Python27>pip install sleeppy
    ERROR: Could not find a version that satisfies the requirement sleeppy
    ERROR: No matching distribution found for sleeppy


C:\Python27>python
Python 2.7 (r27:82525, Jul  4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> pip install sleeppy
  File "<stdin>", line 1
    pip install sleeppy
              ^
Doug Null
  • 7,989
  • 15
  • 69
  • 148
  • Why don't you install it with `pip` instead? – Boris Verkhovskiy Jan 15 '21 at 19:55
  • I did (see above). But it got the above error. – Doug Null Jan 15 '21 at 19:57
  • I see that you tried to install *its dependencies* with pip, but not the actual `sleeppy` package itself. Try `pip install sleeppy` or even `python2 -m pip install sleeppy` – Boris Verkhovskiy Jan 15 '21 at 19:58
  • Also it looks like when you tried to install its dependencies you did it with your Python 3 pip, not your Python 2 pip (because it says `python: yes [3.9.1 ` when its installing matplotlib). – Boris Verkhovskiy Jan 15 '21 at 20:00
  • I just tried "pip install sleeppy" and "python2 -m pip install sleeppy" but no luck. (see U P D A T E above) – Doug Null Jan 16 '21 at 20:24
  • As per the error "`python.exe: No module named pip`" you need to install Python 2 with pip, this question might help: https://stackoverflow.com/questions/32639074/why-am-i-getting-importerror-no-module-named-pip-right-after-installing-pip – Boris Verkhovskiy Jan 16 '21 at 21:02

1 Answers1

0

Installed python-2.7.18.amd64.msi from python.org (which also installed pip 10.2.3)

cd \python27
python.exe and verify 2.7.18

Added to Windows 10 PATH:

c:\Python27
C:\Python27\Scripts         
C:\Python27\Tools\Scripts

pip install sleepy

Bob's my uncle; yours too.

Doug Null
  • 7,989
  • 15
  • 69
  • 148