astral-sh / uv

An extremely fast Python package and project manager, written in Rust.
https://docs.astral.sh/uv
Apache License 2.0
22.44k stars 652 forks source link

[Error]stream did not contain valid UTF-8 #8009

Open sdbds opened 2 days ago

sdbds commented 2 days ago

7726

command: uv pip install crcmod==1.7 platform:windows version:uv 0.4.19 (a451fb685 2024-10-07)

error: Failed to prepare distributions
  Caused by: Failed to fetch wheel: crcmod==1.7
  Caused by: Failed to run `C:\Users\QINGLO~1\AppData\Local\Temp\.tmpSyOjmr\builds-v0\.tmps5aMOw\Scripts\python.exe`
  Caused by: stream did not contain valid UTF-8
BurntSushi commented 2 days ago

Can you share the output of running chcp? That should print the codepage you're using.

konstin commented 2 days ago

Additionally, which terminal/shell are you using? I couldn't reproduce this on my windows machine (german locale, codepage 850, powershell)

Note crcmod==1.7 was published in 2010 and is only tested up to Python 3.1.

sdbds commented 2 days ago

Can you share the output of running chcp? That should print the codepage you're using.

Additionally, which terminal/shell are you using? I couldn't reproduce this on my windows machine (german locale, codepage 850, powershell)

Note crcmod==1.7 was published in 2010 and is only tested up to Python 3.1.

Chinese locale, codepage 936, powershell 7.4.5

sdbds commented 2 days ago

crcmod==1.7

via oss2

oss2==2.19.0

via funasr

funasr==1.1.5

via fish-speech (./pyproject.toml)

kahojyun commented 2 days ago

Please try install with pip install -v --no-cache-dir crcmod==1.7 and uv pip install -vv -n crdmod==1.7. It should print the output of build script like:

❯ .venv\Scripts\pip.exe install --no-cache-dir -v crcmod==1.7
Using pip 24.2 from E:\tt\.venv\lib\site-packages\pip (python 3.8)
Collecting crcmod==1.7
  Downloading crcmod-1.7.tar.gz (89 kB)
  Running command python setup.py egg_info
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: crcmod
  Running command python setup.py bdist_wheel
  _crcfunext.c
     Creating library build\temp.win-amd64-cpython-38\Release\python3\src\_crcfunext.cp38-win_amd64.lib and object build\temp.win-amd64-cpython-38\Release\python3\src\_crcfunext.cp38-win_amd64.exp
  Generating code
  Finished generating code
  E:\tt\.venv\lib\site-packages\setuptools\_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
  !!

          ********************************************************************************
          Please avoid running ``setup.py`` directly.
          Instead, use pypa/build, pypa/installer or other
          standards-based tools.

          See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
          ********************************************************************************

  !!
    self.initialize_options()
  E:\tt\.venv\lib\site-packages\setuptools\command\bdist_wheel.py:115: RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
    if get_flag("Py_DEBUG", hasattr(sys, "gettotalrefcount"), warn=(impl == "cp")):
  Building wheel for crcmod (setup.py) ... done
  Created wheel for crcmod: filename=crcmod-1.7-cp38-cp38-win_amd64.whl size=25415 sha256=777a3c9daadf2c05407249df3af462e8da226d1099a33f1f34328c1238e164e1
  Stored in directory: C:\Users\kahoj\AppData\Local\Temp\pip-ephem-wheel-cache-5cky5nzg\wheels\ca\5a\02\f3acf982a026f3319fb3e798a8dca2d48fafee7761788562e9
Successfully built crcmod
Installing collected packages: crcmod
Successfully installed crcmod-1.7
sdbds commented 1 day ago

Please try install with pip install -v --no-cache-dir crcmod==1.7 and uv pip install -vv -n crdmod==1.7. It should print the output of build script like:

❯ .venv\Scripts\pip.exe install --no-cache-dir -v crcmod==1.7
Using pip 24.2 from E:\tt\.venv\lib\site-packages\pip (python 3.8)
Collecting crcmod==1.7
  Downloading crcmod-1.7.tar.gz (89 kB)
  Running command python setup.py egg_info
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: crcmod
  Running command python setup.py bdist_wheel
  _crcfunext.c
     Creating library build\temp.win-amd64-cpython-38\Release\python3\src\_crcfunext.cp38-win_amd64.lib and object build\temp.win-amd64-cpython-38\Release\python3\src\_crcfunext.cp38-win_amd64.exp
  Generating code
  Finished generating code
  E:\tt\.venv\lib\site-packages\setuptools\_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
  !!

          ********************************************************************************
          Please avoid running ``setup.py`` directly.
          Instead, use pypa/build, pypa/installer or other
          standards-based tools.

          See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
          ********************************************************************************

  !!
    self.initialize_options()
  E:\tt\.venv\lib\site-packages\setuptools\command\bdist_wheel.py:115: RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
    if get_flag("Py_DEBUG", hasattr(sys, "gettotalrefcount"), warn=(impl == "cp")):
  Building wheel for crcmod (setup.py) ... done
  Created wheel for crcmod: filename=crcmod-1.7-cp38-cp38-win_amd64.whl size=25415 sha256=777a3c9daadf2c05407249df3af462e8da226d1099a33f1f34328c1238e164e1
  Stored in directory: C:\Users\kahoj\AppData\Local\Temp\pip-ephem-wheel-cache-5cky5nzg\wheels\ca\5a\02\f3acf982a026f3319fb3e798a8dca2d48fafee7761788562e9
Successfully built crcmod
Installing collected packages: crcmod
Successfully installed crcmod-1.7
pip install -v --no-cache-dir crcmod==1.7
Using pip 23.3.1 from E:\Python310\lib\site-packages\pip (python 3.10)
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple, https://pypi.ngc.nvidia.com
Requirement already satisfied: crcmod==1.7 in e:\python310\lib\site-packages (1.7)
uv pip install -vv -n crdmod==1.7
    0.001468s DEBUG uv uv 0.4.19
 uv_requirements::specification::from_source source=crdmod==1.7
    0.003947s DEBUG uv_python::discovery Searching for default Python interpreter in system path or `py` launcher
    0.157329s DEBUG uv_python::discovery Found `cpython-3.10.11-windows-x86_64-none` at `E:\Code\fish-speech-for-windows\.venv\Scripts\python.exe` (active virtual environment)
    0.158000s DEBUG uv::commands::pip::operations Using Python 3.10.11 environment at .venv
    0.158378s DEBUG uv_fs Acquired lock for `.venv`
    0.170668s DEBUG uv::commands::pip::install At least one requirement is not satisfied: crdmod==1.7
 uv_client::linehaul::linehaul
    0.171926s DEBUG uv_client::base_client Using request timeout of 30s
 uv_resolver::flat_index::from_entries
 uv_resolver::resolver::solve
    0.173051s   0ms DEBUG uv_resolver::resolver Solving with installed Python version: 3.10.11
    0.173136s   0ms DEBUG uv_resolver::resolver Solving with target Python version: >=3.10.11
   uv_resolver::resolver::choose_version package=root
   uv_resolver::resolver::get_dependencies_forking package=root, version=0a0.dev0
     uv_resolver::resolver::get_dependencies package=root, version=0a0.dev0
    0.173560s   0ms DEBUG uv_resolver::resolver Adding direct dependency: crdmod==1.7
   uv_resolver::resolver::choose_version package=crdmod
 uv_resolver::resolver::process_request request=Versions crdmod
   uv_client::registry_client::simple_api package=crdmod
     uv_client::cached_client::get_cacheable
       uv_client::cached_client::read_and_parse_cache file=C:\Users\QINGLO~1\AppData\Local\Temp\.tmpSrw8eN\simple-v13\pypi\crdmod.rkyv
 uv_resolver::resolver::process_request request=Prefetch crdmod ==1.7
 uv_client::cached_client::from_path_sync path="C:\\Users\\QINGLO~1\\AppData\\Local\\Temp\\.tmpSrw8eN\\simple-v13\\pypi\\crdmod.rkyv"
        0.174370s   0ms DEBUG uv_client::cached_client No cache entry for: https://pypi.org/simple/crdmod/
       uv_client::cached_client::fresh_request url="https://pypi.org/simple/crdmod/"
      0.342466s 168ms DEBUG uv_resolver::resolver Searching for a compatible version of crdmod (==1.7)
    0.342615s 169ms DEBUG uv_resolver::resolver No compatible version found for: crdmod
  × No solution found when resolving dependencies:
  ╰─▶ Because crdmod was not found in the package registry and you require crdmod==1.7, we can conclude that your
      requirements are unsatisfiable.
    0.343650s DEBUG uv_fs Released lock at `E:\Code\fish-speech-for-windows\.venv\.lock`