我在Ubuntu 12.04上安装了pip3,输入以下内容:
<DataGridTemplateColumn Header="test">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel>
<ContentControl Content="{Binding status}"
Width="30" Height="30"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
结果,我得到:
sudo apt-get install python3-setuptools
sudo easy_install3 pip
但是当我输入时:
Searching for pip
Best match: pip 9.0.1
Processing pip-9.0.1-py3.2.egg
pip 9.0.1 is already the active version in easy-install.pth
Installing pip script to /usr/local/bin
Installing pip3.2 script to /usr/local/bin
Installing pip3 script to /usr/local/bin
Using /usr/local/lib/python3.2/dist-packages/pip-9.0.1-py3.2.egg
Processing dependencies for pip
Finished processing dependencies for pip
然后我收到此错误消息:
pip3 --version
那么,为什么我会出现这种语法错误?当我尝试使用pip3安装一些软件包时,我也明白了。
注意: 我安装了以下python版本:
Traceback (most recent call last):
File "/usr/local/bin/pip3", line 9, in <module>
load_entry_point('pip==9.0.1', '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-9.0.1-py3.2.egg/pip/__init__.py", line 21, in <module>
from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
File "/usr/local/lib/python3.2/dist-packages/pip-9.0.1-py3.2.egg/pip/_vendor/requests/__init__.py", line 66, in <module>
from .models import Request, Response, PreparedRequest
File "/usr/local/lib/python3.2/dist-packages/pip-9.0.1-py3.2.egg/pip/_vendor/requests/models.py", line 856
http_error_msg = u'%s Client Error: %s for url: %s' % (self.status_code, reason, self.url)
^
SyntaxError: invalid syntax
致以最诚挚的问候,
答案 0 :(得分:0)
尝试:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3-pip
pip3 --version