2016-10-14 3 views
0

lib 디렉토리에 Google 클라우드 저장소 핍이 설치되어 있습니다. 내 python appengine 앱을 개발할 때 로컬에서 잘 실행됩니다. 그러나 코와 테스트 베드를 통해 단위 테스트를 실행하려고하면 "Google 클라우드 코어 배포가 발견되지 않고 응용 프로그램에서 필요합니다"라는 메시지가 나타납니다. 다음은 스택입니다.테스트 베드를 사용하여 nosetests의 google-cloud-storage 라이브러리

Traceback (most recent call last): 
    File "/Users/jason/dev/gain-data/venv/lib/python2.7/site-packages/nose/loader.py", line 418, in loadTestsFromName 
    addr.filename, addr.module) 
    File "/Users/jason/dev/gain-data/venv/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath 
    return self.importFromDir(dir_path, fqname) 
    File "/Users/jason/dev/gain-data/venv/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir 
    mod = load_module(part_fqname, fh, filename, desc) 
    File "/Users/jason/dev/gain-data/data/storage/__init__.py", line 4, in <module> 
    from google.cloud.storage import Blob, Client 
    File "/Users/jason/dev/gain-data/lib/google/cloud/storage/__init__.py", line 42, in <module> 
    from google.cloud.storage.batch import Batch 
    File "/Users/jason/dev/gain-data/lib/google/cloud/storage/batch.py", line 30, in <module> 
    from google.cloud.storage.connection import Connection 
    File "/Users/jason/dev/gain-data/lib/google/cloud/storage/connection.py", line 17, in <module> 
    from google.cloud import connection as base_connection 
    File "/Users/jason/dev/gain-data/lib/google/cloud/connection.py", line 31, in <module> 
    get_distribution('google-cloud-core').version) 
    File "/Users/jason/dev/gain-data/venv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 557, in get_distribution 
    dist = get_provider(dist) 
    File "/Users/jason/dev/gain-data/venv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 431, in get_provider 
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0] 
    File "/Users/jason/dev/gain-data/venv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 968, in require 
    needed = self.resolve(parse_requirements(requirements)) 
    File "/Users/jason/dev/gain-data/venv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 854, in resolve 
    raise DistributionNotFound(req, requirers) 
DistributionNotFound: The 'google-cloud-core' distribution was not found and is required by the application 

어떤 생각이 들었습니까?

답변

1

google-cloud-translate과 동일한 문제가 발생했습니다. 패키지 전체를 "pip install google-cloud-translate"에도 설치해야합니다.