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

install by pip in anaconda's virtual env (windows), raise this error when importing #5

Open
L1Uc opened this issue Jul 10, 2020 · 20 comments

Comments

@L1Uc
Copy link

L1Uc commented Jul 10, 2020

import pyanime4k
Traceback (most recent call last):
File "", line 1, in
File "C:\Users*\Anaconda3\envs\mpegtorch\lib\site-packages\pyanime4k_init_.py", line 9, in
import pyanime4k.error
File "C:\Users*
\Anaconda3\envs\mpegtorch\lib\site-packages\pyanime4k\error.py", line 9, in
from pyanime4k.wrapper import *
File "C:\Users*\Anaconda3\envs\mpegtorch\lib\site-packages\pyanime4k\wrapper_init_.py", line 9, in
from pyanime4k.wrapper.acwrapper import *
File "C:\Users*
\Anaconda3\envs\mpegtorch\lib\site-packages\pyanime4k\wrapper\acwrapper.py", line 22, in
os.path.join(curr_path, ac_lib[platform.system()]))
File "C:\Users*\Anaconda3\envs\mpegtorch\lib\ctypes_init_.py", line 434, in LoadLibrary
return self._dlltype(name)
File "C:\Users*
\Anaconda3\envs\mpegtorch\lib\ctypes_init_.py", line 356, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] 找不到指定的模块。

python 3.7.2

@TianZerL
Copy link
Owner

In old version of python(<3.8), you need add dll libs (C:\Users*\Anaconda3\envs\mpegtorch\lib\site-packages\pyanime4k\wrapper\) to PATH environment variables.

@TianZerL
Copy link
Owner

I have fixed it, please upgrade pyanime4k by pip.

@L1Uc
Copy link
Author

L1Uc commented Jul 10, 2020

I have upgraded pyanime4k but the problem still appears

@TianZerL
Copy link
Owner

v2.2.7?

@L1Uc
Copy link
Author

L1Uc commented Jul 10, 2020

image

@TianZerL
Copy link
Owner

TianZerL commented Jul 10, 2020

Please install vc runtime 2015-2019

@TianZerL
Copy link
Owner

Are you running in a local environment or on a server?

@L1Uc
Copy link
Author

L1Uc commented Jul 10, 2020

local environment
and i'm trying to install vc runtime

@L1Uc
Copy link
Author

L1Uc commented Jul 10, 2020

image
is this right?

@TianZerL
Copy link
Owner

TianZerL commented Jul 10, 2020

yes, it is. x64 is needed

@L1Uc
Copy link
Author

L1Uc commented Jul 10, 2020

I have installed it, but the problem still appears...

@TianZerL
Copy link
Owner

This problems is beacuse of missing dlls, I don't think there are something still missing. Try to use Python3.8. And what's your video card, some old card doesn't support OpenCL will get this problem too.

@L1Uc
Copy link
Author

L1Uc commented Jul 10, 2020

My video card is Nvidia 1070. Seems using python 3.8 is the only way

@TianZerL
Copy link
Owner

TianZerL commented Jul 10, 2020

I tested v2.2.6 in python3.7.7, got same problem and fixed it, now everything worked fine, so I'm not sure what's going on now. I use python venv to create a virtual env, how about anaconda?

@L1Uc
Copy link
Author

L1Uc commented Jul 10, 2020

conda create -n your_env_name python=X.X

@L1Uc
Copy link
Author

L1Uc commented Jul 10, 2020

Maybe it's because I installed vs2017 and vs2015? How did you fix it? Installing vc runtime?

@TianZerL
Copy link
Owner

TianZerL commented Jul 10, 2020

No, I added the dll folder to os.environ['PATH'], same as adding system environment variables. I have already included vc dlls in the dll folder, I told you to install it is because I'm afraid I forget something. Maybe you can try to run it by python venv or without a virtual env. I will test it in anaconda too.

@TianZerL
Copy link
Owner

I just tested it in anaconda with python3.7.7 with pyanime4k v2.2.7, everything worked fine.

@L1Uc
Copy link
Author

L1Uc commented Jul 10, 2020

Fine, maybe my system has some unknown problems.

@L1Uc
Copy link
Author

L1Uc commented Jul 10, 2020

I successfully run it in Ubuntu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants