longcw / faster_rcnn_pytorch

Faster RCNN with PyTorch
MIT License
1.7k stars 466 forks source link

How could I figure out the code is python2 or 3? #41

Closed squirrel233 closed 6 years ago

squirrel233 commented 6 years ago

In this project, sometimes it is written that print('Including CUDA code.') and sometimes it is print 'anchor:' I'm very confused about the version of python. And my anaconda, pytorch all depend on a certain python version. Please help. Thanks a lot.

yuritur commented 6 years ago

You can use "2to3" (https://docs.python.org/2/library/2to3.html) or something similar. For example: 2to3 -w yourFolder/ This command transposes the python2 files into python3.