开发者

WSGI with .pyc files

开发者 https://www.devze.com 2023-02-16 16:11 出处:网络
I\'m trying to migrate to wsgi but I\'m getting ImportError exceptions all the time. I have my modules installed only with .pyc files, I don\'t have the .py files in the server (I can\'t change that,

I'm trying to migrate to wsgi but I'm getting ImportError exceptions all the time.

I have my modules installed only with .pyc files, I don't have the .py files in the server (I can't change that, sorry). When I add some .py files the ImportError moves away to some other import line.

Is there a way to make WSGI use the .pyc开发者_如何学编程 files and work without the .py?

The script with the application entry point is a .py file but it imports some modules which are .pyc

Thanks for your help


You might need to put all the python files on that machine, then convert them to .pyc or .pyo then delete the .py's

I'm suspecting maybe the .pys were generated on a different version of python maybe.

Also paste the import errors .. that might help in diagnoses.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号