3

I want to install you-get but failed. Fistly, when I run make install according to the project's README file, I got this error:

pi@raspberrypi ~/you-get $ make install
python3 setup.py bdist_egg
Traceback (most recent call last):
  File "setup.py", line 15, in <module>
    from setuptools import setup, find_packages
ImportError: No module named setuptools
make: *** [bdist_egg] Error 1

I guess it's because the setuptool of python did not installed, so according to this, I run the command, but still have above error.

Then I tried sudo easy_install pip and pip install you-get, but got this error:

pi@raspberrypi ~ $ sudo pip install you-get
Downloading/unpacking you-get
  Downloading you-get-0.3.24.tar.gz (51kB): 51kB downloaded
  Running setup.py egg_info for package you-get

Installing collected packages: you-get
  Running setup.py install for you-get

    SyntaxError: ("unqualified exec is not allowed in function 'decipher' it contains a nested function with free variables",)

Successfully installed you-get
Cleaning up...

I want to see if it's really failed, so I run you-get -V, then got this error:

pi@raspberrypi ~ $ you-get -V
Traceback (most recent call last):
  File "/usr/local/bin/you-get", line 8, in <module>
    load_entry_point('you-get==0.3.24', 'console_scripts', 'you-get')()
  File "build/bdist.linux-armv6l/egg/pkg_resources.py", line 318, in load_entry_point
  File "build/bdist.linux-armv6l/egg/pkg_resources.py", line 2221, in load_entry_point
  File "build/bdist.linux-armv6l/egg/pkg_resources.py", line 1954, in load
  File "/usr/local/lib/python2.7/dist-packages/you_get/__init__.py", line 3, in <module>
    from .common import *
  File "/usr/local/lib/python2.7/dist-packages/you_get/common.py", line 9, in <module>
    from urllib import request, parse
ImportError: cannot import name request

I guess it's because of the version of python, on Raspberry Pi the default python version is 2.7, but the you-get software requires python 3, so I installed python3 and run this:

pi@raspberrypi ~ $ python3 /usr/bin/you-get
python3: can't open file '/usr/bin/you-get': [Errno 2] No such file or directory

pi@raspberrypi ~ $ whereis you-get
you-get: /usr/local/bin/you-get

pi@raspberrypi ~ $ python3 /usr/local/bin/you-get
Traceback (most recent call last):
  File "/usr/local/bin/you-get", line 5, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources

Then I don't know what to do next.

Phoenix
  • 1,055
  • 1
  • 12
  • 27
  • Possible duplicate of [How to install pip with Python 3?](https://stackoverflow.com/q/6587507/608639) and friends. – jww Jul 18 '19 at 05:19

3 Answers3

2

If you want to install the Python 3.X version of pip you need to target aptitude to the good package:

sudo apt-get install python3-pip

For more info http://packages.debian.org/wheezy/python3-pip

Ketouem
  • 3,820
  • 1
  • 19
  • 29
2
sudo apt-get install python3-pip

or for python 2:

sudo apt-get install python-pip
Sid
  • 51
  • 5
1

I already had python3 but no setuptools, this worked:

sudo apt-get install python3-setuptools

Raspbian Jessie Pi3B

Lee
  • 29,398
  • 28
  • 117
  • 170