Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在raspberry pi上安装python 3和setuptools?_Python_Python 2.7_Python 3.x_Youtube_Raspberry Pi - Fatal编程技术网

如何在raspberry pi上安装python 3和setuptools?

如何在raspberry pi上安装python 3和setuptools?,python,python-2.7,python-3.x,youtube,raspberry-pi,Python,Python 2.7,Python 3.x,Youtube,Raspberry Pi,我想安装,但失败了。首先,当我根据项目的自述文件运行makeinstall时,我遇到了以下错误: 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 Impor

我想安装,但失败了。首先,当我根据项目的自述文件运行
makeinstall
时,我遇到了以下错误:

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
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...
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
我想看看它是否真的失败了,所以我运行了
you get-V
,然后出现了以下错误:

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
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...
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

然后我不知道下一步该怎么办。

如果你想安装Python 3.X版的pip,你需要将aptitude定位到好的软件包中:

sudo apt-get install python3-pip

有关更多信息

如果您想安装Python 3.X版的pip,您需要将aptitude定位到好的软件包中:

sudo apt-get install python3-pip
更多信息

或者对于python 2:

sudo apt-get install python-pip
或者对于python 2:

sudo apt-get install python-pip

我已经有了python3,但没有设置工具,这很有效:

sudo apt-get install python3-setuptools

Raspbian Jessie Pi3B

我已经有了python3,但没有安装工具,这很有效:

sudo apt-get install python3-setuptools

Raspbian Jessie Pi3B

我尝试过这个,但没有实际工作,python3 pip软件似乎不存在。我尝试过这个,但没有实际工作,python3 pip软件似乎不存在。和朋友的可能重复。和朋友的可能重复。