You could use the raw url from the sourceforge page in order to get it:
pip install https://sourceforge.net/projects/pyrtf/files/pyrtf/0.45/PyRTF-0.45.tar.gz/download
But, to be honest, I don't think this library is maintained on the project website the last update was from 2005
, 11 years ago.. Additionally, it uses a line of the form:
from types import StringType
which only exists in Python 2.x
not 3.x
. Importing it raises that specific error too:
>>> import PyRTF
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jim/anaconda3/lib/python3.5/site-packages/PyRTF/__init__.py", line 1, in <module>
from PropertySets import *
File "/home/jim/anaconda3/lib/python3.5/site-packages/PyRTF/PropertySets.py", line 12, in <module>
from types import StringType
ImportError: cannot import name 'StringType'
So maybe it was designed for Python 2.x
? I can't remember when StringType
was removed from the 3.x
series, maybe it targeted an old version of it.
3.5
. – Leer