Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when installing peewee and wtf-peewee #2139

Closed
drunkwcodes opened this issue Jul 27, 2023 · 8 comments · Fixed by j178/pdm#1
Closed

Errors when installing peewee and wtf-peewee #2139

drunkwcodes opened this issue Jul 27, 2023 · 8 comments · Fixed by j178/pdm#1
Labels
🐛 bug Something isn't working

Comments

@drunkwcodes
Copy link
Contributor

  • [v ] I have searched the issue tracker and believe that this is not a duplicate.

Hash mismatch of peewee 3.16.2, wtf-peewee 3.0.4, using pdm 2.6.1

I installed them using pdm 2.8.1 at first, failed with ModuleNotFoundError for "setuptools", which I installed already and importable,
the version is "47.1.0". Then I uninstalled pdm 2.8.1, installed 2.6.1, tried pdm install again and met this error.

How to clear cache and download again? I checked pypi, my lock files sha256 sum are correct.

Make sure you run commands with -v flag before pasting the output.

STATUS: Resolving packages from lockfile...
STATUS: Fetching hashes for resolved packages...
Synchronizing working set with lock file: 2 to add, 0 to update, 0 to remove

unearth.preparer: Using cached <Link https://files.pythonhosted.org/packages/9a/9c/1bb1f9fae1a7203122a5a8febe168dec3b6b0291db067d1700df5c480f2c/wtf-peewee-3.0.4.tar.gz (from None)>
unearth.preparer: Using cached <Link https://files.pythonhosted.org/packages/a9/50/1dd5ea74c559df4afb8391f8d05f0fec685dbe8effba13bb9072901eb288/peewee-3.16.2.tar.gz (from None)>
  x Install wtf-peewee 3.0.4 failed
  x Install peewee 3.16.2 failed
pdm.termui: Error occurs:
Traceback (most recent call last):
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures\thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\installers\synchronizers.py", line 272, in install_candidate
    self.manager.install(can)
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\installers\manager.py", line 33, in install
    installer(str(prepared.build()), self.environment, prepared.direct_url())
                  ^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\models\candidates.py", line 359, in build
    self.obtain(allow_all=False)
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\models\candidates.py", line 417, in obtain
    result = finder.download_and_unpack(self.link, build_dir, download_dir, hash_options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\unearth\finder.py", line 408, in download_and_unpack
    file = unpack_link(
           ^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\unearth\preparer.py", line 315, in unpack_link
    validator.validate()
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\unearth\preparer.py", line 113, in validate
    raise HashMismatchError(self.package_link, self.allowed, gots)
unearth.errors.HashMismatchError: Hash mismatch for https://files.pythonhosted.org/packages/9a/9c/1bb1f9fae1a7203122a5a8febe168dec3b6b0291db067d1700df5c480f2c/wtf-peewee-3.0.4.tar.gz:
Expected(sha256): 7136d845dbc051363ce8c3d1df7047fa703a1ff7a947cb201c380e050fd35244
  Actual(sha256): e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
pdm.termui: Error occurs:
Traceback (most recent call last):
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures\thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\installers\synchronizers.py", line 272, in install_candidate
    self.manager.install(can)
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\installers\manager.py", line 33, in install
    installer(str(prepared.build()), self.environment, prepared.direct_url())
                  ^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\models\candidates.py", line 359, in build
    self.obtain(allow_all=False)
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\models\candidates.py", line 417, in obtain
    result = finder.download_and_unpack(self.link, build_dir, download_dir, hash_options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\unearth\finder.py", line 408, in download_and_unpack
    file = unpack_link(
           ^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\unearth\preparer.py", line 315, in unpack_link
    validator.validate()
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\unearth\preparer.py", line 113, in validate
    raise HashMismatchError(self.package_link, self.allowed, gots)
unearth.errors.HashMismatchError: Hash mismatch for https://files.pythonhosted.org/packages/a9/50/1dd5ea74c559df4afb8391f8d05f0fec685dbe8effba13bb9072901eb288/peewee-3.16.2.tar.gz:
Expected(sha256): 10769981198c7311f84a0ca8db892fa213303a8eb1305deb795a71e7bd606a91
  Actual(sha256): e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Retry failed jobs
unearth.preparer: Using cached <Link https://files.pythonhosted.org/packages/9a/9c/1bb1f9fae1a7203122a5a8febe168dec3b6b0291db067d1700df5c480f2c/wtf-peewee-3.0.4.tar.gz (from None)>
unearth.preparer: Using cached <Link https://files.pythonhosted.org/packages/a9/50/1dd5ea74c559df4afb8391f8d05f0fec685dbe8effba13bb9072901eb288/peewee-3.16.2.tar.gz (from None)>
  x Install wtf-peewee 3.0.4 failed
pdm.termui: Error occurs:
Traceback (most recent call last):
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures\thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\installers\synchronizers.py", line 272, in install_candidate
    self.manager.install(can)
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\installers\manager.py", line 33, in install
    installer(str(prepared.build()), self.environment, prepared.direct_url())
                  ^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\models\candidates.py", line 359, in build
    self.obtain(allow_all=False)
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\models\candidates.py", line 417, in obtain
    result = finder.download_and_unpack(self.link, build_dir, download_dir, hash_options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\unearth\finder.py", line 408, in download_and_unpack
    file = unpack_link(
           ^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\unearth\preparer.py", line 315, in unpack_link
    validator.validate()
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\unearth\preparer.py", line 113, in validate
    raise HashMismatchError(self.package_link, self.allowed, gots)
unearth.errors.HashMismatchError: Hash mismatch for https://files.pythonhosted.org/packages/9a/9c/1bb1f9fae1a7203122a5a8febe168dec3b6b0291db067d1700df5c480f2c/wtf-peewee-3.0.4.tar.gz:
Expected(sha256): 7136d845dbc051363ce8c3d1df7047fa703a1ff7a947cb201c380e050fd35244
  Actual(sha256): e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
  x Install peewee 3.16.2 failed
pdm.termui: Error occurs:
Traceback (most recent call last):
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures\thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\installers\synchronizers.py", line 272, in install_candidate
    self.manager.install(can)
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\installers\manager.py", line 33, in install
    installer(str(prepared.build()), self.environment, prepared.direct_url())
                  ^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\models\candidates.py", line 359, in build
    self.obtain(allow_all=False)
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\models\candidates.py", line 417, in obtain
    result = finder.download_and_unpack(self.link, build_dir, download_dir, hash_options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\unearth\finder.py", line 408, in download_and_unpack
    file = unpack_link(
           ^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\unearth\preparer.py", line 315, in unpack_link
    validator.validate()
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\unearth\preparer.py", line 113, in validate
    raise HashMismatchError(self.package_link, self.allowed, gots)
unearth.errors.HashMismatchError: Hash mismatch for https://files.pythonhosted.org/packages/a9/50/1dd5ea74c559df4afb8391f8d05f0fec685dbe8effba13bb9072901eb288/peewee-3.16.2.tar.gz:
Expected(sha256): 10769981198c7311f84a0ca8db892fa213303a8eb1305deb795a71e7bd606a91
  Actual(sha256): e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Scripts\pdm.exe\__main__.py", line 7, in <module>
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\core.py", line 268, in main
    return Core().main(args)
           ^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\core.py", line 192, in main
    raise cast(Exception, err).with_traceback(traceback) from None
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\core.py", line 187, in main
    self.handle(project, options)
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\core.py", line 153, in handle
    command.handle(project, options)
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\cli\commands\install.py", line 86, in handle
    actions.do_sync(
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\cli\actions.py", line 219, in do_sync
    synchronizer.synchronize()
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\installers\synchronizers.py", line 440, in synchronize
    raise InstallationError("Some package operations are not complete yet")
pdm.exceptions.InstallationError: Some package operations are not complete yet

Steps to reproduce

Actual behavior

Expected behavior

Environment Information

# Paste the output of `pdm info && pdm info --env` below:
PDM version:
  2.6.1
Python Interpreter:
  C:\Users\張\projects\matty_web\.venv\Scripts\python.exe (3.11)
Project Root:
  C:/Users/張/projects/matty_web
Local Packages:


PDM 2.6.1 is installed, while 2.8.1 is available.
Please run `pdm self update` to upgrade.
Run `pdm config check_update false` to disable the check.
{
  "implementation_name": "cpython",
  "implementation_version": "3.11.4",
  "os_name": "nt",
  "platform_machine": "AMD64",
  "platform_release": "10",
  "platform_system": "Windows",
  "platform_version": "10.0.19042",
  "python_full_version": "3.11.4",
  "platform_python_implementation": "CPython",
  "python_version": "3.11",
  "sys_platform": "win32"
}

PDM 2.6.1 is installed, while 2.8.1 is available.
Please run `pdm self update` to upgrade.
Run `pdm config check_update false` to disable the check.
@drunkwcodes drunkwcodes added the 🐛 bug Something isn't working label Jul 27, 2023
@frostming
Copy link
Collaborator

frostming commented Jul 27, 2023

First, we don't tackle problems on older versions. Providing a running result on older versions, whether successful or not, isn't helpful. Please provide the error output on the latest PDM.

And to clear caches, run pdm cache clear

@drunkwcodes
Copy link
Contributor Author

OK, I use pdm cache clear and re-install again, 2.6.1's error messages are as same as 2.8.1's, as following:

STATUS: Resolving packages from lockfile...
STATUS: Fetching hashes for resolved packages...
Synchronizing working set with lock file: 2 to add, 0 to update, 0 to remove

unearth.preparer: Using cached <Link https://files.pythonhosted.org/packages/9a/9c/1bb1f9fae1a7203122a5a8febe168dec3b6b0291db067d1700df5c480f2c/wtf-peewee-3.0.4.tar.gz (from None)>
unearth.preparer: Using cached <Link https://files.pythonhosted.org/packages/a9/50/1dd5ea74c559df4afb8391f8d05f0fec685dbe8effba13bb9072901eb288/peewee-3.16.2.tar.gz (from None)>
pdm.termui: Preparing isolated env for PEP 517 build...
pdm.termui: Saving wheel to cache: <Link https://files.pythonhosted.org/packages/9a/9c/1bb1f9fae1a7203122a5a8febe168dec3b6b0291db067d1700df5c480f2c/wtf-peewee-3.0.4.tar.gz (from None)>
pdm.termui: Running PEP 517 backend to build a wheel for <Link https://files.pythonhosted.org/packages/9a/9c/1bb1f9fae1a7203122a5a8febe168dec3b6b0291db067d1700df5c480f2c/wtf-peewee-3.0.4.tar.gz (from None)>
pdm.termui: ======== Start resolving requirements ========
pdm.termui:   wheel
pdm.termui:   setuptools>=40.8.0
pdm.termui:   python>=3.11.4,<3.11.5
pdm.termui:   Adding requirement wheel
pdm.termui: Preparing isolated env for PEP 517 build...
pdm.termui: Saving wheel to cache: <Link https://files.pythonhosted.org/packages/a9/50/1dd5ea74c559df4afb8391f8d05f0fec685dbe8effba13bb9072901eb288/peewee-3.16.2.tar.gz (from None)>
pdm.termui: Running PEP 517 backend to build a wheel for <Link https://files.pythonhosted.org/packages/a9/50/1dd5ea74c559df4afb8391f8d05f0fec685dbe8effba13bb9072901eb288/peewee-3.16.2.tar.gz (from None)>
pdm.termui: ======== Start resolving requirements ========
pdm.termui:   wheel
pdm.termui:   setuptools
pdm.termui:   python>=3.11.4,<3.11.5
pdm.termui:   Adding requirement wheel
pdm.termui:   Adding requirement setuptools>=40.8.0
pdm.termui:   Adding requirement setuptools
pdm.termui:   Adding requirement python>=3.11.4,<3.11.5
pdm.termui: ======== Starting round 0 ========
pdm.termui: Pinning: python None
pdm.termui: ======== Ending round 0 ========
pdm.termui: ======== Starting round 1 ========
pdm.termui: Pinning: setuptools 68.0.0
pdm.termui: ======== Ending round 1 ========
pdm.termui: ======== Starting round 2 ========
pdm.termui: Pinning: wheel 0.41.0
pdm.termui: ======== Ending round 2 ========
pdm.termui: ======== Starting round 3 ========
pdm.termui: ======== Resolution Result ========
pdm.termui: Stable pins:
pdm.termui:       python None
pdm.termui:   setuptools 68.0.0
pdm.termui:        wheel 0.41.0
pdm.termui: Installing [email protected]...
unearth.preparer: Using cached <Link https://files.pythonhosted.org/packages/c7/42/be1c7bbdd83e1bfb160c94b9cafd8e25efc7400346cf7ccdbdb452c467fa/setuptools-68.0.0-py3-none-any.whl (from https://pypi.org/simple/setuptools/)>
pdm.termui:   Adding requirement python>=3.11.4,<3.11.5
pdm.termui: ======== Starting round 0 ========
pdm.termui: Pinning: python None
pdm.termui: ======== Ending round 0 ========
pdm.termui: ======== Starting round 1 ========
pdm.termui: Pinning: setuptools 68.0.0
pdm.termui: ======== Ending round 1 ========
pdm.termui: ======== Starting round 2 ========
pdm.termui: Pinning: wheel 0.41.0
pdm.termui: ======== Ending round 2 ========
pdm.termui: ======== Starting round 3 ========
pdm.termui: ======== Resolution Result ========
pdm.termui: Stable pins:
pdm.termui:       python None
pdm.termui:   setuptools 68.0.0
pdm.termui:        wheel 0.41.0
pdm.termui: Installing [email protected]...
unearth.preparer: Using cached <Link https://files.pythonhosted.org/packages/c7/42/be1c7bbdd83e1bfb160c94b9cafd8e25efc7400346cf7ccdbdb452c467fa/setuptools-68.0.0-py3-none-any.whl (from https://pypi.org/simple/setuptools/)>
pdm.termui: Installing [email protected]...
unearth.preparer: Using cached <Link https://files.pythonhosted.org/packages/17/11/f139e25018ea2218aeedbedcf85cd0dd8abeed29a38ac1fda7f5a8889382/wheel-0.41.0-py3-none-any.whl (from https://pypi.org/simple/wheel/)>
pdm.termui: Synchronization complete.
pdm.termui: Installing [email protected]...
unearth.preparer: Using cached <Link https://files.pythonhosted.org/packages/17/11/f139e25018ea2218aeedbedcf85cd0dd8abeed29a38ac1fda7f5a8889382/wheel-0.41.0-py3-none-any.whl (from https://pypi.org/simple/wheel/)>
pdm.termui: Error in sitecustomize; set PYTHONVERBOSE for traceback:
pdm.termui: SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb1 in position 0: invalid start byte (sitecustomize.py, line 13)
  x Install peewee 3.16.2 failed
pdm.termui: Error occurs:
Traceback (most recent call last):
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures\thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\installers\synchronizers.py", line 272, in install_candidate
    self.manager.install(can)
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\installers\manager.py", line 33, in install
    installer(str(prepared.build()), self.environment, prepared.direct_url())
                  ^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\models\candidates.py", line 373, in build
    self.wheel = Path(builder.build(build_dir, metadata_directory=self._metadata_dir))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\builders\wheel.py", line 26, in build
    requires = self._hook.get_requires_for_build_wheel(config_settings)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyproject_hooks\_impl.py", line 166, in get_requires_for_build_wheel
    return self._call_hook('get_requires_for_build_wheel', {
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyproject_hooks\_impl.py", line 321, in _call_hook
    raise BackendUnavailable(data.get('traceback', ''))
pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyproject_hooks\_in_process\_in_process.py", line 77, in _build_backend
    obj = import_module(mod_path)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'setuptools'

pdm.termui: Synchronization complete.
pdm.termui: Error in sitecustomize; set PYTHONVERBOSE for traceback:
pdm.termui: SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb1 in position 0: invalid start byte (sitecustomize.py, line 13)
  x Install wtf-peewee 3.0.4 failed
pdm.termui: Error occurs:
Traceback (most recent call last):
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures\thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\installers\synchronizers.py", line 272, in install_candidate
    self.manager.install(can)
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\installers\manager.py", line 33, in install
    installer(str(prepared.build()), self.environment, prepared.direct_url())
                  ^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\models\candidates.py", line 373, in build
    self.wheel = Path(builder.build(build_dir, metadata_directory=self._metadata_dir))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\builders\wheel.py", line 26, in build
    requires = self._hook.get_requires_for_build_wheel(config_settings)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyproject_hooks\_impl.py", line 166, in get_requires_for_build_wheel
    return self._call_hook('get_requires_for_build_wheel', {
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyproject_hooks\_impl.py", line 321, in _call_hook
    raise BackendUnavailable(data.get('traceback', ''))
pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyproject_hooks\_in_process\_in_process.py", line 77, in _build_backend
    obj = import_module(mod_path)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'setuptools'

Retry failed jobs
pdm.termui: Preparing isolated env for PEP 517 build...
pdm.termui: Preparing isolated env for PEP 517 build...
pdm.termui: Saving wheel to cache: <Link https://files.pythonhosted.org/packages/a9/50/1dd5ea74c559df4afb8391f8d05f0fec685dbe8effba13bb9072901eb288/peewee-3.16.2.tar.gz (from None)>
pdm.termui: Running PEP 517 backend to build a wheel for <Link https://files.pythonhosted.org/packages/a9/50/1dd5ea74c559df4afb8391f8d05f0fec685dbe8effba13bb9072901eb288/peewee-3.16.2.tar.gz (from None)>
pdm.termui: Saving wheel to cache: <Link https://files.pythonhosted.org/packages/9a/9c/1bb1f9fae1a7203122a5a8febe168dec3b6b0291db067d1700df5c480f2c/wtf-peewee-3.0.4.tar.gz (from None)>
pdm.termui: Running PEP 517 backend to build a wheel for <Link https://files.pythonhosted.org/packages/9a/9c/1bb1f9fae1a7203122a5a8febe168dec3b6b0291db067d1700df5c480f2c/wtf-peewee-3.0.4.tar.gz (from None)>
pdm.termui: Error in sitecustomize; set PYTHONVERBOSE for traceback:
pdm.termui: Error in sitecustomize; set PYTHONVERBOSE for traceback:
pdm.termui: SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb1 in position 0: invalid start byte (sitecustomize.py, line 13)
pdm.termui: SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb1 in position 0: invalid start byte (sitecustomize.py, line 13)
  x Install wtf-peewee 3.0.4 failed
  xpdm.termui: Error occurs:
Traceback (most recent call last):
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures\thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\installers\synchronizers.py", line 272, in install_candidate
    self.manager.install(can)
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\installers\manager.py", line 33, in install
    installer(str(prepared.build()), self.environment, prepared.direct_url())
                  ^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\models\candidates.py", line 373, in build
    self.wheel = Path(builder.build(build_dir, metadata_directory=self._metadata_dir))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\builders\wheel.py", line 26, in build
    requires = self._hook.get_requires_for_build_wheel(config_settings)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyproject_hooks\_impl.py", line 166, in get_requires_for_build_wheel
    return self._call_hook('get_requires_for_build_wheel', {
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyproject_hooks\_impl.py", line 321, in _call_hook
    raise BackendUnavailable(data.get('traceback', ''))
pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyproject_hooks\_in_process\_in_process.py", line 77, in _build_backend
    obj = import_module(mod_path)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'setuptools'

 Install peewee 3.16.2 failed
pdm.termui: Error occurs:
Traceback (most recent call last):
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures\thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\installers\synchronizers.py", line 272, in install_candidate
    self.manager.install(can)
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\installers\manager.py", line 33, in install
    installer(str(prepared.build()), self.environment, prepared.direct_url())
                  ^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\models\candidates.py", line 373, in build
    self.wheel = Path(builder.build(build_dir, metadata_directory=self._metadata_dir))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\builders\wheel.py", line 26, in build
    requires = self._hook.get_requires_for_build_wheel(config_settings)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyproject_hooks\_impl.py", line 166, in get_requires_for_build_wheel
    return self._call_hook('get_requires_for_build_wheel', {
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyproject_hooks\_impl.py", line 321, in _call_hook
    raise BackendUnavailable(data.get('traceback', ''))
pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyproject_hooks\_in_process\_in_process.py", line 77, in _build_backend
    obj = import_module(mod_path)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'setuptools'

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Scripts\pdm.exe\__main__.py", line 7, in <module>
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\core.py", line 268, in main
    return Core().main(args)
           ^^^^^^^^^^^^^^^^^
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\core.py", line 192, in main
    raise cast(Exception, err).with_traceback(traceback) from None
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\core.py", line 187, in main
    self.handle(project, options)
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\core.py", line 153, in handle
    command.handle(project, options)
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\cli\commands\install.py", line 86, in handle
    actions.do_sync(
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\cli\actions.py", line 219, in do_sync
    synchronizer.synchronize()
  File "C:\Users\張\AppData\Local\Programs\Python\Python311\Lib\site-packages\pdm\installers\synchronizers.py", line 440, in synchronize
    raise InstallationError("Some package operations are not complete yet")
pdm.exceptions.InstallationError: Some package operations are not complete yet

@frostming
Copy link
Collaborator

frostming commented Jul 27, 2023

Can't reproduce here, you may have messed up your python environment, did you set any PYTHON* environment variable?

@frostming
Copy link
Collaborator

I might know what is happenning, the Chinese characters in path can't be decoded correctly on Windows...

@drunkwcodes
Copy link
Contributor Author

I'm trying running on C:\projects\matty_web, installation are still failing...

@frostming
Copy link
Collaborator

frostming commented Jul 27, 2023

I'm trying running on C:\projects\matty_web, installation are still failing...

That doesn't change anything, the temp path is located under your user directory. FWIW, try setting env var PYTHONIOENCODING=utf8

@drunkwcodes
Copy link
Contributor Author

Not working, I will set up a new user name a try again, thanks.

@drunkwcodes
Copy link
Contributor Author

Hi @frostming,

I'm your fans, and I suggested using pdm to mojo community and received two more pdm users!

modularml/mojo#413

Will you consider porting pdm to mojo?
I volunteered to construct Mojo Package Index website today!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants