envycontrol icon indicating copy to clipboard operation
envycontrol copied to clipboard

No package metadata was found for envycontrol __init__.py line 563, in from_name

Open gavr123456789 opened this issue 1 year ago • 9 comments

Describe the bug Any command with envycontrol produces error

To Reproduce Steps to reproduce the behavior:

  1. Run envycontrol --query
  2. See error:
> envycontrol --query
Traceback (most recent call last):
  File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 563, in from_name
    return next(cls.discover(name=name))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/envycontrol", line 33, in <module>
    sys.exit(load_entry_point('envycontrol==3.2.0', 'console_scripts', 'envycontrol')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/envycontrol", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 981, in distribution
    return Distribution.from_name(distribution_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 565, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for envycontrol

Expected behavior A clear and concise description of what you expected to happen.

System Information:

  • Distro: Arch
  • Kernel: Linux 6.3.1
  • DE/WM and Display Manager (if applicable): Gnome 42 with GDM]
  • EnvyControl version: 3.2.0-2
  • Nvidia driver version: 530.41.03
  • lspci output:
00:00.0 Host bridge: Intel Corporation 12th Gen Core Processor Host Bridge/DRAM Registers (rev 02)
00:01.0 PCI bridge: Intel Corporation 12th Gen Core Processor PCI Express x16 Controller #1 (rev 02)
00:02.0 VGA compatible controller: Intel Corporation Alder Lake-P Integrated Graphics Controller (rev 0c)
00:04.0 Signal processing controller: Intel Corporation Alder Lake Innovation Platform Framework Processor Participant (rev 02)
00:06.0 PCI bridge: Intel Corporation 12th Gen Core Processor PCI Express x4 Controller #0 (rev 02)
00:07.0 PCI bridge: Intel Corporation Alder Lake-P Thunderbolt 4 PCI Express Root Port #0 (rev 02)
00:07.1 PCI bridge: Intel Corporation Alder Lake-P Thunderbolt 4 PCI Express Root Port #1 (rev 02)
00:08.0 System peripheral: Intel Corporation 12th Gen Core Processor Gaussian & Neural Accelerator (rev 02)
00:0d.0 USB controller: Intel Corporation Alder Lake-P Thunderbolt 4 USB Controller (rev 02)
00:0d.2 USB controller: Intel Corporation Alder Lake-P Thunderbolt 4 NHI #0 (rev 02)
00:12.0 Serial controller: Intel Corporation Alder Lake-P Integrated Sensor Hub (rev 01)
00:14.0 USB controller: Intel Corporation Alder Lake PCH USB 3.2 xHCI Host Controller (rev 01)
00:14.2 RAM memory: Intel Corporation Alder Lake PCH Shared SRAM (rev 01)
00:14.3 Network controller: Intel Corporation Alder Lake-P PCH CNVi WiFi (rev 01)
00:15.0 Serial bus controller: Intel Corporation Alder Lake PCH Serial IO I2C Controller #0 (rev 01)
00:15.1 Serial bus controller: Intel Corporation Alder Lake PCH Serial IO I2C Controller #1 (rev 01)
00:16.0 Communication controller: Intel Corporation Alder Lake PCH HECI Controller (rev 01)
00:16.3 Serial controller: Intel Corporation Alder Lake AMT SOL Redirection (rev 01)
00:1c.0 PCI bridge: Intel Corporation Device 51bb (rev 01)
00:1f.0 ISA bridge: Intel Corporation Alder Lake PCH eSPI Controller (rev 01)
00:1f.3 Audio device: Intel Corporation Alder Lake PCH-P High Definition Audio Controller (rev 01)
00:1f.4 SMBus: Intel Corporation Alder Lake PCH-P SMBus Host Controller (rev 01)
00:1f.5 Serial bus controller: Intel Corporation Alder Lake-P PCH SPI Controller (rev 01)
01:00.0 3D controller: NVIDIA Corporation GA107GLM [RTX A2000 8GB Laptop GPU] (rev a1)
02:00.0 Non-Volatile memory controller: SK hynix Platinum P41 NVMe Solid State Drive 2TB
a5:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5260 PCI Express Card Reader (rev 01)

gavr123456789 avatar May 20 '23 10:05 gavr123456789

You need to reinstall/rebuild all your AUR Python package after a major version change, not a problem with EnvyControl

On Sat, May 20, 2023, 05:52 gavr123456789 @.***> wrote:

Describe the bug Any command with envycontrol produces error

To Reproduce Steps to reproduce the behavior:

  1. Run envycontrol --query
  2. See error:

envycontrol --query Traceback (most recent call last): File "/usr/lib/python3.11/importlib/metadata/init.py", line 563, in from_name return next(cls.discover(name=name)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/bin/envycontrol", line 33, in sys.exit(load_entry_point('envycontrol==3.2.0', 'console_scripts', 'envycontrol')()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/bin/envycontrol", line 22, in importlib_load_entry_point for entry_point in distribution(dist_name).entry_points ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/importlib/metadata/init.py", line 981, in distribution return Distribution.from_name(distribution_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/importlib/metadata/init.py", line 565, in from_name raise PackageNotFoundError(name) importlib.metadata.PackageNotFoundError: No package metadata was found for envycontrol

Expected behavior A clear and concise description of what you expected to happen.

System Information:

  • Distro: Arch
  • Kernel: Linux 6.3.1
  • DE/WM and Display Manager (if applicable): Gnome 42 with GDM]
  • EnvyControl version: 3.2.0-2
  • Nvidia driver version: 530.41.03
  • lspci output:

00:00.0 Host bridge: Intel Corporation 12th Gen Core Processor Host Bridge/DRAM Registers (rev 02) 00:01.0 PCI bridge: Intel Corporation 12th Gen Core Processor PCI Express x16 Controller #1 (rev 02) 00:02.0 VGA compatible controller: Intel Corporation Alder Lake-P Integrated Graphics Controller (rev 0c) 00:04.0 Signal processing controller: Intel Corporation Alder Lake Innovation Platform Framework Processor Participant (rev 02) 00:06.0 PCI bridge: Intel Corporation 12th Gen Core Processor PCI Express x4 Controller #0 (rev 02) 00:07.0 PCI bridge: Intel Corporation Alder Lake-P Thunderbolt 4 PCI Express Root Port #0 (rev 02) 00:07.1 PCI bridge: Intel Corporation Alder Lake-P Thunderbolt 4 PCI Express Root Port #1 (rev 02) 00:08.0 System peripheral: Intel Corporation 12th Gen Core Processor Gaussian & Neural Accelerator (rev 02) 00:0d.0 USB controller: Intel Corporation Alder Lake-P Thunderbolt 4 USB Controller (rev 02) 00:0d.2 USB controller: Intel Corporation Alder Lake-P Thunderbolt 4 NHI #0 (rev 02) 00:12.0 Serial controller: Intel Corporation Alder Lake-P Integrated Sensor Hub (rev 01) 00:14.0 USB controller: Intel Corporation Alder Lake PCH USB 3.2 xHCI Host Controller (rev 01) 00:14.2 RAM memory: Intel Corporation Alder Lake PCH Shared SRAM (rev 01) 00:14.3 Network controller: Intel Corporation Alder Lake-P PCH CNVi WiFi (rev 01) 00:15.0 Serial bus controller: Intel Corporation Alder Lake PCH Serial IO I2C Controller #0 (rev 01) 00:15.1 Serial bus controller: Intel Corporation Alder Lake PCH Serial IO I2C Controller #1 (rev 01) 00:16.0 Communication controller: Intel Corporation Alder Lake PCH HECI Controller (rev 01) 00:16.3 Serial controller: Intel Corporation Alder Lake AMT SOL Redirection (rev 01) 00:1c.0 PCI bridge: Intel Corporation Device 51bb (rev 01) 00:1f.0 ISA bridge: Intel Corporation Alder Lake PCH eSPI Controller (rev 01) 00:1f.3 Audio device: Intel Corporation Alder Lake PCH-P High Definition Audio Controller (rev 01) 00:1f.4 SMBus: Intel Corporation Alder Lake PCH-P SMBus Host Controller (rev 01) 00:1f.5 Serial bus controller: Intel Corporation Alder Lake-P PCH SPI Controller (rev 01) 01:00.0 3D controller: NVIDIA Corporation GA107GLM [RTX A2000 8GB Laptop GPU] (rev a1) 02:00.0 Non-Volatile memory controller: SK hynix Platinum P41 NVMe Solid State Drive 2TB a5:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5260 PCI Express Card Reader (rev 01)

— Reply to this email directly, view it on GitHub https://github.com/bayasdev/envycontrol/issues/107, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALY7IYLV7MUGO527LJ5X7FDXHCO6ZANCNFSM6AAAAAAYIVFWGQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

bayasdev avatar May 20 '23 13:05 bayasdev

Same problem here also tried to rebuild

pacman -Qoq /usr/lib/python3.11 | yay -S - --rebuild

Hovewer I keep getting the same error as author reported


Temp Fix

My temp fix is to revert to 3.1.0, look for the hash of that commitin the AUR. download it as package, extract it, cd in the folder you just extracted and run makepkg -si to install the specific version

zepvalue avatar May 22 '23 12:05 zepvalue

Remove and reinstall the envycontrol package

On Mon, May 22, 2023, 07:12 Zep @.***> wrote:

Same problem here also tried to rebuild

pacman -Qoq /usr/lib/python3.11 | yay -S - --rebuild -y

Hovewer I keep getting the same error

— Reply to this email directly, view it on GitHub https://github.com/bayasdev/envycontrol/issues/107#issuecomment-1557112061, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALY7IYI43XHBJRQXJ3XRC6TXHNJ2PANCNFSM6AAAAAAYIVFWGQ . You are receiving this because you commented.Message ID: @.***>

bayasdev avatar May 22 '23 23:05 bayasdev

Can confirm the problem.
Works when downgrading to 3.1.0, rebuild does not fix the issue.

Curve avatar May 30 '23 19:05 Curve

found a solution. updating python packages works. i used this code:

yay -S $(pacman -Qoq /usr/lib/python3.10) --answerclean All

chirstopher-msa avatar Jun 16 '23 17:06 chirstopher-msa

I have tried several solutions but it still doesn't work:

➜ envycontrol --query
Traceback (most recent call last):
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 563, in from_name
return next(cls.discover(name=name))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/bin/envycontrol", line 33, in <module>
sys.exit(load_entry_point('envycontrol==3.2.0', 'console_scripts', 'envycontrol')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/bin/envycontrol", line 22, in importlib_load_entry_point
for entry_point in distribution(dist_name).entry_points
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 981, in distribution
return Distribution.from_name(distribution_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 565, in from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for envycontrol

Has anyone found a working solution?

carmilso avatar Jul 10 '23 08:07 carmilso

If you are not gonna switch the mode frequently, you may run the python script directly:

  1. git clone https://github.com/bayasdev/envycontrol.git
  2. python ./envycontrol.py --query or sudo python ./envycontrol.py -s <MODE>

For install it as a package, you may use pipx:

  1. sudo pipx install .
  2. sudo /root/.local/bin/envycontrol --query

Then you can put alias in your .bashrc or .zshrc:

  1. alias envycontrol="sudo /root/.local/bin/envycontrol"
  2. envycontrol --query

wickes1 avatar Jul 27 '23 21:07 wickes1

On Archlinux,

yay -Rs envycontrol 
yay -Syyu envycontrol 

worked for me.

elyurn avatar Aug 31 '23 21:08 elyurn

On Archlinux,

yay -Rs envycontrol 
yay -Syyu envycontrol 

worked for me.

Yes, that works. The problem comes when you try to run it after the installation

carmilso avatar Sep 04 '23 11:09 carmilso