简体   繁体   中英

WSGI with .pyc files

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM