Archived Forum Post

Index of archived forum posts

Question:

AttributeError: module 'site' has no attribute 'getusersitepackages'

Aug 19 '16 at 09:58

hi Chilkat,

installChilkat.py

This Python version 3.5, under virtualenv
This system: Darwin
This processor: x86_64
Traceback (most recent call last)

  File "/chilkat-python-mac/installChilkat.py", line 87, in <module>
    spDir = site.getusersitepackages()
AttributeError: module 'site' has no attribute 'getusersitepackages'


Answer

The site.getusersitepackages() SHOULD be present in Python 3.5. See here: https://docs.python.org/3/library/site.html

A workaround is to manually copy the chilkat.py and _chilkat.so files to the Python 3.5 site packages directory.


Answer

Chilkat, you have forgot to mention that it is only happens if VIRTUALENV used. Please see https://github.com/pypa/virtualenv/issues/804