Installing OpenEXR for python causes setuptools to fail with an assertion error
I am trying to install a package that adds OpenEXR bindings to python:
However, when I run setuptools by executing pip install . in the project directory, I get a strange error that seems like the result of an internal typo in python's core packages:
installing to build/bdist.linux-x86_64/wheel running install running install_lib creating build/bdist.linux-x86_64 creating build/bdist.linux-x86_64/wheel copying build/lib.linux-x86_64-3.7/OpenEXR.cpython-@PYVERNODOTS@m-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/wheel copying build/lib.linux-x86_64-3.7/Imath.py -> build/bdist.linux-x86_64/wheel running install_egg_info running egg_info creating OpenEXR.egg-info writing OpenEXR.egg-info/PKG-INFO writing dependency_links to OpenEXR.egg-info/dependency_links.txt writing top-level names to OpenEXR.egg-info/top_level.txt writing manifest file 'OpenEXR.egg-info/SOURCES.txt' reading manifest file 'OpenEXR.egg-info/SOURCES.txt' writing manifest file 'OpenEXR.egg-info/SOURCES.txt' Copying OpenEXR.egg-info to build/bdist.linux-x86_64/wheel/OpenEXR-1.3.2-py3.7.egg-info running install_scripts Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-req-build-rsemsxrd/setup.py", line 25, in <module> py_modules=['Imath'], File "/home/james/anaconda3/envs/exrtest/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/home/james/anaconda3/envs/exrtest/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/home/james/anaconda3/envs/exrtest/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/home/james/anaconda3/envs/exrtest/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 230, in run impl_tag, abi_tag, plat_tag = self.get_tag() File "/home/james/anaconda3/envs/exrtest/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 179, in get_tag assert tag == supported_tags[0], "%s != %s" % (tag, supported_tags[0]) AssertionError: ('cp37', 'cp@pyvernodots@m', 'linux_x86_64') != ('cp37', 'cp@PYVERNODOTS@m', 'linux_x86_64') ---------------------------------------- ERROR: Failed building wheel for OpenEXRAs you can see, the cause is an assertion error which is checking that two sets of tags match, which fails because the two strings being compared are 'cp@pyvernodots@m' and 'cp@PYVERNODOTS@m'. Clearly the two strings are supposed to be equivalent, but due to a mistake one of them has the wrong capitalization. I don't know enough about the internals of python's package management system to understand where these strings are determined and how I might fix them. The only related resource I could find was this document about compatibility tags, which are evidently the tags causing this malfunction: .
My version of python is 3.7.4, installed with anaconda, and this is being done in a fresh environment.
1 Answer
I ran into this problem installing completely different packages. This seems to be an issue with the python distribution. I had problems with the python 3.7.4 installed by conda. Creating an environment using python 3.7.3 instead fixed my issue. You can do this with:
conda create -n myenv python=3.7.3
Edit: As @frmdstryr pointed out in the comments, this is now fixed. Downgrading should now longer be necessary. See the comments for a link to the (now closed) github issue.
2