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

ImportError: DLL load failed: #15

Closed
gerroon opened this issue Nov 26, 2018 · 24 comments
Closed

ImportError: DLL load failed: #15

gerroon opened this issue Nov 26, 2018 · 24 comments
Assignees
Labels
bug Something isn't working

Comments

@gerroon
Copy link

gerroon commented Nov 26, 2018

HI

I installed it using pip on Windows 10 x64 Python37 . Then I fire ipython, then type "import bpy" this is what I got

: import bpy

ImportError Traceback (most recent call last)
in
----> 1 import bpy

ImportError: DLL load failed: The specified module could not be found

thanks

@TylerGubala
Copy link
Owner

Hi there!

Thanks for filing the issue.

Could I get some more information about the environment that you are using this in? Namely:

  • Are you using a venv?
  • Is this some form of Iron Python? Iron Python is not supported. (you say ipython?)
  • Could you please paste the entire stack trace of the crash? That would be very helpful.

Thanks in advance!

@gerroon
Copy link
Author

gerroon commented Nov 26, 2018

Hi

I am not using venv, just installed it systemwide using pip3 install bpy

I am not using Iron Python. Ipython is part fo that Jupyter thing, Py console

Can you tell me how I get the stack trace of the crash on Windows?

thanks

@TylerGubala
Copy link
Owner

Sorry, I missed the fact that you gave me the import error. I'm away from my PC at the moment (on mobile).

I'm thinking that this is an issue I overlooked with my Python 3.7 builds.

I hope to complete this sometime this weekend.

Thanks for your patience.

@gerroon
Copy link
Author

gerroon commented Nov 29, 2018

Thanks, let me know if you need testing

@micmelesse
Copy link

Is there any update one this. I am also using python 3.7 and did a system wide install using pip3 install bpy.

@TylerGubala TylerGubala self-assigned this Dec 21, 2018
@TylerGubala
Copy link
Owner

Unfortunately I've been a bit busy with work lately, I have a fix in the works, but it may take a little while, as I am also chasing down Mac compatibility currently (just bought a used Mac to test).

Thanks for your patience.

@TylerGubala TylerGubala pinned this issue Jan 12, 2019
@MaikuMori
Copy link

I got this on 3.7, but I don't have hard dependency on Python version, so I decided to try with 3.5 and it still doesn't work. :(

Any workarounds?

@TylerGubala
Copy link
Owner

TylerGubala commented May 8, 2019 via email

@isaironi
Copy link

Hi, i have the same problem. The python I am using is python 3.4.3 and i did install it using a virtualenv. I also tried installing this a while back using Linux Mint but couldn't seem to get it work either. Is this incompatible with virtual environments?

@TylerGubala
Copy link
Owner

TylerGubala commented May 12, 2019 via email

@caniko
Copy link

caniko commented Jun 1, 2019

I get the same issue with 3.6.8

@TylerGubala
Copy link
Owner

@caniko2 Can you let me know what OS, platform (CPython I'm guessing?) Etc so that I can nail this down better? Should work for Windows CPython 3.6.x

@caniko
Copy link

caniko commented Jun 11, 2019

Yes, CPython 3.6.x Windows 10

@caniko
Copy link

caniko commented Jun 11, 2019

Does Blender support pypy or jpython?

@TylerGubala
Copy link
Owner

Blender might to some level, but this project targets neither of those environements currently.

@caniko
Copy link

caniko commented Jul 9, 2019

After clean install, reverting back to Python 3.6 seems to solve the problem

@TylerGubala
Copy link
Owner

I cannot replicate the issue. Can someone please provide their complete steps to arrive at the issue point? I installed Python 3.6.8 32 and 64 bit on Windows and had 0 problems. I would like to fix this for whoever is having the issue but am struggling to replicate it.

Microsoft Windows [Version 10.0.18362.207]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\TGubs>cd C:\Users\TGubs\Code\Python\blender_test\venvs

C:\Users\TGubs\Code\Python\blender_test\venvs>py -3.6-32 -m venv 3.6.8-32

C:\Users\TGubs\Code\Python\blender_test\venvs>py -3.6-64 -m venv 3.6.8-64

C:\Users\TGubs\Code\Python\blender_test\venvs>"3.6.8-32/Scripts/activate"

(3.6.8-32) C:\Users\TGubs\Code\Python\blender_test\venvs>py -m pip install --upgrade pip

Collecting pip
Using cached https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 18.1
Uninstalling pip-18.1:
Successfully uninstalled pip-18.1
Successfully installed pip-19.1.1

(3.6.8-32) C:\Users\TGubs\Code\Python\blender_test\venvs>py -m pip install bpy

Collecting bpy
Using cached https://files.pythonhosted.org/packages/98/cb/d449719f69e225f76aa3201b2f0f0f04cda5cc6b23753054f2d11c3e2896/bpy-1.2.3-cp36-cp36m-win32.whl
Installing collected packages: bpy
Successfully installed bpy-1.2.3

(3.6.8-32) C:\Users\TGubs\Code\Python\blender_test\venvs>py

Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

>>> import bpy

AL lib: (EE) UpdateDeviceParams: Failed to set 44100hz, got 48000hz instead

>>> quit()

Error: Not freed memory blocks: 8, total unfreed memory 0.004288 MB

(3.6.8-32) C:\Users\TGubs\Code\Python\blender_test\venvs>deactivate
C:\Users\TGubs\Code\Python\blender_test\venvs>"3.6.8-64/Scripts/activate"

(3.6.8-64) C:\Users\TGubs\Code\Python\blender_test\venvs>py -m pip install --upgrade pip

Collecting pip
Using cached https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 18.1
Uninstalling pip-18.1:
Successfully uninstalled pip-18.1
Successfully installed pip-19.1.1

(3.6.8-64) C:\Users\TGubs\Code\Python\blender_test\venvs>py -m pip install bpy

Collecting bpy
Using cached https://files.pythonhosted.org/packages/a1/ca/33d3cb564180e156607ce1c4126b78c6aea23e1d6120de980b113c8c0e9b/bpy-1.2.3-cp36-cp36m-win_amd64.whl
Installing collected packages: bpy
Successfully installed bpy-1.2.3

(3.6.8-64) C:\Users\TGubs\Code\Python\blender_test\venvs>py

Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

>>> import bpy

AL lib: (EE) UpdateDeviceParams: Failed to set 44100hz, got 48000hz instead

>>> quit()

Error: Not freed memory blocks: 8, total unfreed memory 0.008392 MB

(3.6.8-64) C:\Users\TGubs\Code\Python\blender_test\venvs>

@MaikuMori
Copy link

3.6 worked for me, but we ran into issues where renders didn't match between running the same script via blender -b -y -P ... and using blender as python module, so we switched back to running via blender as that had correct renders.

@TylerGubala TylerGubala added the bug Something isn't working label Jul 17, 2019
@ashishgopal1414
Copy link

doesn't work for python 3.7.3 also :-(

@liwenssss
Copy link

is there any solution for python3.7.3?

@TylerGubala
Copy link
Owner

TylerGubala commented May 5, 2020

@liwenssss Try the sdist at test.pypi.org:

pip install --index-url https://test.pypi.org/simple/ bpy

Note: depending on your network connection it can take multiple hours to build from sdist.

@TylerGubala
Copy link
Owner

You should be able to pip install bpy && bpy_post_install on all platforms but linux now.

Python 3.7.x should work for all but Linux using bpy 2.82

@avishek-mondal
Copy link

avishek-mondal commented Jun 27, 2020

Hi, when I ran

pip install bpy && bpy_post_install

I get the following error messages -

raceback (most recent call last):
  File "/usr/local/bin/bpy_post_install", line 11, in <module>
    sys.exit(post_install())
  File "/usr/local/lib/python3.7/site-packages/blenderpy/post_install.py", line 47, in post_install
    install_scripts_directory()
  File "/usr/local/lib/python3.7/site-packages/blenderpy/post_install.py", line 43, in install_scripts_directory
    +blender_scripts_search_root_dir)
blenderpy.BlenderScriptsDirUnknownError: Could not find Blender scripts directory in /usr/local/opt

Any idea how to solve this? I'm running on macOS 10.15.5

@TylerGubala
Copy link
Owner

@avishek-mondal let's continue this discussion in #41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants