PCV icon indicating copy to clipboard operation
PCV copied to clipboard

Python 3 compatibility?

Open AutomaticHourglass opened this issue 9 years ago • 3 comments

I have installed PCV on Anaconda with python 3.5 and tried to compile this:

from PIL import Image
from pylab import *
from numpy import *

from PCV.localdescriptors import dsift, sift

basically dense sift example in examples. The compiler gives me the output:

Traceback (most recent call last): File "C:\Dropbox\Python\Sorusana\main.py", line 9, in from PCV.localdescriptors import dsift, sift File "C:\Anaconda3\lib\site-packages\PCV\localdescriptors\dsift.py", line 38 print 'processed', imagename, 'to', resultname ^ SyntaxError: Missing parentheses in call to 'print' [Finished in 1.5s]

I think it's because python 2 neture of the library. Any solutions?

AutomaticHourglass avatar Jan 18 '16 09:01 AutomaticHourglass

Yeah. The entire book and repository is using Python2.

In you specific error you need to have parenthesis for print, like this print('processed', imagename, 'to', resultname)

jesolem avatar Jan 18 '16 09:01 jesolem

How to install PCV from PCV.classifiers import bayes Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'PCV'

subratajanaphd avatar Oct 11 '18 10:10 subratajanaphd

I have the same error... "ModuleNotFoundError: No module named 'PCV'"

uly94 avatar Oct 11 '21 13:10 uly94