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

Add to pypi #170

Closed
kahnvex opened this issue Aug 1, 2017 · 11 comments
Closed

Add to pypi #170

kahnvex opened this issue Aug 1, 2017 · 11 comments
Assignees

Comments

@kahnvex
Copy link

kahnvex commented Aug 1, 2017

Are there any plans to add this project to pypi so others may install it and use it via python with ease?

Willing to help with this.

@mdouze
Copy link
Contributor

mdouze commented Aug 5, 2017

Hi

There are no plans that I know of. The process to add a new install method is that a contributor submits a PR and commits to support it when Faiss is updated, then we integrate it.

@kyamagu
Copy link
Contributor

kyamagu commented Jul 17, 2019

Hi, I have set up CPU-only wheel package at PyPI:

https://pypi.org/project/faiss-cpu/

It seems other unofficial packages also exist:

https://pypi.org/project/faiss/
https://pypi.org/project/faiss-centos/

My packaging scripts are here.
Let me know if there is any plan to officially support pypi distribution.

@kyamagu
Copy link
Contributor

kyamagu commented Jul 24, 2019

I've also made a faiss-gpu wheel package available at PyPI:

pip install faiss-gpu

For anyone wishing to tune the performance, there is a build instruction for source distribution.
https://github.com/kyamagu/faiss-wheels

@DrChrisLevy
Copy link

If we could get an official PYPI package (as an alternative to conda) that would be great. Many developers have existing stacks with docker/pipenv/pip so being able to simply pip install faiss officially would be very nice. I dont want to move everything to conda just b/c I want to add faiss module.

I have a set up with docker and pipfile and everything is installed into the base python on deployment. I tried also getting conda in the Docker file and installing faiss that way, but it always installs it in a miniconda location. I want it to be in /usr/local/lib/python3.6/site-packages/. Not in some mini conda location. I also tried copying files from the miniconda location to the /usr/local/lib/python3.6/site-packages/ location but got some ModuleNotFoundError: No module named '_swigfaiss' errors.

Alternatively, if someone could provide instructions on downloading faiss from official conda but then getting into the base python /usr/local/lib/python3.6/site-packages/, that would be welcomed too.

@OlegSmelov
Copy link

Is there any particular reason you don't want to use the unofficial build? We've been using it for quite some time now without any issues.

@DrChrisLevy
Copy link

@OlegSmelov , yes I have been using the unofficial build for quite some time and it’s great. If the unofficial one keeps being supported then great. I was just thinking more long term and as updates come out etc.

@mdouze
Copy link
Contributor

mdouze commented Mar 12, 2020

At Facebook we do not plan to support pypi. Managing the conda packages for a variety of OS/python version/Cuda versions is already a signifiant workload. However we encourage unofficial ports.

@DrChrisLevy
Copy link

Completely understand. Thanks for the responses. I need to learn more about packaging.

@ucas010
Copy link

ucas010 commented Apr 15, 2020

Hi, I have set up CPU-only wheel package at PyPI:

https://pypi.org/project/faiss-cpu/

It seems other unofficial packages also exist:

https://pypi.org/project/faiss/
https://pypi.org/project/faiss-centos/

My packaging scripts are here.
Let me know if there is any plan to officially support pypi distribution.

hi,
I have tried to install the faiss-cpu,
but lose
the error is down

    running install
    running build
    running build_ext
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\ggca1\AppData\Local\Temp\pip-install-cb170cne\faiss-cpu\setup.py", line 107, in <module>
        ext_modules=[_swigfaiss]
      File "d:\python36\lib\site-packages\setuptools\__init__.py", line 144, in setup
        return distutils.core.setup(**attrs)
      File "d:\python36\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "d:\python36\lib\distutils\dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "d:\python36\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "d:\python36\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "d:\python36\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "d:\python36\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "d:\python36\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "d:\python36\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "d:\python36\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "d:\python36\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "C:\Users\ggca1\AppData\Local\Temp\pip-install-cb170cne\faiss-cpu\setup.py", line 45, in run
        build_ext.run(self)
      File "d:\python36\lib\distutils\command\build_ext.py", line 339, in run
        self.build_extensions()
      File "C:\Users\ggca1\AppData\Local\Temp\pip-install-cb170cne\faiss-cpu\setup.py", line 50, in build_extensions
        self._remove_flag('-Wstrict-prototypes')
      File "C:\Users\ggca1\AppData\Local\Temp\pip-install-cb170cne\faiss-cpu\setup.py", line 58, in _remove_flag
        compiler = self.compiler.compiler
    AttributeError: 'MSVCCompiler' object has no attribute 'compiler'

could you pls help me ?
thx

@cdhx
Copy link

cdhx commented Jul 14, 2020

Hi, I have set up CPU-only wheel package at PyPI:
https://pypi.org/project/faiss-cpu/
It seems other unofficial packages also exist:
https://pypi.org/project/faiss/
https://pypi.org/project/faiss-centos/
My packaging scripts are here.
Let me know if there is any plan to officially support pypi distribution.

hi,
I have tried to install the faiss-cpu,
but lose
the error is down

    running install
    running build
    running build_ext
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\ggca1\AppData\Local\Temp\pip-install-cb170cne\faiss-cpu\setup.py", line 107, in <module>
        ext_modules=[_swigfaiss]
      File "d:\python36\lib\site-packages\setuptools\__init__.py", line 144, in setup
        return distutils.core.setup(**attrs)
      File "d:\python36\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "d:\python36\lib\distutils\dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "d:\python36\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "d:\python36\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "d:\python36\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "d:\python36\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "d:\python36\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "d:\python36\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "d:\python36\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "d:\python36\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "C:\Users\ggca1\AppData\Local\Temp\pip-install-cb170cne\faiss-cpu\setup.py", line 45, in run
        build_ext.run(self)
      File "d:\python36\lib\distutils\command\build_ext.py", line 339, in run
        self.build_extensions()
      File "C:\Users\ggca1\AppData\Local\Temp\pip-install-cb170cne\faiss-cpu\setup.py", line 50, in build_extensions
        self._remove_flag('-Wstrict-prototypes')
      File "C:\Users\ggca1\AppData\Local\Temp\pip-install-cb170cne\faiss-cpu\setup.py", line 58, in _remove_flag
        compiler = self.compiler.compiler
    AttributeError: 'MSVCCompiler' object has no attribute 'compiler'

could you pls help me ?
thx

same error

waitting for help !

@rom1504
Copy link

rom1504 commented Aug 22, 2020

That's simply due to the fact faiss is not supported on windows, try on linux or mac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants