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

pip install openbabel failing in windows #2686

Open
X265065 opened this issue Apr 4, 2024 · 2 comments
Open

pip install openbabel failing in windows #2686

X265065 opened this issue Apr 4, 2024 · 2 comments

Comments

@X265065
Copy link

X265065 commented Apr 4, 2024

I am getting below error while installing openbabel using pip. please help.

C:\Users\X265065>pip install openbabel

WARNING: Skipping C:\Users\X265065\AppData\Roaming\Python\Python311\site-packages\pillow-10.2.0.dist-info due to invalid metadata entry 'name'
WARNING: Skipping C:\Users\X265065\AppData\Roaming\Python\Python311\site-packages\pillow-10.2.0.dist-info due to invalid metadata entry 'name'
Collecting openbabel
Using cached openbabel-3.1.1.1.tar.gz (82 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: openbabel
Building wheel for openbabel (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [17 lines of output]
running bdist_wheel
running build
running build_ext
Warning: invalid version number '3.1.1.1'.
Guessing Open Babel location:
- include_dirs: ['C:\Program Files\Python311\include', 'C:\Program Files\Python311\Include', '/usr/local/include/openbabel3']
- library_dirs: ['C:\Program Files\Python311\libs', 'C:\Program Files\Python311', 'C:\Program Files\Python311\PCbuild\amd64', '/usr/local/lib']
building 'openbabel._openbabel' extension
swigging openbabel\openbabel-python.i to openbabel\openbabel-python_wrap.cpp
swig.exe -python -c++ -small -O -templatereduce -naturalvar "-IC:\Program Files\Python311\include" "-IC:\Program Files\Python311\Include" -I/usr/local/include/openbabel3 -o openbabel\openbabel-python_wrap.cpp openbabel\openbabel-python.i
openbabel\openbabel-python.i(246) : Error: Unable to find 'openbabel\babelconfig.h'
C:\Program Files\Python311\include\openbabel\typer.h(66) : Error: CPP #error "OB_EXTERN". Use the -cpperraswarn option to continue swig processing.

  Error: SWIG failed. Is Open Babel installed?
  You may need to manually specify the location of Open Babel include and library directories. For example:
    python setup.py build_ext -I/usr/local/include/openbabel3 -L/usr/local/lib
    python setup.py install
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for openbabel
Running setup.py clean for openbabel
Failed to build openbabel
ERROR: Could not build wheels for openbabel, which is required to install pyproject.toml-based projects
WARNING: Skipping C:\Users\X265065\AppData\Roaming\Python\Python311\site-packages\pillow-10.2.0.dist-info due to invalid metadata entry 'name'
WARNING: Skipping C:\Users\X265065\AppData\Roaming\Python\Python311\site-packages\pillow-10.2.0.dist-info due to invalid metadata entry 'name'
WARNING: Skipping C:\Users\X265065\AppData\Roaming\Python\Python311\site-packages\pillow-10.2.0.dist-info due to invalid metadata entry 'name'

Copy link

welcome bot commented Apr 4, 2024

Thanks for opening your first issue here! Be sure to follow the issue template!

@nbehrnd
Copy link
Contributor

nbehrnd commented Apr 4, 2024

Option a) bypass with openbabel-wheels, or option b) conda. See for instance a comment I added yesterday to #2408.

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

2 participants