2017-10-26 4 views
0

저는 python, theano, keras, tensorFlow를 구성하고 있습니다. 필자는 거의 작동했지만 pygpu0.6.9를 사용할 때 버전 오류가 발생했습니다. 그래서 나는 theano 버전을 업데이트했다. Aftwerwards, 테스트 파일을 다시 실행했습니다. 나는 더 이상 pygpu 오류가 발생하지 않았지만, 대신에이 오류를 받고 있어요 :Python 디렉토리의 Theano 경로 - RuntimeError

"You have the theano directory in your Python Path. This do [sic] not work in Python 3."

이것은 아마도 간단한 수정,하지만 난이 비교적 새로운 해요. 어떤 도움을 주셔서 감사합니다.

PS

C:\program files\anaconda3> python test.py 
Traceback (most recent call last): 
    File "test.py", line 1, in <module> 
    from theano import function, config, shared, tensor 
    File "C:\Program Files\Anaconda3\lib\site-packages\theano\__init__.py", line 79, in <module> 
    "You have the theano directory in your Python path." 
RuntimeError: You have the theano directory in your Python path. This do not work in Python 3. 
+0

어떤 버전의 Python과 Theano를 사용 하시나요? – kvorobiev

답변

0

당신은 내가 이유를 모르겠지만, Theano 경로가 환경 변수 PYTHONPATH에서 초기화하는 (sys.path에있는 경우 저자는 확인 code

rpath = os.path.realpath(__path__[0]) 
for p in sys.path: 
    if os.path.realpath(p) != rpath: 
     continue 
    if PY3: 
     raise RuntimeError(
      "You have the theano directory in your Python path." 
      " This do not work in Python 3.") 
    else: 
     warnings.warn(
      "You have the theano directory in your Python path." 
      " This is will not work in Python 3.") 
    break 

다음에 오류가 발생했습니다). PYTHONPATH env 변수에서 Theano 경로를 제거하십시오.