我删除了一个pip包,rm -rf命令认为该包将被删除.现在该包已被删除,但它仍然显示在内pip list,我无法将其删除,pip uninstall也无法更新pip install --upgrade.
我想完全删除它.谁能告诉我怎么样?
编辑
包是psycopg2.
如果我尝试卸载:
hammad@hammad-P5QL-E:~$ pip uninstall psycopg2
Can't uninstall 'psycopg2'. No files were found to uninstall.
Run Code Online (Sandbox Code Playgroud)
这是psycopg2所在的目录,/usr/lib/python2.7/dist-packages我rm -rf来自同一目录.
TIA
我的项目在Django 1.5.4上运行,我想升级它.我做了pip install -U -I django,现在pip freeze显示Django 1.6.5(显然django已升级,我在virtualenv)但我的项目仍在使用Django 1.5.4.我该如何使用升级版?
更新:感谢您的评论.我尝试了一切,但遗憾的是没有任何工作,我不得不重新部署应用程序.
希望有人解释为什么会这样.
我是一个新手,我正在django制作一个网络应用程序,在其中我有一个显示任务对象列表的页面.
我想知道如何在不刷新页面的情况下更新此对象列表,这样如果创建了新对象,它将自动显示在页面上.
我对ajax有一些了解但是,我不知道如何实现这个目标.
TIA
AttributeError当我尝试在WebFaction生产服务器上运行以下代码时,我得到一个例外(它在开发中工作):
#forms.py
class UserRegistrationForm(forms.ModelForm):
full_name = forms.CharField(widget=forms.TextInput(attrs={'placeholder':'Your full name'}))
email = forms.CharField(widget=forms.EmailInput(attrs={'placeholder':'Activation email will be sent'}))
password = forms.CharField(widget=forms.PasswordInput)
meal_package = forms.ModelChoiceField(queryset=Package.objects.all(), widget=forms.RadioSelect(), empty_label=None)
mobile = forms.CharField(widget=forms.TextInput(attrs={'placeholder':'You will recieve a call on this number'}))
area_name = forms.CharField(widget=forms.TextInput(attrs={'placeholder':'Name of your area'}))
building_name = forms.CharField(widget=forms.TextInput(attrs={'placeholder':'Name of your building'}))
room_no = forms.CharField(widget=forms.TextInput(attrs={'placeholder':'Your apartment number'}))
class Meta:
model = User
fields = ['full_name', 'email', 'password', 'meal_package' ,'mobile', 'area_name', 'building_name', 'room_no']
Run Code Online (Sandbox Code Playgroud)
这是错误:
File "/home/hammad/webapps/feastymeals/Feasty-Meals/Users/forms.py", line 27, in <module>
class UserRegistrationForm(forms.ModelForm):
File "/home/hammad/webapps/feastymeals/Feasty-Meals/Users/forms.py", line 29, …Run Code Online (Sandbox Code Playgroud)