I have successfully installed the python module primefac into the developer frameworks in my mac with El Capitan OS. When I invoke "import primefac", it returns this error:
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/primefac.py", line 613
print "\033[1;31m" + (names[g] if g in names else g) + "\033[;m"
^
SyntaxError: invalid syntax
I highly doubt that my version of primefac.py has a syntax error, since I replaced the file various times with primefac.py from gitHub.
I am using Python 3.5.2 with primefac-1.1. What could be the issue that causes my primefac.py to somehow be unreadable? Could it be in the wrong directory?
The
primefac
library is only compatible with Python 2 currently -- if you want to use it, you'll need to use Python 2.7 :( You're using Python 3 which means the syntax in the library won't work.