That tar file does not appear to include the python module at all.  (Nothing 
would end in .py, but you should see something like 
"lib/python3.7/site-packages/OpenImageIO.so") 

I'm not adept at Anaconda, so I'm not sure whether or not its environment would 
properly see if you installed it through homebrew? Or could you just build it 
from source in the Anaconda environment?

I'm not sure who maintains that conda distribution, but maybe one solution is 
to just fix it? You can see the problem here:
        
https://github.com/conda-forge/openimageio-feedstock/blob/master/recipe/build.sh
 
<https://github.com/conda-forge/openimageio-feedstock/blob/master/recipe/build.sh>
They seem to explicitly disable the python bindings (and also the command line 
utilities, ick, which is the main thing that many sites use).

In fact, this has already been noted as the sole issue every filed against the 
conda/openimageio-feedstock: 
https://github.com/conda-forge/openimageio-feedstock/issues/6 
<https://github.com/conda-forge/openimageio-feedstock/issues/6>

Maybe somebody here is knowledgeable enough about Conda to fix this and submit 
a PR?

        -- lg


> On Apr 2, 2020, at 9:48 AM, Andrew G <aquamu...@gmail.com> wrote:
> 
> Hi all,
> 
> I'm an OIIO newbie trying to install the package for the first time, to use 
> with Python in an Anaconda environment on a Mac. Python simply never finds 
> the package. I'm using an iMac running macOS 10.14.6 (Mojave). I want to 
> install this into a fresh conda environment running Python 3.8. Here's what 
> I've tried so far, starting after using conda to activate the environment 
> "workenv".
> 
> Using the commands at https://anaconda.org/conda-forge/openimageio 
> <https://anaconda.org/conda-forge/openimageio> (both commands produce the 
> same results), it downloaded openimageio-2.1.10-hdd4dd59_1.tar.bz2, and then 
> placed that file into /Users/Andrew/opt/anaconda3/pkgs (/Users/Andrew is my 
> home directory), where it also uncompressed it into a folder named 
> openimageio-2.1.10-hdd4dd59_1. This seems reasonable, as there are lots of 
> other, familiar packages there that import without error. But for this 
> package, my import fails:
> 
> >>> import OpenImageIO
> ModuleNotFoundError: No module named 'OpenImageIO'
> 
> Following the advice in Section 11.1 of the documentation, I added the path 
> above to my PYTHONENV (which previously had nothing in it), and restarted 
> Python, but the import still failed. From Python I looked at sys.path and 
> found four entries:
> 
> /Users/Andrew/opt/anaconda3/envs/workenv/lib/python38.zip
> /Users/Andrew/opt/anaconda3/envs/workenv/lib/python3.8
> /Users/Andrew/opt/anaconda3/envs/workenv/lib/python3.8/lib-dynload
> /Users/Andrew/opt/anaconda3/envs/workenv/lib/python3.8/site-packages
> 
> I added the folder /Users/Andrew/opt/anaconda3/pkgs to my sys.path, and then 
> imported, but it still couldn't find the module.
> 
> I then copied the openimageio-2.1.10-hdd4dd59_1 folder into the fourth 
> directory in the list above, since there are lots of other packages already 
> present, and I'm sure Python is already looking there. But still, when I 
> import OIIO, Python reports ModuleNotFoundError.
> 
> I thought maybe I needed to point more specifically to a subfolder with 
> Python bindings, but a search through openimageio-2.1.10-hdd4dd59_1 reveals 
> nothing that ends in .py, so I don't know what else I might point at.
> 
> I've run out of ideas. Can I install OIIO on my Mac in a way that the package 
> will be found by Python when inside an anaconda virtual environment? If so, 
> can anyone please point out what I need to do to get up and running?
> 
> Thank you!
> 
> -Andrew
> _______________________________________________
> Oiio-dev mailing list
> Oiio-dev@lists.openimageio.org
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

--
Larry Gritz
l...@larrygritz.com




_______________________________________________
Oiio-dev mailing list
Oiio-dev@lists.openimageio.org
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to