visual-chatgpt icon indicating copy to clipboard operation
visual-chatgpt copied to clipboard

Error:metadata-generation-failed and subprocess-exited-with-error

Open ddzipp opened this issue 1 year ago • 11 comments

Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [33 lines of output] /home/ljy/anaconda3/envs/visgpt/lib/python3.8/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer. warnings.warn( Traceback (most recent call last): File "/home/ljy/anaconda3/envs/visgpt/lib/python3.8/site-packages/setuptools/installer.py", line 82, in fetch_build_egg subprocess.check_call(cmd) File "/home/ljy/anaconda3/envs/visgpt/lib/python3.8/subprocess.py", line 364, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/home/ljy/anaconda3/envs/visgpt/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpsic6dcas', '--quiet', 'torch']' died with <Signals.SIGKILL: 9>.

  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-install-0u3wull2/basicsr_646f01f6bd68467fa57bba661e772014/setup.py", line 147, in <module>
      setup(
    File "/home/ljy/anaconda3/envs/visgpt/lib/python3.8/site-packages/setuptools/__init__.py", line 86, in setup
      _install_setup_requires(attrs)
    File "/home/ljy/anaconda3/envs/visgpt/lib/python3.8/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
      dist.fetch_build_eggs(dist.setup_requires)
    File "/home/ljy/anaconda3/envs/visgpt/lib/python3.8/site-packages/setuptools/dist.py", line 874, in fetch_build_eggs
      resolved_dists = pkg_resources.working_set.resolve(
    File "/home/ljy/anaconda3/envs/visgpt/lib/python3.8/site-packages/pkg_resources/__init__.py", line 789, in resolve
      dist = best[req.key] = env.best_match(
    File "/home/ljy/anaconda3/envs/visgpt/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1075, in best_match
      return self.obtain(req, installer)
    File "/home/ljy/anaconda3/envs/visgpt/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1087, in obtain
      return installer(requirement)
    File "/home/ljy/anaconda3/envs/visgpt/lib/python3.8/site-packages/setuptools/dist.py", line 944, in fetch_build_egg
      return fetch_build_egg(self, req)
    File "/home/ljy/anaconda3/envs/visgpt/lib/python3.8/site-packages/setuptools/installer.py", line 84, in fetch_build_egg
      raise DistutilsError(str(e)) from e
  distutils.errors.DistutilsError: Command '['/home/ljy/anaconda3/envs/visgpt/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpsic6dcas', '--quiet', 'torch']' died with <Signals.SIGKILL: 9>.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

I just follow the requirment.txt in my Linux but this error occurs many times.

ddzipp avatar Mar 12 '23 15:03 ddzipp

I meet the same problem with basicsr. My CPU is AMD 5950X, GPU is RTX3090.

mupanpan avatar Mar 12 '23 15:03 mupanpan

Me too. Have you solved it My CPU is i9-10900x, GPU is RTX2080Ti.

bjw321 avatar Mar 13 '23 02:03 bjw321

Me too. Have you solved it My CPU is i9-10900x, GPU is RTX2080Ti.

This morning, my "pip install basicsr" runs smoothly and suddenly. I don't know why, it might have something to do with the cache or the network.

mupanpan avatar Mar 13 '23 02:03 mupanpan

Guys, I've solved this problem. I got a demo on my Windows(The demo is running slowly because of my CPU). I guess that the requirement.txt must have some problems. After several updates, it works.

ddzipp avatar Mar 14 '23 03:03 ddzipp

I guess that the requirement.txt must have some problems. After several updates, it works.

@ddzipp Hi~, I want to know how do you solve it ?

zhicheng-ning avatar Mar 14 '23 14:03 zhicheng-ning

@zhicheng-ning You might be running out of disk space on your root partition

imoinuddin avatar Mar 16 '23 07:03 imoinuddin

You might be running out of disk space on your root partition

@imoinuddin Here is my complete log after I run pip install -r requirements.txt, I don't think it's the reason of insufficient disk space

Collecting basicsr
  Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/86/41/00a6b000f222f0fa4c6d9e1d6dcc9811a374cabb8abb9d408b77de39648c/basicsr-1.4.2.tar.gz (172 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 172.5/172.5 kB 47.1 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [38 lines of output]
      WARNING: The repository located at mirrors.cloud.aliyuncs.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.cloud.aliyuncs.com'.
      ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
      ERROR: No matching distribution found for torch
      /root/.conda/envs/visgpt/lib/python3.8/site-packages/setuptools/dist.py:770: UserWarning: Usage of dash-separated 'index-url' will not be supported in future versions. Please use the underscore name 'index_url' instead
        warnings.warn(
      /root/.conda/envs/visgpt/lib/python3.8/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      Traceback (most recent call last):
        File "/root/.conda/envs/visgpt/lib/python3.8/site-packages/setuptools/installer.py", line 82, in fetch_build_egg
          subprocess.check_call(cmd)
        File "/root/.conda/envs/visgpt/lib/python3.8/subprocess.py", line 364, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/root/.conda/envs/visgpt/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpm0dujb6y', '--quiet', '--index-url', 'http://mirrors.cloud.aliyuncs.com/pypi/simple/', 'torch']' returned non-zero exit status 1.
      
      The above exception was the direct cause of the following exception:
      
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-0oj_bh0a/basicsr_0fb85d534b404c56880cc42f1dccec1b/setup.py", line 147, in <module>
          setup(
        File "/root/.conda/envs/visgpt/lib/python3.8/site-packages/setuptools/__init__.py", line 86, in setup
          _install_setup_requires(attrs)
        File "/root/.conda/envs/visgpt/lib/python3.8/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "/root/.conda/envs/visgpt/lib/python3.8/site-packages/setuptools/dist.py", line 874, in fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/root/.conda/envs/visgpt/lib/python3.8/site-packages/pkg_resources/__init__.py", line 789, in resolve
          dist = best[req.key] = env.best_match(
        File "/root/.conda/envs/visgpt/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1075, in best_match
          return self.obtain(req, installer)
        File "/root/.conda/envs/visgpt/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1087, in obtain
          return installer(requirement)
        File "/root/.conda/envs/visgpt/lib/python3.8/site-packages/setuptools/dist.py", line 944, in fetch_build_egg
          return fetch_build_egg(self, req)
        File "/root/.conda/envs/visgpt/lib/python3.8/site-packages/setuptools/installer.py", line 84, in fetch_build_egg
          raise DistutilsError(str(e)) from e
      distutils.errors.DistutilsError: Command '['/root/.conda/envs/visgpt/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpm0dujb6y', '--quiet', '--index-url', 'http://mirrors.cloud.aliyuncs.com/pypi/simple/', 'torch']' returned non-zero exit status 1.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
(visgpt) [root@middleware visual-chatgpt]# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        3.8G     0  3.8G   0% /dev
tmpfs           3.8G     0  3.8G   0% /dev/shm
tmpfs           3.8G  868K  3.8G   1% /run
tmpfs           3.8G     0  3.8G   0% /sys/fs/cgroup
/dev/vda1        40G   12G   27G  30% /
tmpfs           768M     0  768M   0% /run/user/0
overlay          40G   12G   27G  30% /var/lib/docker/overlay2/51d425dcce9f47057e224f58c012762ca22718ac7c4268e928412cb6fe82c77c/merged
overlay          40G   12G   27G  30% /var/lib/docker/overlay2/f8f822b9280adb06adcbaa13ca21cb232e49811a1255cd4cf667d672c4c11d48/merged
overlay          40G   12G   27G  30% /var/lib/docker/overlay2/7123a5ab7d0717b6846cf789017330bb4f9f37936c0959a2ccd3b99e4afce9f4/merged
overlay          40G   12G   27G  30% /var/lib/docker/overlay2/2ad4746ea82c3f788344360d2a0680e1b09ee037c01ecb57b928f1e07791b18d/merged
(visgpt) [root@middleware visual-chatgpt]# 

zhicheng-ning avatar Mar 16 '23 07:03 zhicheng-ning

@zhicheng-ning Try downloading the basicsr-1.4.2.tar.gz, extract it by hand and try to install it manually through python setup.py install

It should possibly give you further detail on the nature of the error you're facing (that's how I was able to determine that disk space was the culprit in my case)

imoinuddin avatar Mar 16 '23 07:03 imoinuddin

Try downloading the basicsr-1.4.2.tar.gz, extract it by hand and try to install it manually through python setup.py install

I try do this, but the error maybe

ERROR: Could not find a version that satisfies the requirement torch (from versions: none) ERROR: No matching distribution found for torch

so I execute pip install torch==1.12.1 , then try python setup.py install again, and I get

ERROR: Could not find a version that satisfies the requirement numpy (from versions: none) ERROR: No matching distribution found for numpy

It's frustrating...

(visgpt) [root@middleware basicsr-1.4.2]# ls
basicsr  basicsr.egg-info  LICENSE.txt  MANIFEST.in  PKG-INFO  README.md  requirements.txt  setup.cfg  setup.py  VERSION
(visgpt) [root@middleware basicsr-1.4.2]# python setup.py install
/root/.conda/envs/visgpt/lib/python3.8/site-packages/setuptools/dist.py:770: UserWarning: Usage of dash-separated 'index-url' will not be supported in future versions. Please use the underscore name 'index_url' instead
  warnings.warn(
/root/.conda/envs/visgpt/lib/python3.8/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
  warnings.warn(
WARNING: The repository located at mirrors.cloud.aliyuncs.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.cloud.aliyuncs.com'.
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch
Traceback (most recent call last):
  File "/root/.conda/envs/visgpt/lib/python3.8/site-packages/setuptools/installer.py", line 82, in fetch_build_egg
    subprocess.check_call(cmd)
  File "/root/.conda/envs/visgpt/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/root/.conda/envs/visgpt/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpz6pbikoh', '--quiet', '--index-url', 'http://mirrors.cloud.aliyuncs.com/pypi/simple/', 'torch']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "setup.py", line 147, in <module>
    setup(
  File "/root/.conda/envs/visgpt/lib/python3.8/site-packages/setuptools/__init__.py", line 86, in setup
    _install_setup_requires(attrs)
  File "/root/.conda/envs/visgpt/lib/python3.8/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/root/.conda/envs/visgpt/lib/python3.8/site-packages/setuptools/dist.py", line 874, in fetch_build_eggs
    resolved_dists = pkg_resources.working_set.resolve(
  File "/root/.conda/envs/visgpt/lib/python3.8/site-packages/pkg_resources/__init__.py", line 789, in resolve
    dist = best[req.key] = env.best_match(
  File "/root/.conda/envs/visgpt/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1075, in best_match
    return self.obtain(req, installer)
  File "/root/.conda/envs/visgpt/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1087, in obtain
    return installer(requirement)
  File "/root/.conda/envs/visgpt/lib/python3.8/site-packages/setuptools/dist.py", line 944, in fetch_build_egg
    return fetch_build_egg(self, req)
  File "/root/.conda/envs/visgpt/lib/python3.8/site-packages/setuptools/installer.py", line 84, in fetch_build_egg
    raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['/root/.conda/envs/visgpt/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpz6pbikoh', '--quiet', '--index-url', 'http://mirrors.cloud.aliyuncs.com/pypi/simple/', 'torch']' returned non-zero exit status 1.
(visgpt) [root@middleware basicsr-1.4.2]# 

zhicheng-ning avatar Mar 16 '23 08:03 zhicheng-ning

Successfully solved!Thanks for @imoinuddin about your suggestion:

Try downloading the basicsr-1.4.2.tar.gz, extract it by hand and try to install it manually through python setup.py install

In a nutshell:

  • step1:delete basicsr in requirement.txt
  • step2:pip install -r requirements.txt
  • step3:downloading the basicsr-1.4.2.tar.gz, extract it by hand and try to install it manually through python setup.py install
  • step4:there maybe some error in step3, like No matching distribution found xxx, just use pip install xxx
  • step5:finish!!

The downloaded model file may be very large, so please ensure that your disk space is sufficient!!

image

zhicheng-ning avatar Mar 16 '23 08:03 zhicheng-ning

@zhicheng-ning Glad to be of help !

imoinuddin avatar Mar 16 '23 08:03 imoinuddin

Hi I'm too facing the requirements.txt issue. Can anyone suggest me to rectify it.... Collecting absl-py==0.9.0 Using cached absl-py-0.9.0.tar.gz (104 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [6 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "C:\Users\Lakshmi bala\AppData\Local\Temp\pip-install-yi9x22wf\absl-py_f60b8e9fbb744f00882b132792bdb5bd\setup.py", line 34, in raise RuntimeError('Python version 2.7 or 3.4+ is required.') RuntimeError: Python version 2.7 or 3.4+ is required. [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

Lakshmibala14 avatar May 28 '23 05:05 Lakshmibala14

根据pytorch的版本降级环境中的python版本。比如pytorch==1.6.0 conda create -n envname python=3.6 -y

Downgrade the version of python in the environment according to the version of pytorch. For example pytorch==1.6.0 conda create -n envname python=3.6 -y

bolongliu avatar Jul 04 '23 08:07 bolongliu

also need pip install cython

hotea avatar Aug 25 '23 07:08 hotea

(venv) PS C:\Users\Adarsh Anand Tiwari\PycharmProjects\book-recommendation-system> pip install numpy Collecting numpy Using cached numpy-1.26.0.tar.gz (15.6 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 2 ╰─> [68 lines of output] + C:\Users\Adarsh Anand Tiwari\PycharmProjects\book-recommendation-system\venv\bin\python.exe C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1 r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd\vendored-meson\meson\meson.py setup C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda93 1f3b744579b11b3e44e1624bd C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd.mesonpy-hu5t68a8\build -Dbui ldtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e4 4e1624bd.mesonpy-hu5t68a8\build\meson-python-native-file.ini Traceback (most recent call last): File "C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd\vendored-meson\meson\mesonbuild\mesonmain .py", line 194, in run return options.run_func(options) File "C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd\vendored-meson\meson\mesonbuild\msetup.py ", line 358, in run app.generate() File "C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd\vendored-meson\meson\mesonbuild\msetup.py ", line 183, in generate return self._generate(env, capture, vslite_ctx) File "C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd\vendored-meson\meson\mesonbuild\msetup.py ", line 228, in _generate intr.run() File "C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd\vendored-meson\meson\mesonbuild\interpret er\interpreter.py", line 2997, in run super().run() File "C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd\vendored-meson\meson\mesonbuild\interpret erbase\interpreterbase.py", line 164, in run self.evaluate_codeblock(self.ast, start=1) File "C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd\vendored-meson\meson\mesonbuild\interpret erbase\interpreterbase.py", line 190, in evaluate_codeblock raise e File "C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd\vendored-meson\meson\mesonbuild\interpret erbase\interpreterbase.py", line 182, in evaluate_codeblock self.evaluate_statement(cur) File "C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd\vendored-meson\meson\mesonbuild\interpret erbase\interpreterbase.py", line 198, in evaluate_statement self.assignment(cur) File "C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd\vendored-meson\meson\mesonbuild\interpret erbase\interpreterbase.py", line 635, in assignment value = self.evaluate_statement(node.value) File "C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd\vendored-meson\meson\mesonbuild\interpret erbase\interpreterbase.py", line 200, in evaluate_statement return self.method_call(cur) File "C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd\vendored-meson\meson\mesonbuild\interpret erbase\interpreterbase.py", line 550, in method_call res = obj.method_call(method_name, args, kwargs) File "C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd\vendored-meson\meson\mesonbuild\interpret erbase\baseobjects.py", line 94, in method_call return method(args, kwargs) File "C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd\vendored-meson\meson\mesonbuild\interpret erbase\decorators.py", line 109, in wrapped ret = f(*wrapped_args, **wrapped_kwargs) File "C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd\vendored-meson\meson\mesonbuild\interpret erbase\decorators.py", line 127, in wrapped return f(*wrapped_args, **wrapped_kwargs) File "C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd\vendored-meson\meson\mesonbuild\interpret erbase\decorators.py", line 826, in wrapped return f(*wrapped_args, **wrapped_kwargs) File "C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd\vendored-meson\meson\mesonbuild\interpret erbase\decorators.py", line 64, in wrapped return f(*wrapped_args, **wrapped_kwargs) File "C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd\vendored-meson\meson\mesonbuild\modules\p ython.py", line 204, in dependency_method dep = self._dependency_method_impl(kwargs) File "C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd\vendored-meson\meson\mesonbuild\modules\p ython.py", line 189, in _dependency_method_impl dep = find_external_dependency('python', self.interpreter.environment, new_kwargs, candidates) File "C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd\vendored-meson\meson\mesonbuild\dependenc ies\detect.py", line 124, in find_external_dependency d = c() File "C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd\vendored-meson\meson\mesonbuild\dependenc ies\python.py", line 216, in init if mesonlib.is_windows() and self.get_windows_python_arch().endswith('64') and mesonlib.version_compare(self.version, '<3.12'): AttributeError: 'NoneType' object has no attribute 'endswith' The Meson build system Version: 1.2.99 Source dir: C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd Build dir: C:\Users\Adarsh Anand Tiwari\AppData\Local\Temp\pip-install-1g1r3_3f\numpy_90eda931f3b744579b11b3e44e1624bd.mesonpy-hu5t68a8\build Build type: native build Project name: NumPy Project version: 1.26.0 C compiler for the host machine: cc (gcc 12.2.0 "cc (Rev1, Built by MSYS2 project) 12.2.0") C linker for the host machine: cc ld.bfd 2.39 C++ compiler for the host machine: c++ (gcc 12.2.0 "c++ (Rev1, Built by MSYS2 project) 12.2.0") C++ linker for the host machine: c++ ld.bfd 2.39 Cython compiler for the host machine: cython (cython 3.0.3) Host machine cpu family: x86_64 Host machine cpu: x86_64 Program python found: YES (C:\Users\Adarsh Anand Tiwari\PycharmProjects\book-recommendation-system\venv\bin\python.exe) Did not find pkg-config by name 'pkg-config' Found Pkg-config: NO Unknown Windows Python platform 'mingw_x86_64' Unknown Windows Python platform 'mingw_x86_64'

  ..\..\meson.build:43:12: ERROR: Unhandled python exception
 
      This is a Meson bug and should be reported!
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.

Can someone help with this. I have been facing this since last two to three weeks but didn't got to right solution.

AdarshhTiwarii avatar Oct 09 '23 22:10 AdarshhTiwarii