ubuntupythonpipmod-python

ubuntu 15.04 python module telnetlib


I need some help with my new Ubuntu 15.04 VM. I tryied to install the pip module telnetlib3 but I got some errors:

pip install telnetlib3 Downloading/unpacking telnetlib3 Downloading telnetlib3-0.2.3.tar.gz (96kB): 96kB downloaded Running setup.py (path:/tmp/pip-build-YojtJ4/telnetlib3/setup.py) egg_info for package telnetlib3 Traceback (most recent call last): File "<string>", line 17, in <module> File "/tmp/pip-build-YojtJ4/telnetlib3/setup.py", line 28, in <module> install_requires = [str(req.req) for req in requirements] File "/home/max/.local/lib/python2.7/site-packages/pip/req/req_file.py", line 72, in parse_requirements "parse_requirements() missing 1 required keyword argument: " TypeError: parse_requirements() missing 1 required keyword argument: 'session' Complete output from command python setup.py egg_info: Traceback (most recent call last):

File "<string>", line 17, in <module>

File "/tmp/pip-build-YojtJ4/telnetlib3/setup.py", line 28, in <module>

install_requires = [str(req.req) for req in requirements]

File "/home/max/.local/lib/python2.7/site-packages/pip/req/req_file.py", line 72, in parse_requirements

"parse_requirements() missing 1 required keyword argument: "

TypeError: parse_requirements() missing 1 required keyword argument: 'session'

---------------------------------------- Cleaning up... Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-YojtJ4/telnetlib3 Storing debug log for failure in /home/max/.pip/pip.log

I alredy googled it but I don´t find anything useful for me.

Thank you a lot for your help!


Solution

  • I just ran into this same problem on OSX and managed to fix it, i thought i should share the fix for anyone that runs into this problem. It seems a session argument is needed by the parse_requirements() function. This worked for me:

    Download the libtelnet3 package manually:

    wget https://pypi.python.org/packages/source/t/telnetlib3/telnetlib3-0.2.3.tar.gz#md5=964a2f7f9b1b0b7f9024942fa413fc94
    

    extract the tarball:

    tar -zxvf telnetlib3-0.2.3.tar.gz
    

    Go into the newly created folder:

    cd telnetlib3-0.2.3
    

    Open setup.py in your favourite editor to line 27:

    vi setup.py +27
    

    Look for this line:

    requirements = parse_requirements(os.path.join(here, 'requirements.txt'))
    

    And change it to:

    requirements = parse_requirements(os.path.join(here, 'requirements.txt'), session=False)
    

    Save the file and run setup.py:

    sudo python setup.py install
    

    Not sure if this will work for any system, but it did for me, good luck ;)