본문 바로가기

Language/Python

ubuntu12.04 paramiko module 수동 설치

반응형

1. 상황

 - 노후화된 우분투(12.04) 시스템에 네트워크가 안되는 상황

 - 즉 apt-get update 나 pip를 사용할 수 없어 수동으로 다운받은 패키시(의존성 패키지 포함)를 설치 할 수 밖에 없는 경우

 

2. 설치

 - paramiko는 1.18버전 사용 : 다운로드 https://github.com/paramiko/paramiko/tree/1.18

 

GitHub - paramiko/paramiko: The leading native Python SSHv2 protocol library.

The leading native Python SSHv2 protocol library. Contribute to paramiko/paramiko development by creating an account on GitHub.

github.com

# 압축 해제
unzip paramiko-1.18.zip

cd paramiko-1.18
# python 2.7
python setup.py build
python setup.py install

 

 - 에러

python setup.py install

...

zip_safe flag not set; analyzing archive contents...
creating 'dist/paramiko-1.18.5-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing paramiko-1.18.5-py2.7.egg
Removing /usr/local/lib/python2.7/dist-packages/paramiko-1.18.5-py2.7.egg
Copying paramiko-1.18.5-py2.7.egg to /usr/local/lib/python2.7/dist-packages
paramiko 1.18.5 is already the active version in easy-install.pth

Installed /usr/local/lib/python2.7/dist-packages/paramiko-1.18.5-py2.7.egg
Processing dependencies for paramiko==1.18.5
Searching for ecdsa<2.0,>=0.11
Reading https://pypi.python.org/simple/ecdsa/
Couldn't find index page for 'ecdsa' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
No local packages or download links found for ecdsa<2.0,>=0.11
error: Could not find suitable distribution for Requirement.parse('ecdsa<2.0,>=0.11')

...

 

 - ecdsa-0.11 설치 : 다운로드 https://pypi.org/simple/ecdsa/

 

Links for ecdsa

 

pypi.org

tar zxvf ecdsa-0.11.tar.gz 

cd ecdsa-0.11/

python setup.py build

python setup.py install
...

byte-compiling /usr/local/lib/python2.7/dist-packages/ecdsa/ellipticcurve.py to ellipticcurve.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/ecdsa/rfc6979.py to rfc6979.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/ecdsa/test_pyecdsa.py to test_pyecdsa.pyc
running install_egg_info
Writing /usr/local/lib/python2.7/dist-packages/ecdsa-0.11.egg-info

 

 - 이후 paramiko 다시 설치

python setup.py install
...
Installed /usr/local/lib/python2.7/dist-packages/paramiko-1.18.5-py2.7.egg
Processing dependencies for paramiko==1.18.5
Searching for ecdsa==0.11
Best match: ecdsa 0.11
Adding ecdsa 0.11 to easy-install.pth file

Using /usr/local/lib/python2.7/dist-packages
Searching for pycrypto==2.4.1
Best match: pycrypto 2.4.1
Adding pycrypto 2.4.1 to easy-install.pth file

Using /usr/lib/python2.7/dist-packages
Finished processing dependencies for paramiko==1.18.5

 

3. 확인

pydoc modules

Please wait a moment while I gather a list of all available modules...

...
_ctypes             difflib             paramiko            tkSimpleDialog
...
반응형