mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 17:06:29 +03:00
Call pip via subprocess, to make it use virtualenv
This commit is contained in:
parent
aa8ff9257f
commit
1754e0db9b
|
@ -4,6 +4,9 @@ from __future__ import unicode_literals
|
|||
import pip
|
||||
import requests
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from .link import link_package
|
||||
from .. import about
|
||||
from .. import util
|
||||
|
@ -52,8 +55,9 @@ def get_version(model, comp):
|
|||
|
||||
def download_model(filename):
|
||||
util.print_msg("Downloading {f}".format(f=filename))
|
||||
download_url = os.path.join(about.__download_url__, filename)
|
||||
pip.main(['install', download_url])
|
||||
download_url = about.__download_url__ + '/' + filename
|
||||
subprocess.call([sys.executable, '-m', 'pip', 'install', download_url],
|
||||
env=os.environ.copy())
|
||||
|
||||
|
||||
def check_error_depr(model):
|
||||
|
|
Loading…
Reference in New Issue
Block a user