0

I have a problem. I'm trying to install a script written in python. It requires 3.4+ version, and I have python2.7 python3.4 python3.5 installed on my ubuntu 15.10 by default. During setup it throws an error which I found is concerning missing packages in python.

The error is

File "/usr/lib/python3.4/distutils/dist.py", line 1209, in set_requires distutils.versionpredicate.VersionPredicate(v)
File "/usr/lib/python3.4/distutils/versionpredicate.py", line 114, in __init__ raise ValueError("expected parenthesized list: %r" % paren) 
ValueError: expected parenthesized list: '-branch'

I looked into source, found list of required packages and made a small script which gives me missing ones

import pip
installed_packages = pip.get_installed_distributions()
flat_installed_packages = [package.project_name for package in installed_packages]
packages = [
    "aiohttp",
    "httplib2",
    "socksipy-branch",
    "requests",
    "dns",
    "url"
]
for needle in packages:
    if needle in flat_installed_packages:
        print('Found ', needle)
    else:
        print('Not found ', needle)`

Output is

Found  aiohttp
Found  httplib2
Not found  socksipy-branch
Found  requests
Not found  dns
Found  url

I tried to install these with synaptic manager, with manual apt-get, with pip, pip3, pip3.4 but with no luck. As I can see from random messages during package installation it installs them into python 2.7, no matter what I do. How do I get them into 3.4 version? Please help me.

1 Answer 1

1

Python2 and Python3 are independent of each other and have to be considered separately.

To install socksipy for Python 3,

sudo apt-get install python3-socksipy
1
  • Thanks for reply. This doesn't help, after run this command my check script says Not found socksipy-branch Feb 24, 2016 at 11:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .