I've created a fresh venv running Python 3.3.2. While trying to install Campaign Monitor's createsend
package via pip, it yields:
Running setup.py egg_info for package createsend
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/vagrant/3.3.2venv/build/createsend/setup.py", line 5, in <module>
from createsend import __version__
File "./createsend/__init__.py", line 1, in <module>
from createsend import __version__
ImportError: cannot import name __version__
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/vagrant/3.3.2venv/build/createsend/setup.py", line 5, in <module>
from createsend import __version__
File "./createsend/__init__.py", line 1, in <module>
from createsend import __version__
ImportError: cannot import name __version__
I believe this package is Python 3 compatible. I'm running the latest version of pip. Can anyone explain why I'm receiving this error?
As of version 4.2.0, released 10 Oct, 2016, this package is now Python 3 compatible. Old answer, from 2013, follows below.
No, this package is not Python 3 compatible. It is using relative imports:
where the second
createsend
is meant to becreatesend/createsend.py
. Instead, Python 3 sees it as an absolute package and the recursive import fails to find the__version__
name.