简体   繁体   中英

Issues with Python script developed in 2.7 running on 2.6

I had the impression that 2.7 was backwards compatible with 2.6?

I have a python program that I need to run on a server. I have developed it on a python version 2.7.6 and the server has python version 2.6.6.

What happens is that my program stops running when I run it on the server after a few minutes. I get the message: ' No handlers could be found for logger "sickle.app" ' and then it quits. However I get this message when I run the program locally to, but the program keeps running.

The way I run the program is that I send the program and its requirements to the server. Create a virtual environment and pip install -r requirements.txt and then run the program. So everything should be similar on the server as on the development computer.

Am I doing something wrong here?

That's not what backwards compatible means. You can run a 2.6 script on 2.7, but if you try it the other way round you're likely to run into problems with new features added in 2.7.

If it didn't work like that, it would be impossible ever to add new features.

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