Installing Packages

  • I'm looking for a way to install site packages for a new DrawBot.
    (I was trying to install for example PageBot or Letterror's coverage)

    When I was following the tutorial from PageBot's github ( It didn't work at all.

    this code:

    import site
    print('Found site at %s' % site.__file__)
    packages = site.getsitepackages()
    for p in packages:
        print(' - %s' % p)

    throws error:

    Found site at /Applications/
    Traceback (most recent call last):
      File "<untitled>", line 4, in <module>
    AttributeError: module 'site' has no attribute 'getsitepackages'

    even If I'm trying to change the name of the site.pyc (I'm tring to follow the PageBot tutorial)

    import sys

    prints out


    so it doesn't care about my python3 site-package folder (/usr/local/lib/python3.6/site-packages/)

  • @rafalbuchner did you try to append the directory to the sys.path?


  • @jo Yes, right now I'm working like that,
    but I would try to avoid this solution in particular,
    since I consider it as not Pythonic and "proper"

Log in to reply