# FYI: UE4 switching to Python 3.7.7 by default (4.26)

**URL:** <https://forums.unrealengine.com/t/fyi-ue4-switching-to-python-3-7-7-by-default-4-26/151803>\
**Category:** Editor Scripting\
**Tags:** unreal-engine\
**Created:** [October 7, 2020, 8:52pm UTC](https://forums.unrealengine.com/t/fyi-ue4-switching-to-python-3-7-7-by-default-4-26/151803 "2020-10-07T20:52:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [October 7, 2020, 8:52pm UTC](https://forums.unrealengine.com/t/fyi-ue4-switching-to-python-3-7-7-by-default-4-26/151803/1 "2020-10-07T20:52:01Z")

</div>

Hey all,

Just an FYI that as of UE 4.26, we will be switching to using Python 3.7.7 by default in the UE4 editor. This change should hopefully happen by preview 3.

If you need to continue to use Python 2.7.14, then you’ll have to use a source build of UE4 and either:

- Edit PythonScriptPlugin.Build.cs and PythonScriptPluginPreload.Build.cs to use “Python” rather than “Python3” in their dependency lists.
- Set your UE\_PYTHON\_DIR environment variable to point to a custom Python installation.

If you are using a source build of preview 2 and would like to try this early (for Windows or Mac), then you can edit PythonScriptPlugin.Build.cs and PythonScriptPluginPreload.Build.cs to use “Python3” rather than “Python” in their dependency lists. Please note that this will prevent you from using USD until we submit the updated version for Python 3.

Thanks,  
Jamie.

---

<div class="post-metadata">

**Author:** ![nonnib](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nonnib](https://forums.unrealengine.com/u/nonnib)\
**Post date:** [October 15, 2020, 6:39pm UTC](https://forums.unrealengine.com/t/fyi-ue4-switching-to-python-3-7-7-by-default-4-26/151803/2 "2020-10-15T18:39:06Z")

</div>

That is fantastic news, thanks Jamie!

---

<div class="post-metadata">

**Author:** ![cgsquirrel2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@cgsquirrel2](https://forums.unrealengine.com/u/cgsquirrel2)\
**Post date:** [November 9, 2020, 4:15pm UTC](https://forums.unrealengine.com/t/fyi-ue4-switching-to-python-3-7-7-by-default-4-26/151803/3 "2020-11-09T16:15:50Z")

</div>

Jamie, For ue4.26’s python3.7 install, i did a pip install for openimageio wheel i found at  
[https://www.lfd.uci.edu/~gohlke/pythonlibs/#openimageio](https://www.lfd.uci.edu/~gohlke/pythonlibs/#openimageio)

It works if i launch python itself from the terminal, but once i am in the editor i get a dll error. Do you have any ideas what might be causing this?

From terminal

```auto

C:\Program Files\Epic Games\UE_4.26\Engine\Binaries\ThirdParty\Python3\Win64>python
Python 3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 10:41:24) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from OpenImageIO import ImageBuf
>>> print(dir(ImageBuf))
' __class__', ' __delattr__', ' __dir__', ' __doc__', ' __eq__', ' __format__', ' __ge__', ' __getattribute__', ' __gt__', ' __hash__', ' __init__', ' __init_subclass__', ' __le__', ' __lt__', ' __module__', ' __ne__', ' __new__', ' __reduce__', ' __reduce_ex__', ' __repr__', ' __setattr__', ' __sizeof__', ' __str__', ' __subclasshook__', 'clear', 'copy', 'copy_metadata', 'copy_pixels', 'deep', 'deep_erase_samples', 'deep_insert_samples', 'deep_samples', 'deep_value', 'deep_value_uint', 'deepdata', 'file_format_name', 'get_pixels', 'getchannel', 'geterror', 'getpixel', 'has_error', 'init_spec', 'initialized', 'interppixel', 'interppixel_NDC', 'interppixel_NDC_full', 'interppixel_bicubic', 'interppixel_bicubic_NDC', 'make_writable', 'make_writeable', 'miplevel', 'name', 'nativespec', 'nchannels', 'nmiplevels', 'nsubimages', 'orientation', 'oriented_full_height', 'oriented_full_width', 'oriented_full_x', 'oriented_full_y', 'oriented_height', 'oriented_width', 'oriented_x', 'oriented_y', 'pixelindex', 'pixels_valid', 'pixeltype', 'read', 'reset', 'roi', 'roi_full', 'set_deep_samples', 'set_deep_value', 'set_deep_value_uint', 'set_full', 'set_origin', 'set_pixels', 'set_write_format', 'set_write_tiles', 'setpixel', 'spec', 'specmod', 'subimage', 'swap', 'write', 'xbegin', 'xend', 'xmax', 'xmin', 'ybegin', 'yend', 'ymax', 'ymin', 'zbegin', 'zend', 'zmax', 'zmin']

```

From Editor

```auto

LogPython: from OpenImageIO import ImageBuf
LogPython: Error: Traceback (most recent call last):
LogPython: Error: File "<string>", line 1, in <module>
LogPython: Error: ImportError: DLL load failed: The specified procedure could not be found.

```

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [November 9, 2020, 5:10pm UTC](https://forums.unrealengine.com/t/fyi-ue4-switching-to-python-3-7-7-by-default-4-26/151803/4 "2020-11-09T17:10:23Z")

</div>

> [@cgsquirrel2](#):
>
> Do you have any ideas what might be causing this?

Generally an error like that would mean that either the DLL can’t be loaded (eg, compiled against the wrong version of CPython), or that the DLL can’t be found (eg, not on a known DLL path).

Given that it loads in the interpreter itself, I’d guess the latter. Where did it install the .dll/.pyd files to?

---

<div class="post-metadata">

**Author:** ![cgsquirrel2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@cgsquirrel2](https://forums.unrealengine.com/u/cgsquirrel2)\
**Post date:** [November 9, 2020, 6:05pm UTC](https://forums.unrealengine.com/t/fyi-ue4-switching-to-python-3-7-7-by-default-4-26/151803/5 "2020-11-09T18:05:49Z")

</div>

pip installed the dll/pyd files to “…Python3\Win64\Lib\site-packages” loosely (no sub-dirs…except for the wheel dist-info directory ).  
OpenColorIO.dll  
OpenImageIO.dll  
OpenImageIO.pyd

Sounds like I might have to compile the openimageio from source… Do i need to use the ue4 from source as well? Is the included python3.7 a custom build?  
Thank you Jamie

---

<div class="post-metadata">

**Author:** ![116406776](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@116406776](https://forums.unrealengine.com/u/116406776)\
**Post date:** [December 8, 2020, 3:53pm UTC](https://forums.unrealengine.com/t/fyi-ue4-switching-to-python-3-7-7-by-default-4-26/151803/6 "2020-12-08T15:53:05Z")

</div>

I find also copy shiboken2
