我无法在我的Raspberry中运行PIP(在Wheezy中运行)。 在我总是得到这个消息之后:
~ $ pip3
/usr/local/lib/python3.2/dist-packages/pip-8.1.2-py3.2.egg/pip/_vendor/pkg_resources/__init__.py:80:
UserWarning: Support for Python 3.0-3.2 has been dropped. Future
versions will fail here. warnings.warn(msg) Traceback (most recent
call last): File "/usr/local/bin/pip3", line 9, in <module>
load_entry_point('pip==8.1.2', 'console_scripts', 'pip3')() File "/usr/lib/python3/dist-packages/pkg_resources.py", line 337, in
load_entry_point
return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2280, in
load_entry_point
return ep.load() File "/usr/lib/python3/dist-packages/pkg_resources.py", line 1990, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__']) File
"/usr/local/lib/python3.2/dist-packages/pip-8.1.2-py3.2.egg/pip/__init__.py",
line 16, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa File
"/usr/local/lib/python3.2/dist-packages/pip-8.1.2-py3.2.egg/pip/vcs/mercurial.py",
line 9, in <module>
from pip.download import path_to_url File "/usr/local/lib/python3.2/dist-packages/pip-8.1.2-py3.2.egg/pip/download.py",
line 36, in <module>
from pip.utils.ui import DownloadProgressBar, DownloadProgressSpinner File
"/usr/local/lib/python3.2/dist-packages/pip-8.1.2-py3.2.egg/pip/utils/ui.py",
line 15, in <module>
from pip._vendor.progress.bar import Bar, IncrementalBar File "/usr/local/lib/python3.2/dist-packages/pip-8.1.2-py3.2.egg/pip/_vendor/progress/bar.py",
line 48
empty_fill = u'∙'
^ SyntaxError: invalid syntax
我编译了Python3.5,现在尝试运行get-pip.py脚本。但这给了我这个错误:
Traceback (most recent call last): File "get-pip.py", line 19177, in
<module>
main() File "get-pip.py", line 194, in main
bootstrap(tmpdir=tmpdir) File "get-pip.py", line 82, in bootstrap
import pip File "/tmp/tmprewy_1xt/pip.zip/pip/__init__.py", line 16, in <module> File
"/tmp/tmprewy_1xt/pip.zip/pip/vcs/subversion.py", line 9, in <module>
File "/tmp/tmprewy_1xt/pip.zip/pip/index.py", line 30, in <module>
File "/tmp/tmprewy_1xt/pip.zip/pip/wheel.py", line 39, in <module>
File "/tmp/tmprewy_1xt/pip.zip/pip/_vendor/distlib/scripts.py", line
14, in <module> File
"/tmp/tmprewy_1xt/pip.zip/pip/_vendor/distlib/compat.py", line 66, in
<module> ImportError: cannot import name 'HTTPSHandler'
安装了OpenSSL。
我缺少什么想法?
感谢您的帮助。
答案 0 :(得分:0)
好的,排序。
显然我的Python 2.7安装有点损坏。
在我做了uint32_t num = 123456789;
printf("\n num: %"PRIu32 "\n", num);
uint32_t x;
uint8_t a[4];
char b[4];
num=htonl(num);
a[0]=num;
a[1]=num>>8;
a[2]=num>>16;
a[3]=num>>24;
b[0] = a[0];
b[1] = a[1];
b[2] = a[2];
b[3] = a[3];
printf("\nA: %x %x %x %x", a[0],a[1],a[2],a[3]);
printf("\nB: %x %x %x %x", b[0],b[1],b[2],b[3]);
x= b[0] | b[1]<<8 | b[2]<<16 | b[3]<<24;
x=ntohl(x);
printf("\n x vale: %"PRIu32 "\n", x);
}
之后 - 通过一些hick-up - 修复了安装。
之后我重新构建了3.5.1二进制文件,pip3工作正常。