2013-03-02 4 views
0

ActivePython-2.7.2.5-win32-x86을 다운로드하고 설명서의 지침에 따라 소프트웨어를 설치했습니다. 그러나 pypm은 전혀 작동하지 않습니다.동일하게 유지 SyntaxError : pypm을 사용하여 패키지를로드하려고 할 때 구문이 올바르지 않습니다.

C:\> pypm install pandas 

설치하고 패키지를로드 : 문서에서, 난 그냥 성공적으로 파이썬을 설치 한 후 IDLE (파이썬 GUI)이 코드가 필요하다고 믿었다.

C:\> pypm install pandas 

아래 파이썬 대화 형 쉘 :

그러나, 나는

ActivePython 2.7.2.5 (ActiveState Software Inc.) based on 
Python 2.7.2 (default, Jun 24 2011, 12:21:10) [MSC v.1500 32 bit (Intel)] on win32 
Type "copyright", "credits" or "license()" for more information. 
>>> C:\> pypm install pyramid 
SyntaxError: invalid syntax 

나도 같은 코드를 실행하려고 할 때이 같은 오류 메시지가 아래와 같이 표시된 구문 에러를 받고 유지

ActivePython 2.7.2.5 (ActiveState Software Inc.) based on 
Python 2.7.2 (default, Jun 24 2011, 12:21:10) [MSC v.1500 32 bit (Intel)] on win32 
Type "copyright", "credits" or "license()" for more information. 
>>> C:\> pypm install pyramid 
    File "<stadin>", line 1 
    C:\> pypm install pyramid 
    ^
SyntaxError: invalid syntax 

Python Package Manager (PyPM)를 열어서 문제가 없는지 확인하려고했습니다. 난 정말 내가 잘못했던 곳, 내가의 ActivePython 2.7.2.5을 제거하고 다시 여러 번 다시 시도 모르는

'pypm' is not recognized as an internal or external command, 
operable program or hatch file. 

C:\windows\system32> 

, 나는 여전히 같은 오류 메시지를 얻을 : 나는 PyPM 창에서 아래 라인을 발견했다.

난 그냥 파이썬에서 다음과 같이 대화 형 쉘

pypm install pandas 

을 입력 : 아직도

ActivePython 2.7.2.5 (ActiveState Software Inc.) based on 
Python 2.7.2 (default, Jun 24 2011, 12:21:10) [MSC v.1500 32 bit (Intel)] on win32 
Type "copyright", "credits" or "license()" for more information. 
>>> pypm install pyramid 
    File "<stadin>", line 1 
    pypm install pyramid 
      ^
SyntaxError: invalid syntax 

같은 오류 메시지.

ActivePython 2.7.2.5를 제거하고 다시 여러 번 설치하려고했지만 여전히 동일한 오류 메시지가 표시됩니다. Windows 7 운영 체제를 사용하고 있습니다.

+0

아마도'PATH' 환경 변수를 설정해야합니다. 실행 파일에 fullpath를 사용하십시오 :'C : \ Path \ To \ pypm install pandas'. – Bakuriu

답변

1

당신은 파이썬 인터프리터 프롬프트에서

pypm install pyramid 

를 호출 할 수 없습니다.

콘솔/쉘 명령 줄에서이 내용을 입력해야합니다.

+0

이제 작동합니다. 어떤 이유로 Python 패키지 관리자 (PyPM)가 지난 밤에 작동하지 않았습니다. 고마워. –

1

동일한 문제가 발생했습니다. 그러나 주어진 대답은 완전히 정확하지는 않습니다.

ActivePython 2.7.8.10이 설치된 Windows에서 OP와 동일한 작업을 시도했지만 동일한 오류 메시지가 표시됩니다. 나도 문제가 발생했을 때 파이썬 2.7.8 셸을 사용하고 있었다.

"정답"은 ActiveState Python 2.7 폴더에 Python Package Manager (PyPM) 아이콘이 있다는 것입니다. 다음과 같이 명령 프롬프트 창을 가져이 아이콘 출시 : 여기

PyPM 1.4.3 (Python Package Manager) brief help: Type "pypm install PACKAGE" to install a package. Type "pypm search KEYWORDS" to search for packages. Type "pypm upgrade" to upgrade installed packages.
Type "pypm help" to show full help. C:\Windows\system32>

을, 나는 pypm을 실행하고 내가 원하는 패키지를 설치하는 명령을 입력 할 수 있습니다.

주목할 점. 이것은 ActiveState Python 패키지에서만 작동했습니다. Python의 다른 꾸러미에는 PyPM이 설치되어 있지 않으므로 파이썬의 다른 배포판을 고수하고 싶다면 먼저 설치하는 방법을 알아 내야 할 것입니다.