-
Notifications
You must be signed in to change notification settings - Fork 289
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
Can't install with pip (on windows, in blender) #667
Comments
Python 2.7 + VS2019 + cmake 3.13 fails as well. Omitting lots of errors, here's the first problem.
|
#669 fixes the issue for me. |
@tin2tin can you try the latest build? We think we may have addressed this. If it looks good for you I can cut a 0.12.1 release. |
I'm sorry. I'm still getting errors:
|
According to this message - C:/Users/user/Documents/build_windows_x64_vc16_Release/bin/Release/2.83/python/bin/python.exe (found version "3.7.4") It seems that you have both python 2.83 and 3.7.4 installed, and the build system can't tell them apart. According to this message - C:\Users\user\Documents\build_windows_x64_vc16_Release\bin\Release\2.83\python\lib\subprocess.py you are running the build under python 2.83. This means cmake is detecting a mismatched python, and we probably need to add some code to our build system to ensure that cmake finds the python being run, not the python it prefers because cmake previously encountered python 3 and prefers it. BTW, are you intending to build for Python 2 or Python 3? As far as I can tell, if you set your path to prefer Python 3, then the build will probably succeed because CMake will then be matched. |
Ah :) The coincidence of version numbers is confusing, and Python is 2.8.x not 2.8x... I'll try to reproduce your specific case of installation into the Blender python environment. |
I installed a fresh copy of Blender using their installer, but it doesn't actually include the Python development environment. It would need the Python include directory and libs directory, but those aren't part of the installation. @tin2tin I wonder if it's possible to reach out to the Blender team for advice, and continue the conversation here with them? I'd like to help if possible, but I don't have a Blender development environment set up here, so I can't reproduce what you've got. |
This is the answer I got: "AFAIK that's not going to be possible with regular Blender releases, unless we bundle Visual Studio with Windows builds, or XCode with macOS builds." |
As far as I understand how blender is distributed, and how pip works, that response makes sense. Is it possible for you to set up a Blender build yourself in order to have full control over your build environment? If OTIO were to be integrated as part of a stock distribution of Blender, I guess it will ultimately be necessary to have a full Blender build. A second possibility is to discover which version of Python is built into Blender, and to pip install into your own installation of that version of blender, then copy the OTIO installation into Blender's local script directory. This wouldn't be great for distribution to end users... |
This is something that might be solved using prebuilt wheels (see #666). I took a quick crack at trying to make prebuilt wheels on a Windows AWS instance but hit an issue where one wheel didn't quite look correct. This needs more troubleshooting than I quite have time to invest in right now (Windows building is a bit of a foreign environment to me). @tin2tin is your blender install running python 3.7 64-bit? That specific wheel looked correct to me but I don't have a great way to test. I could try uploading it if you'd like to try it. |
@reinecke ---- the wheel is ALMOST good! Can you modify the installation so that opentimelineio.dll and opentime.dll install into C:\path-to\site-packages\opentimelineio instead of C:\path-to\site-packages\opentimelineio\cxx-libs\bin ? Setting up that relative path for python to find the dlls is a world of peril, and disallowed under Python 3.8 without adding explicit pathing code. Better to just avoid the complicatinos. |
This part may be a little more in @ssteinbach's wheelhouse. Here is where it's setting that: but it's using the PREFIX to do it, so I could move it up to |
We should remove cxx-libs from the join below, and for windows, don't use "bin" as a target, I think "." in quotes is correct. I'm on another task for a few hours, but if you wanna have a go....: else:
if "--user" in sys.argv:
cxxLibDir = os.path.abspath(
os.path.join(_ctx.install_usersite, "opentimelineio", "cxx-libs") <--- remove cxx-libs
)
else:
cxxLibDir = os.path.abspath(
os.path.join(get_python_lib(), "opentimelineio", "cxx-libs") <--- remove cxx-libs
)
cmake_args += ['-DCMAKE_INSTALL_PREFIX=' + cxxLibDir,
'-DOTIO_CXX_NOINSTALL:BOOL=ON'] and here
|
For those interested, here is a script to generate the wheel on windows with the dlls moved at the correct location: https://gist.github.com/Celeborn2BeAlive/f6a475e863726d767a6a0669c692e90e (shell script that I run with git bash) |
Unfortunately, the work on the wheel doesn't solve installing otio into the Bender python folder. Blender is run as admin and Cmake is installed - Windows 10:
|
@tin2tin You are not installing the wheel here, you are installing Try with this pre-built wheel (otio v0.13.0): https://drive.google.com/file/d/1W74dDldQ1Y3SsdrWeWa2s6BNipKT4nSu/view?usp=sharing Once downloaded in
|
Thank you for sharing this. Sounds like it is just a matter of making it avalible for Windows users too on pypi? That would be so great! Unfortunately, I'm getting an "This app can't run on your pc" error, but I guess it is because I'm on Intel and it is an AMD build? Oh, it says the same thing when just running python - I'm on a new computer - I'll need to investigate. The python dll file in the Blender install was damaged - 0k. Installing the wheel in a different Blender installation worked:
|
@Celeborn2BeAlive Is it possible for you to upload it to pypi? I know it is not the latest version, but it is still better than just getting an error, when trying to install as described in the otio readme. Is otioview working in your wheel? From a command line I try |
@tin2tin I don't have upload rights to do that, but @ssteinbach could do it I guess |
Not sure if this ticket is the right place for this, but I noticed when doing
The resulting .whl was only ~500KB and does not contain any .dll's so I'm pretty sure it's incomplete. (Was the PR #853 to fix this?) |
The conversation is underway in the PR meant to fix these issues: #957 |
Any updates on this issue? It also doesn't install on Linux, using |
@lgmventura Would you mind trying this command to install our new test wheels (from issue #1015): We've been working to improve the availability of pre-built wheels which addresses build issues for a lot of users. Please let us know if this works for you. |
@reinecke it works! Thank you so much. |
@lgmventura Good to hear! This is how our official builds in pypi will be set up for 0.14.0 when we release. |
Hi @lgmventura, thanks for taking some time to test the wheels! For posterity, can you tell us which platforms and python versions you tested on please? |
Hi @JeanChristopheMorinPerso, sure! |
Thanks for the info. FYI we don't compile wheels for Python 3.9 yet, which means that you basically didn't use wheels and so OTIO was compiled on your computer when you called |
Python headers will be included into Blender's build: https://developer.blender.org/D12228 |
@meshula An update including the win wheel is still missing from pypi.org? |
Thanks for noticing that. We have issues being automatically closed if a PR mentions them. Probably an undesirable feature... The good news is we have the ability to make wheels as of yesterday, thanks @JeanChristopheMorinPerso, but we haven't published any yet. |
I think this will happen once we make a new release, we typically don't put the head revision on pypi. |
Next steps are (if I'm not mistaken):
I'll take a note to notify this issue when we have wheels in PyPI. |
Closed by #988 when we make a release, windows wheels will be available. Please feel free to reopen this after the release of v0.14 if this issue is not resolved at that point. |
@tin2tin, @JerryKon, @Tilix4, @lgmventura, @darkvertex, @Celeborn2BeAlive, @stijncalis OTIO 0.14.0 is now available and instalable with Wheels are available for Python 2.7, 3.7, 3.8 and 3.9 for all platforms (Linux, Windows and macOS). So this basically means you will be able to install OTIO on Windows and get it to work in Blender :) |
Very nice! Thank you very much for your work! |
This is the error report(cmake is already installed):
The text was updated successfully, but these errors were encountered: