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

unable to install #23

Closed
ishandutta2007 opened this issue Jun 6, 2022 · 6 comments
Closed

unable to install #23

ishandutta2007 opened this issue Jun 6, 2022 · 6 comments

Comments

@ishandutta2007
Copy link

pip install python-flint

Collecting python-flint
  Using cached python-flint-0.3.0.tar.gz (109 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 "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\hp\AppData\Local\Temp\pip-install-t78e2ife\python-flint_d406613e5b5443578ec37b8456cf9fce\setup.py", line 12, in <module>
          os.environ['OPT'] = " ".join(flag for flag in opt.split() if flag != '-Wstrict-prototypes')
      AttributeError: 'NoneType' object has no attribute 'split'
      [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.

@Andrew-S-Rosen
Copy link

Andrew-S-Rosen commented Jun 21, 2022

Seconding this on Windows. For Ubuntu, I'm getting

Failed to build python-flint
Installing collected packages: python-flint
  Running setup.py install for python-flint ... error
  error: subprocess-exited-with-error

  × Running setup.py install for python-flint did not run successfully.
  │ exit code: 1
  ╰─> [19 lines of output]
      running install
      /global/homes/r/rosen/software/miniconda/envs/na/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_ext
      skipping 'src/pyflint.c' Cython extension (up-to-date)
      building 'flint' extension
      INFO: C compiler: gcc -pthread -B /global/homes/r/rosen/software/miniconda/envs/na/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /global/homes/r/rosen/software/miniconda/envs/na/include -fPIC -O2 -isystem /global/homes/r/rosen/software/miniconda/envs/na/include -fPIC

      creating build
      creating build/temp.linux-x86_64-cpython-38
      creating build/temp.linux-x86_64-cpython-38/src
      INFO: compile options: '-I/usr/local/include -I/global/homes/r/rosen/software/miniconda/envs/na/include -I/usr/local/include/flint -I/global/homes/r/rosen/software/miniconda/envs/na/include/flint -I/global/homes/r/rosen/software/miniconda/envs/na/include/python3.8 -c'
      INFO: gcc: src/pyflint.c
      src/pyflint.c:697:10: fatal error: flint.h: No such file or directory
       #include "flint.h"
                ^~~~~~~~~
      compilation terminated.
      error: Command "gcc -pthread -B /global/homes/r/rosen/software/miniconda/envs/na/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /global/homes/r/rosen/software/miniconda/envs/na/include -fPIC -O2 -isystem /global/homes/r/rosen/software/miniconda/envs/na/include -fPIC -I/usr/local/include -I/global/homes/r/rosen/software/miniconda/envs/na/include -I/usr/local/include/flint -I/global/homes/r/rosen/software/miniconda/envs/na/include/flint -I/global/homes/r/rosen/software/miniconda/envs/na/include/python3.8 -c src/pyflint.c -o build/temp.linux-x86_64-cpython-38/src/pyflint.o" failed with exit status 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> python-flint

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

@Andrew-S-Rosen
Copy link

Looks like this can be solved if you use the Anaconda build: conda install -c conda-forge python-flint.

@oscarbenjamin
Copy link
Collaborator

For now pip install python-flint is unlikely to work. It will work if:

  1. You have flint and all the other associated C libraries installed and configured with the appropriate paths.
  2. You have a supported C compiler installed.
  3. You have Python plus the dev headers installed.

Unless you go out of your way to set all of that up then pip install will fail. There has been some progress towards making wheels for Linux and OSX but not Windows.

In the meantime it is best to use conda unless you want to build this yourself (which is not actually that difficult on Ubuntu).

@oscarbenjamin
Copy link
Collaborator

I'm going to close this as a duplicate of #1.

@azamatnarzuloyev
Copy link

C:\Users\HOME\AppData\Local\Temp\pip-install-llrq34pb\python-flint_b6b8de5c84a548518c1f121e2940c620\setup.py:7: DeprecationWarning:

    `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
    of the deprecation of `distutils` itself. It will be removed for
    Python >= 3.12. For older Python versions it will remain present.
    It is recommended to use `setuptools < 60.0` for those Python versions.
    For more details, see:
      https://numpy.org/devdocs/reference/distutils_status_migration.html


    from numpy.distutils.system_info import default_include_dirs, default_lib_dirs
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "C:\Users\HOME\AppData\Local\Temp\pip-install-llrq34pb\python-flint_b6b8de5c84a548518c1f121e2940c620\setup.py", line 12, in <module>
      os.environ['OPT'] = " ".join(flag for flag in opt.split() if flag != '-Wstrict-prototypes')
  AttributeError: 'NoneType' object has no attribute 'split'
  [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.

@azamatnarzuloyev
Copy link

I have the same error please help

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

No branches or pull requests

4 participants