kyamagu / faiss-wheels

Unofficial faiss wheel builder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running setup.py install for faiss-gpu did not run successfully

dazzafact opened this issue · comments

Describe the bug
Running setup.py install for faiss-gpu did not run successfully
cuda_11.7
But CPU Versions works!

(env) PS C:\Server\htdocs\ml2> pip install faiss-gpu
  Downloading faiss-gpu-1.6.4.post2.tar.gz (25 kB)
  Preparing metadata (setup.py) ... done
  WARNING: Generating metadata for package faiss-gpu produced metadata for project name faiss-cpu. Fix your #egg=faiss-gpu fragments.
Discarding https://files.pythonhosted.org/packages/7d/00/b3aaad408a44e4f5d87ebfcd75d0b14eeaed9fe9bc7a9f5e185ff1d503d6/faiss-gpu-1.6.4.post2.tar.gz (from https://pypi.org/simple/faiss-gpu/): Requested faiss-cpu from https://files.pythonhosted.org/packages/7d/00/b3aaad408a44e4f5d87ebfcd75d0b14eeaed9fe9bc7a9f5e185ff1d503d6/faiss-gpu-1.6.4.post2.tar.gz has inconsistent name: expected 'faiss-gpu', but metadata has 'faiss-cpu'
  Downloading faiss-gpu-1.6.4.tar.gz (3.4 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [7 lines of output]
      running egg_info
      creating C:\Users\szcze\AppData\Local\Temp\pip-pip-egg-info-k360kexh\faiss_cpu.egg-info
      writing C:\Users\szcze\AppData\Local\Temp\pip-pip-egg-info-k360kexh\faiss_cpu.egg-info\PKG-INFO
      writing dependency_links to C:\Users\szcze\AppData\Local\Temp\pip-pip-egg-info-k360kexh\faiss_cpu.egg-info\dependency_links.txt
      writing top-level names to C:\Users\szcze\AppData\Local\Temp\pip-pip-egg-info-k360kexh\faiss_cpu.egg-info\top_level.txt
      writing manifest file 'C:\Users\szcze\AppData\Local\Temp\pip-pip-egg-info-k360kexh\faiss_cpu.egg-info\SOURCES.txt'
      error: package directory 'C:\Users\szcze\AppData\Local\Temp\pip-install-8jg13zcy\faiss-gpu_62ba4c34a62d4ef6981c53e51f8b7158\faiss\faiss\python' does not exist
      [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.

To Reproduce
I am using Windows 10 and Python 3.8.10 (venv)
cuda_11.7.r11.7/compiler.31442593_0

(env) PS C:\Server\htdocs\ml2> pip install faiss-gpu

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

Desktop (please complete the following information):

  • OS: Win 10
  • Architecture: [e.g. x86_64, arm64]
  • Python: 3.8
  • Version:3.8.2

Additional context
Add any other context about the problem here.

Okay, I just set up a new environment in Python. However, instead, I'm now getting this error:


 Running setup.py install for faiss-gpu ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Server\htdocs\ml2\env2\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\*******\\AppData\\Local\\Temp\\pip-install-et4c1oir\\faiss-gpu_c74984804194431eb8aa02a465fe9ceb\\setup.py'"'"'; __file__='"'"'C:\\Users\\*******\\AppData\\Local\\Temp\\pip-install-et4c1oir\\faiss-gpu_c74984804194431eb8aa02a465fe9ceb\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\*******\AppData\Local\Temp\pip-record-z05s3lta\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Server\htdocs\ml2\env2\include\site\python3.10\faiss-gpu'
         cwd: C:\Users\*******\AppData\Local\Temp\pip-install-et4c1oir\faiss-gpu_c74984804194431eb8aa02a465fe9ceb\
    Complete output (38 lines):
    running install
    running build
    running build_ext
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\*******\AppData\Local\Temp\pip-install-et4c1oir\faiss-gpu_c74984804194431eb8aa02a465fe9ceb\setup.py", line 91, in <module>
        setup(
      File "C:\Server\htdocs\ml2\env2\lib\site-packages\setuptools\__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "C:\Program Files\Python310\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "C:\Program Files\Python310\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "C:\Program Files\Python310\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Server\htdocs\ml2\env2\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "C:\Program Files\Python310\lib\distutils\command\install.py", line 568, in run
        self.run_command('build')
      File "C:\Program Files\Python310\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Program Files\Python310\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Program Files\Python310\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "C:\Program Files\Python310\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Program Files\Python310\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\*******\AppData\Local\Temp\pip-install-et4c1oir\faiss-gpu_c74984804194431eb8aa02a465fe9ceb\setup.py", line 45, in run
        build_ext.run(self)
      File "C:\Program Files\Python310\lib\distutils\command\build_ext.py", line 340, in run
        self.build_extensions()
      File "C:\Users\*******\AppData\Local\Temp\pip-install-et4c1oir\faiss-gpu_c74984804194431eb8aa02a465fe9ceb\setup.py", line 50, in build_extensions
        self._remove_flag('-Wstrict-prototypes')
      File "C:\Users\*******\AppData\Local\Temp\pip-install-et4c1oir\faiss-gpu_c74984804194431eb8aa02a465fe9ceb\setup.py", line 58, in _remove_flag
        compiler = self.compiler.compiler
    AttributeError: 'MSVCCompiler' object has no attribute 'compiler'. Did you mean: 'compile'?
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Server\htdocs\ml2\env2\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\*******\\AppData\\Local\\Temp\\pip-install-et4c1oir\\faiss-gpu_c74984804194431eb8aa02a465fe9ceb\\setup.py'"'"'; __file__='"'"'C:\\Users\\*******\\AppData\\Local\\Temp\\pip-install-et4c1oir\\faiss-gpu_c74984804194431eb8aa02a465fe9ceb\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\*******\AppData\Local\Temp\pip-record-z05s3lta\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Server\htdocs\ml2\env2\include\site\python3.10\faiss-gpu' Check the logs for full command output.

We do not support faiss-gpu for windows.