简体   繁体   English

ubuntu 14.04,eclipse Neon,python 2.7,Django 1.9,Pydev和virtualenv的配置不会创建src文件夹

[英]Config for ubuntu 14.04, eclipse Neon, python 2.7, Django 1.9, Pydev and virtualenv doesn't create src folder

Coming from PHP, I'm an absolute beginner with Python/Django. 来自PHP,我绝对是Python / Django的初学者。 I have successfully installed a virtual environment. 我已经成功安装了虚拟环境。 So I can see a result with localhost:8000 and localhost:8000/admin. 所以我可以看到localhost:8000和localhost:8000 / admin的结果。 (Standard SQLITE) (标准SQLITE)

The folders lie with user rights in /home/.../django-test. 这些文件夹位于/home/.../django-test中,具有用户权限。 The python environment is in folder django-test/searchem, the first Django instance is django-test/django1. python环境位于django-test / searchem文件夹中,第一个Django实例为django-test / django1。

As I wrote this works. 当我写这篇作品时。

In eclipse (pydev) I have 2 python interpreters: 在Eclipse(pydev)中,我有2个python解释器:

  • /usr/bin/python2.7 -> called Python 2.7 /usr/bin/python2.7->称为Python 2.7
  • /home/XXX/searchem/bin/python2.7 -> called python 2.7 django /home/XXX/searchem/bin/python2.7->称为python 2.7 django

For the latter the shown libraries are: 对于后者,显示的库为:

  • xxx/searchem/lib/python2.7 xxx / searchem / lib / python2.7
  • xxx/searchem/lib/python2.7/lib-dynload xxx / searchem / lib / python2.7 / lib-dynload
  • /usr/lib/python2.7 /usr/lib/python2.7
  • /usr/lib/python2.7/plat-i368-linux-gnu /usr/lib/python2.7/plat-i368-linux-gnu
  • xxx/searchem/lib/python2.7/site-packages xxx / searchem / lib / python2.7 / site-packages
  • /usr/lib/python2.7/lib-tk /usr/lib/python2.7/lib-tk
  • xxx/searchem/local/lib/python2.7/site-packages xxx / searchem / local / lib / python2.7 / site-packages

The built-ins are a lot! 内置很多! Predefinded, Environment, String Substitution Variables are empty. 预定义,环境,字符串替换变量为空。

Then I create a PyDev Django Project. 然后,我创建一个PyDev Django项目。 But no matter where the workspace is definded, or if I chose "Add project directory to the PYTHONPATH" or "create src folder and add it to the PYTHONPATH", the result is either an empty src folder or no src-folder: 但是无论工作空间在何处定义,或者无论我选择“将项目目录添加到PYTHONPATH”还是“创建src文件夹并将其添加到PYTHONPATH”,结果都是空src文件夹或没有src文件夹:

eclipse-pydev-virtual-env-no-src-folder eclipse-pydev-virtual-env-no-src文件夹

So what do I do wrong??? 那么我该怎么办?

Sorry for any inconvenience, found now the solution myself! 造成不便之处,敬请原谅。 The usual problems as beginner: I did not know about the naming conventions, so I used - instead _. 初学者通常遇到的问题:我不知道命名约定,所以我使用-代替_。 After finding the error.log from eclipse (I usually use netbeans) I saw the problem. 从eclipse中找到error.log之后(我通常使用netbeans),我看到了问题。 Solution: 2 min, finding the problem: 1 day! 解决方案:2分钟,发现问题:1天!

Will be funny the next weeks ;( 接下来的几周会很有趣;(

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

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