I created a simple, representative example that shows what is going wrong.<br><br>I created a project with directory structure as follows:<br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
/test_workspace<br>&nbsp;&nbsp;&nbsp; /packageOne<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  __init__.py<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  moduleOne.py<br>&nbsp;&nbsp;&nbsp; /packageTwo<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  __init__.py<br></blockquote><br>moduleOne.py is a one-liner:<br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
import packageTwo<br></blockquote><br>I opened moduleOne and told it to run in test_workspace. It broke on the import, and I interactively debugged it. <br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
Python 2.5.1 (r251:54863, Oct&nbsp; 5 2007, 13:36:32) <br>[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on jacob-laptop, Standard<br>&gt;&gt;&gt; &gt;&gt;&gt; <br>&gt;&gt;&gt; import packageTwo<br>Traceback (innermost last):
<br>&nbsp; File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>ImportError: No module named packageTwo<br><br>&gt;&gt;&gt; import sys,os,os.path as p<br>&gt;&gt;&gt; sys.path<br>[u&#39;/home/jacob/test_workspace/packageOne&#39;, &#39;/usr/lib/python2.5/site-packages/eric4/DebugClients/Python&#39;, &#39;/usr/lib/python25.zip&#39;, &#39;/usr/lib/python2.5&#39;, &#39;/usr/lib/python2.5/plat-linux2&#39;, &#39;/usr/lib/python2.5/lib-tk&#39;, &#39;/usr/lib/python2.5/lib-dynload&#39;, &#39;/usr/local/lib/python2.5/site-packages&#39;, &#39;/usr/lib/python2.5/site-packages&#39;, &#39;/usr/lib/python2.5/site-packages/Numeric&#39;, &#39;/var/lib/python-support/python2.5&#39;, &#39;/var/lib/python-support/python2.5/gtk-
2.0&#39;]<br>&gt;&gt;&gt; p.realpath(p.curdir)<br>&#39;/home/jacob/test_workspace&#39;<br>&gt;&gt;&gt; sys.path = sys.path + [&#39;&#39;]<br>&gt;&gt;&gt; sys.path<br>[u&#39;/home/jacob/test_workspace/packageOne&#39;, &#39;/usr/lib/python2.5/site-packages/eric4/DebugClients/Python&#39;, &#39;/usr/lib/python25.zip&#39;, &#39;/usr/lib/python2.5&#39;, &#39;/usr/lib/python2.5/plat-linux2&#39;, &#39;/usr/lib/python2.5/lib-tk&#39;, &#39;/usr/lib/python2.5/lib-dynload&#39;, &#39;/usr/local/lib/python2.5/site-packages&#39;, &#39;/usr/lib/python2.5/site-packages&#39;, &#39;/usr/lib/python2.5/site-packages/Numeric&#39;, &#39;/var/lib/python-support/python2.5&#39;, &#39;/var/lib/python-support/python2.5/gtk-
2.0&#39;, &#39;&#39;]<br>&gt;&gt;&gt; import packageTwo<br>&gt;&gt;&gt; <br></blockquote><br>So it worked after I added the empty path (&#39;&#39;) to eric&#39;s pythonpath.<br><br>Please note that my path in my ordinary system python interpreter is as follows:
<br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">[&#39;&#39;, &#39;/usr/lib/python25.zip&#39;, &#39;/usr/lib/python2.5&#39;, &#39;/usr/lib/python2.5/plat-linux2&#39;, &#39;/usr/lib/python2.5/lib-tk&#39;, &#39;/usr/lib/python2.5/lib-dynload&#39;, &#39;/usr/local/lib/python2.5/site-packages&#39;, &#39;/usr/lib/python2.5/site-packages&#39;, &#39;/usr/lib/python2.5/site-packages/Numeric&#39;, &#39;/var/lib/python-support/python2.5&#39;, &#39;/var/lib/python-support/python2.5/gtk-
2.0&#39;]<br></blockquote><br>Note that it contains the empty path. When I start the system python interpreter in test_workspace, I am able to import packageTwo correctly.<br><br>Conclusions:<br><ol><li>Eric uses a different pythonpath than the one on my system, and excludes some paths from it. In this case, it is the empty path (&#39;&#39;).
<br></li><li>For some reason, the empty path is necessary to import packages that are in the current working directory. I didn&#39;t know this, but I guess that&#39;s how it works.<br></li><li>Because eric excludes the empty path, it is impossible for modules created in packages created in the same directory to import one-another.
</li></ol>I&#39;m not sure if I should file this should be filed as a bug-report, or if this is simply a matter of configuring the pythonpath used by eric. However, I wasn&#39;t able to find a way to configure eric&#39;s pythonpath.
<br>I guess it&#39;s also possible that this is a regression in a recent snapshot (I&#39;m using eric4 4.1-snapshot20071224).<br>I&#39;d greatly appreciate any guidance anyone could offer.<br>Much thanks.<br><br>Jake<br><br>
<div class="gmail_quote">On Dec 30, 2007 3:28 PM, Evren Esat Özkan &lt;<a href="mailto:sleytr@gmail.com">sleytr@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
But you don&#39;t have to. You can import modules from packages located in<br>same folder with your script.<br>As I said before, I removed django from site-packages and relocated to the<br>project folder and it worked.<br>
I can&#39;t imagine any cause for your problem but I think it can&#39;t be related<br>with pythonpath and/or eric&#39;s default settings.<br>May be you should try a clean install of eric4 with a simple test script.<br>(two modules importing one to other.)
<br><div><div></div><div class="Wj3C7c"><br><br><br>On Sun, 30 Dec 2007 22:12:31 +0200, Jake B &lt;<a href="mailto:otakuj462@gmail.com">otakuj462@gmail.com</a>&gt; wrote:<br><br>&gt; Tricky.<br>&gt; I guess maybe the best way to deal this, then is to symlink everything in
<br>&gt; site-packages.<br>&gt; If anyone has any ideas about how else to do this, please let me know.<br>&gt; Thanks.<br>&gt;<br>&gt; Jake<br>&gt;<br>&gt; On Dec 30, 2007 3:08 PM, Evren Esat Özkan &lt;<a href="mailto:sleytr@gmail.com">
sleytr@gmail.com</a>&gt; wrote:<br>&gt;<br>&gt;&gt; It&#39;s sym.linked to site-packages. But just for testing I moved that link<br>&gt;&gt; to the project folder and it worked again.<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; On Sun, 30 Dec 2007 21:53:38 +0200, Jake B &lt;
<a href="mailto:otakuj462@gmail.com">otakuj462@gmail.com</a>&gt; wrote:<br>&gt;&gt;<br>&gt;&gt; &gt; Is your django package installed locally as part of the project, or<br>&gt;&gt; &gt; globally<br>&gt;&gt; &gt; in someplace like /usr/lib?
<br>&gt;&gt; &gt; Please let me know. Thanks.<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; Jake<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; On Dec 30, 2007 2:34 PM, Evren Esat Özkan &lt;<a href="mailto:sleytr@gmail.com">sleytr@gmail.com</a>&gt; wrote:
<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; Hi,<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; I&#39;m using eric for Django based web development for last four months<br>&gt;&gt; but<br>&gt;&gt; &gt;&gt; never used it&#39;s debugging features. I&#39;m not using eric&#39;s shell too
<br>&gt;&gt; &gt;&gt; &nbsp;(`manage.py shell` with ipython is &nbsp;enough for me)<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; But I&#39;m just tried to run one of my projects via running manage.py<br>&gt;&gt; with<br>&gt;&gt; &gt;&gt; `runserver` argument and it succesfuly started &nbsp;the server then
<br>&gt;&gt; printed<br>&gt;&gt; &gt;&gt; all<br>&gt;&gt; &gt;&gt; output to the shell.<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; On 12/30/07, Jake B &lt;<a href="mailto:otakuj462@gmail.com">otakuj462@gmail.com</a>&gt; wrote:
<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; I&#39;m getting a bit confused now, because I&#39;ve added my eric<br>&gt;&gt; workspace<br>&gt;&gt; &gt;&gt; to<br>&gt;&gt; &gt;&gt; &gt; my PYTHONPATH, and can import all the modules in my eric workspace
<br>&gt;&gt; &gt;&gt; from the<br>&gt;&gt; &gt;&gt; &gt; python interpreter run from any directory on my system, but when<br>&gt;&gt; run<br>&gt;&gt; &gt;&gt; from<br>&gt;&gt; &gt;&gt; &gt; within eric, the modules still cannot import one-another. Also, the
<br>&gt;&gt; &gt;&gt; eric<br>&gt;&gt; &gt;&gt; &gt; python interpreter shell cannot import these modules, even though<br>&gt;&gt; &gt;&gt; they are<br>&gt;&gt; &gt;&gt; &gt; part of my project, and on my global PYTHONPATH.
<br>&gt;&gt; &gt;&gt; &gt; Is there a best-practices way of making visible python packages<br>&gt;&gt; that<br>&gt;&gt; &gt;&gt; are<br>&gt;&gt; &gt;&gt; &gt; in the same directory and sharing the same project? If not, is
<br>&gt;&gt; there<br>&gt;&gt; &gt;&gt; a way<br>&gt;&gt; &gt;&gt; &gt; to at least troubleshoot eric to determine what it is using for its<br>&gt;&gt; &gt;&gt; &gt; PYTHONPATH?<br>&gt;&gt; &gt;&gt; &gt; Please let me know. Thanks.
<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; Jake<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; On Dec 30, 2007 11:42 AM, Jake B &lt; <a href="mailto:otakuj462@gmail.com">otakuj462@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt; PyDev has this feature. When you make a new project, it<br>&gt;&gt; &gt;&gt; automatically<br>&gt;&gt; &gt;&gt; &gt; &gt; configures your PYTHONPATH for that project. It also gives you a
<br>&gt;&gt; &gt;&gt; graphical<br>&gt;&gt; &gt;&gt; &gt; &gt; way of adding additional paths to PYTHONPATH, and configuring<br>&gt;&gt; &gt;&gt; PYTHONPATH to<br>&gt;&gt; &gt;&gt; &gt; &gt; reference other projects in the workspace. This makes things much
<br>&gt;&gt; &gt;&gt; easier.<br>&gt;&gt; &gt;&gt; &gt; &gt; Perhaps I could put this in as a feature request.<br>&gt;&gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt; Jake<br>&gt;&gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt; On Dec 30, 2007 7:45 AM, Flavio Coelho &lt; 
<a href="mailto:fccoelho@gmail.com">fccoelho@gmail.com</a> &gt;<br>&gt;&gt; wrote:<br>&gt;&gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; Hi Jake,<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; As far as I know Eric does
<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; not adds project folders to the Python (though it would be an<br>&gt;&gt; &gt;&gt; interesting feature)<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; What I do in my development directories, when I want to import
<br>&gt;&gt; &gt;&gt; from<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; a package sitting elsewhere (which I don&#39;t want to install<br>&gt;&gt; &gt;&gt; globally), is to<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; add a symlink to it to a directory where it will be visible to
<br>&gt;&gt; &gt;&gt; scripts<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; wanting to import it.<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; it is simple and it works for me without having to move or copy
<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; source files.<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; Flávio<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; On 12/29/07, Jake B &lt; 
<a href="mailto:otakuj462@gmail.com">otakuj462@gmail.com</a>&gt; wrote:<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; Hi,<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; I&#39;m trying to use eric4 to debug a django project. To do
<br>&gt;&gt; this,<br>&gt;&gt; I<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; have django checked out of svn, as well as my application<br>&gt;&gt; &gt;&gt; files, and they<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; are all sharing the same workspace. I have directory
<br>&gt;&gt; structure<br>&gt;&gt; &gt;&gt; that looks<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; like this:<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; workspace_eric/<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; &nbsp; &nbsp; django/
<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; bin/<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; ...<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; __init__.py<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; &nbsp; &nbsp; fbproject/
<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; fbapp/<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;__init__.py<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;models.py<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
urls.py<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;views.py<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; __init.py__<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; manage.py<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; 
settings.py<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; urls.py<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; Unfortunately, my modules in fbproject package cannot import<br>&gt;&gt; my
<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; modules in django package, so when I try to start the server<br>&gt;&gt; by<br>&gt;&gt; &gt;&gt; running<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; fbproject/manage.py, giving it the command line argument *
<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; runserver*, and the working directory<br>&gt;&gt; &gt;&gt; /home/jacob/workspace_eric,<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; it throws an error. Is eric supposed to configure my
<br>&gt;&gt; PYTHONPATH<br>&gt;&gt; &gt;&gt; for me? If<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; so, could anyone please let me know what I&#39;m missing?<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; Thanks.<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt;
<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; Jake<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; _______________________________________________<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; Eric mailing list
<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; <a href="mailto:Eric@riverbankcomputing.com">Eric@riverbankcomputing.com</a><br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; <a href="http://www.riverbankcomputing.com/mailman/listinfo/eric" target="_blank">
http://www.riverbankcomputing.com/mailman/listinfo/eric</a><br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; --
<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; Flávio Codeço Coelho<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt;<br>&gt;&gt; ----------------------------------------------------------------<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; &quot;My grandfather once told me that there were two kinds of
<br>&gt;&gt; people:<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; those who do the work and those who take the credit. He told me<br>&gt;&gt; &gt;&gt; to try to be<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; in the first group; there was much less competition.&quot;
<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; Indira Gandhi<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; ====================================<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; registered Linux user # 386432<br>&gt;&gt; &gt;&gt; &gt; &gt; &gt; get counted at 
<a href="http://counter.li.org" target="_blank">http://counter.li.org</a><br>&gt;&gt; &gt;&gt; &gt; &gt; &gt;<br>&gt;&gt; ----------------------------------------------------------------<br>&gt;&gt; &gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; _______________________________________________<br>&gt;&gt; &gt;&gt; &gt; Eric mailing list<br>&gt;&gt; &gt;&gt; &gt; 
<a href="mailto:Eric@riverbankcomputing.com">Eric@riverbankcomputing.com</a><br>&gt;&gt; &gt;&gt; &gt; <a href="http://www.riverbankcomputing.com/mailman/listinfo/eric" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/eric
</a><br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; --<br>&gt;&gt; &gt;&gt; Evren Esat ÖZKAN<br>&gt;&gt; &gt;&gt; <a href="mailto:esat.ozkan@asyanet.com">
esat.ozkan@asyanet.com</a><br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; --<br>&gt;&gt; Evren Esat Özkan<br>&gt;&gt;<br><br><br><br></div></div>--<br><font color="#888888">Evren Esat Özkan<br></font></blockquote></div><br>