Use distutils.sysconfig.get_python_lib

site.getsitepackages seems to not work as expected in Python 2
This commit is contained in:
ines 2017-03-18 18:20:40 +01:00
parent fa1f2040a5
commit 7d33104180

View File

@ -4,8 +4,8 @@ from __future__ import unicode_literals
import io
import os
import pip
import site
from pathlib import Path
from distutils.sysconfig import get_python_lib
from .. import util
@ -17,7 +17,7 @@ def link(origin, link_name, force=False):
def link_package(origin, link_name, force=False):
package_path = site.getsitepackages()[0]
package_path = get_python_lib()
meta = get_meta(package_path, origin)
data_dir = origin + '-' + meta['version']
model_path = Path(package_path) / origin / data_dir