简体   繁体   English

无法在PyDev中创建Django项目

[英]Cannot create Django Project in PyDev

I am running Eclipse Kepler 4.3 with PyDev 3.0 on Ubuntu 12.04 LTE. 我在Ubuntu 12.04 LTE上运行带有PyDev 3.0的Eclipse Kepler 4.3。 I have default Python 2.7 installed. 我安装了默认的Python 2.7。 I have installed Django with: 我已经安装了Django:

sudo pip install django

I have installed PyDev from update site and configured interpreter with Quick Auto-Config. 我从更新站点安装了PyDev,并使用Quick Auto-Config配置了解释器。 I can see /usr/local/lib/python2.7/dist-packages path in Libraries section where Django is installed. 我可以在安装Django的Libraries部分看到/usr/local/lib/python2.7/dist-packages路径。

I can create normal PyDev projects successfully and I can see django package in System Libs. 我可以成功创建普通的PyDev项目,我可以在System Libs中看到django包。 But when I try to create PyDev Django project, 'Next' and 'Finish' buttons are disabled. 但是当我尝试创建PyDev Django项目时,“Next”和“Finish”按钮被禁用。 So I can't create the project. 所以我无法创建项目。 I am not seeing any error but the buttons stay disabled for any project name. 我没有看到任何错误,但按钮保持禁用任何项目名称。

Is this a PyDev bug or a mistake in interpreter configuration? 这是PyDev错误还是解释器配置中的错误? Can anyone suggest how to resolve it? 任何人都可以建议如何解决它?

Update: I have just got it working. 更新:我刚刚开始工作。 If I create a simple PyDev project and keep it in workspace. 如果我创建一个简单的PyDev项目并将其保留在工作区中。 After that I can create PyDev Django projects successfully. 之后我可以成功创建PyDev Django项目。 But if I delete simple PyDev project, it stops working again. 但是,如果我删除简单的PyDev项目,它将再次停止工作。 So for a workaround, I have created a dummy PyDev project and kept it in my workspace. 因此,为了解决方法,我创建了一个虚拟PyDev项目并将其保存在我的工作区中。 However, it would be good if someone can suggest a proper solution. 但是,如果有人能提出适当的解决方案,那将是件好事。

As stated by Fabio above, it was a bug in PyDev. 如上面的Fabio所述,这是PyDev中的一个错误。 It has now been corrected (thanks Fabio) 现在已经纠正了(谢谢Fabio)

To make it working: 为了使它工作:

  1. Add Pydev Nightly builds to your update sites 将Pydev Nightly版本添加到您的更新站点
  2. Upgrade to build 3.2.1 (stable versions 3.2.0.x or lower do not include the fix) 升级到版本3.2.1(稳定版本3.2.0.x或更低版本不包括修复)

It worked for me 它对我有用

Env: ENV:

  • Ubuntu 13.10 Ubuntu 13.10
  • Eclipse 4.2.2 Eclipse 4.2.2
  • Python interpreters 2.7 & 3.3 Python解释器2.7和3.3

I was able to solve this by installing the "nightly build" version of Pydev as per Jan's suggestion. 根据Jan的建议,我能够通过安装Pydev的“夜间构建”版本来解决这个问题。

Steps: 1) Uninstall any previous versions from Eclipse (Help > Install New Software ...already installed > Select pydev and uninstall 步骤:1)从Eclipse中卸载以前的任何版本(帮助>安装新软件...已安装>选择pydev并卸载

2) Install the new version (Help > Install new software > Add ... > Enter Name: "Pydev Nightly", Location: " http://nightly.aptana.com/pydev/site.xml " 2)安装新版本(帮助>安装新软件>添加...>输入名称:“Pydev Nightly”,位置:“ http://nightly.aptana.com/pydev/site.xml

3) Install and restart. 3)安装并重新启动。 You should now be able to go File > New > Other... > PyDev > Pydev Project 你现在应该可以去File> New> Other ...> PyDev> Pydev Project

In my case it worked with PyDev 4.5 就我而言,它适用于PyDev 4.5

Open Eclipse Kepler. 打开Eclipse Kepler。 Go to > Help > Install New Software. 转到>帮助>安装新软件。

Click on Add.. Add a new repository 单击Add ..添加新存储库

Name: pydev4.5 名称:pydev4.5

Location: https://dl.bintray.com/fabioz/pydev/4.5.0/ 地点: https//dl.bintray.com/fabioz/pydev/4.5.0/

Click on Ok 点击确定

Wait few seconds and it shows PyDev package above. 等几秒钟,它显示上面的PyDev包。 Select PyDev, click on Next and go on 选择PyDev,单击Next继续

It works for me. 这个对我有用。

Upgrade PyDev. 升级PyDev。 I have been running with the same problem when update Django to 1.5. 将Django更新为1.5时,我一直在运行同样的问题。 Even the folder structure of projects is different. 甚至项目的文件夹结构也不同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM