首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Windows 10上安装SleepPY时出错

在Windows 10上安装SleepPY时出错
EN

Stack Overflow用户
提问于 2021-01-15 19:29:37
回答 1查看 64关注 0票数 0

我想在我的windows 10上安装Python,但是得到以下错误.

我在Windows 10上安装了Python2.7(安装了Python3.9.1之后)。

我按照以下说明安装了SleepPY:

git克隆https://github.com/elyiorgos/sleeppy.git

cd困倦

python setup.py安装

...but得到了以下错误:

代码语言:javascript
复制
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.

因此,我使用了绝对路径,但得到了以下错误:

代码语言:javascript
复制
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

然后我试了下一个指令:

pip安装-r requirements.txt ...and有另一个错误:

代码语言:javascript
复制
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-?

我听从了鲍里斯的建议但没有运气..。

代码语言:javascript
复制
    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
              ^
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-01-18 19:34:34

从python.org安装了python2.7.18.amd64.msi(也安装了pip10.2.3)

cd _python27 27

python.exe和验证2.7.18

添加到Windows 10路径:

代码语言:javascript
复制
c:\Python27
C:\Python27\Scripts         
C:\Python27\Tools\Scripts

pip安装困倦

鲍勃是我叔叔,你也是。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65742466

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档