【问题标题】:Unable to install python "Scalene" module无法安装 python“Scalene”模块
【发布时间】:2021-03-10 11:16:47
【问题描述】:

我正在尝试安装 Scalene 模块以在 Python 中进行分析。

到目前为止,我已经尝试了两种方法 pip install scalenepip install -U scalene 但都给了我以下错误:

Running setup.py install for scalene ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\deepanshu\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\DEEPAN~1\\AppData\\Local\\Temp\\pip-install-di4jsn85\\scalene\\setup.py'"'"'; __file__='"'"'C:\\Users\\DEEPAN~1\\AppData\\Local\\Temp\\pip-install-di4jsn85\\scalene\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\DEEPAN~1\AppData\Local\Temp\pip-record-hs0b9thb\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\deepanshu\appdata\local\programs\python\python37\Include\scalene'
         cwd: C:\Users\DEEPAN~1\AppData\Local\Temp\pip-install-di4jsn85\scalene\
    Complete output (40 lines):
    WARNING: The wheel package is not available.
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.7
    creating build\lib.win-amd64-3.7\scalene
    copying scalene\adaptive.py -> build\lib.win-amd64-3.7\scalene
    copying scalene\leak_analysis.py -> build\lib.win-amd64-3.7\scalene
    copying scalene\replacement_exit.py -> build\lib.win-amd64-3.7\scalene
    copying scalene\replacement_fork.py -> build\lib.win-amd64-3.7\scalene
    copying scalene\replacement_lock.py -> build\lib.win-amd64-3.7\scalene
    copying scalene\replacement_pjoin.py -> build\lib.win-amd64-3.7\scalene
    copying scalene\replacement_poll_selector.py -> build\lib.win-amd64-3.7\scalene
    copying scalene\replacement_thread_join.py -> build\lib.win-amd64-3.7\scalene
    copying scalene\runningstats.py -> build\lib.win-amd64-3.7\scalene
    copying scalene\scalene_arguments.py -> build\lib.win-amd64-3.7\scalene
    copying scalene\scalene_magics.py -> build\lib.win-amd64-3.7\scalene
    copying scalene\scalene_output.py -> build\lib.win-amd64-3.7\scalene
    copying scalene\scalene_profiler.py -> build\lib.win-amd64-3.7\scalene
    copying scalene\scalene_statistics.py -> build\lib.win-amd64-3.7\scalene
    copying scalene\sparkline.py -> build\lib.win-amd64-3.7\scalene
    copying scalene\syntaxline.py -> build\lib.win-amd64-3.7\scalene
    copying scalene\__init__.py -> build\lib.win-amd64-3.7\scalene
    copying scalene\__main__.py -> build\lib.win-amd64-3.7\scalene
    running egg_info
    writing scalene.egg-info\PKG-INFO
    writing dependency_links to scalene.egg-info\dependency_links.txt
    writing entry points to scalene.egg-info\entry_points.txt
    writing requirements to scalene.egg-info\requires.txt
    writing top-level names to scalene.egg-info\top_level.txt
    reading manifest file 'scalene.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'scalene.egg-info\SOURCES.txt'
    copying scalene\libscalene.dylib -> build\lib.win-amd64-3.7\scalene
    copying scalene\libscalene.so -> build\lib.win-amd64-3.7\scalene
    copying scalene\scalene-usage.txt -> build\lib.win-amd64-3.7\scalene
    running build_ext
    building 'get_line_atomic' extension
    error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\deepanshu\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\DEEPAN~1\\AppData\\Local\\Temp\\pip-install-di4jsn85\\scalene\\setup.py'"'"'; __file__='"'"'C:\\Users\\DEEPAN~1\\AppData\\Local\\Temp\\pip-install-di4jsn85\\scalene\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\DEEPAN~1\AppData\Local\Temp\pip-record-hs0b9thb\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\deepanshu\appdata\local\programs\python\python37\Include\scalene' Check the logs for full command output.

请提出解决此错误的方法。

我在 Windows 10 上使用 python 3.7。

【问题讨论】:

    标签: python python-3.x profiling profiler


    【解决方案1】:

    尝试安装旧版本: 例如pip install scalene==0.9.16

    虽然我不确定它是否支持 Windows 10

    【讨论】:

      猜你喜欢
      • 2022-07-13
      • 2019-07-07
      • 1970-01-01
      • 2020-09-19
      • 1970-01-01
      • 2020-10-23
      • 2017-05-30
      • 2018-11-02
      • 1970-01-01
      相关资源
      最近更新 更多