Re: [Pydev-users] Setting up Eclipse pydev django development environment
Brought to you by:
fabioz
From: Gary R. <gar...@ve...> - 2016-06-10 18:17:02
|
Hi Bypassing the help screen problem, going to the pydev manual and reading between the lines, I have the following setup working. OS Debian Linux Desktop KDE Eclipse version Neon Tutorial How to tango with rango (python 2.7 and Django 1.7.11) I created a virtual environment file in /opt/python-virtual-environments/py2.7dj1.7.11 I installed eclipse using the eclipse installer ( works great) and selected the php setup. I installed PyDev in Eclipse and setup all of the properties per the PyDev site. Translating the Tango with Django method to Eclipse methods, I managed to set up the following: Twd src Twd __init__py . . wsgi.py dbsqlite3 manage.py python2.7 (/opt/....11/bin/python2.7) II tried several methods for running the equivalent of "python manage.py runserver" specifically - "rt click the top Twd > Django > Run Django Test" and the Run (^F11 on my setup). in both cases the console showed the following: ImportError: Could not import settings 'src/Twd/settings.py' (Is it on sys.path? Is there an import error in the settings file?): Import by filename is not supported. I tried changing the Twd property "PyDev-PYTHONPATH" by adding "..../src/Twd/settings.py". This didn't help. Running "python manage.py runserver" in the terminal works fine. I obviously have some form of path problem but have no idea how to fix it. All help will be sincerely appreciated. Gary R. On 06/08/2016 02:10 PM, Gary Roach wrote: > OK > I ripped out everything and started over. Fabio, the manual you > suggested is a bit out of date. I used the Eclipse_lnstaller and > selected the php installation because it seemed to fit my needs best. > I then installed PyDev and TM Terminal from the Market Place. The > method suggested in the manual no longer exists. I checked the > installation using the Help>About Eclipse>Installation Details path. > Java is set to /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java in the > configuration file. This is correct for Neon. So far so good. > > Since, as I discovered, the terminal plugin is really a clone of my > system terminal, the use of python --version and which python both > point to python2.7, If I run python3 --version or which python3 I get > python 3.5.1. This confused me but I now understand what is going on > here. These versions have nothing to do with what PyDev is set up to > use. That being python 3.5.1. I need to be able to run the import > python, print(sys.version_info) that you suggested. Since I wasn't > sure how to set up a .py file to run in Eclipse, I decided to read > the Create Projects and Files tutorial listed on the welcome screen. A > this point, I ran into a problem. For some reason any link on the > welcome screen loaded a blank copy of Bluefish editor. So I removed > Bluefish from my system, since I don't need it if I am using Eclipse. > I tried again. This time the welcome screen pulled up KimageMapEditor. > Also blank. Can we try to fix this first. > > Gary R. > > > On 06/07/2016 01:39 PM, Fabio Zadrozny wrote: >> PyDev is unaware of this and the PYTHONPATH/PATH are not properly set >> according to your configurations, so, it's expected that this won't work. >> >> Please go through the whole Getting Started manual >> (http://www.pydev.org/manual_101_root.html) and follow the steps >> from configuring the interpreter/project to running the program as it >> should cover all that's needed to run your program (as a note, make >> sure you have focus on the PyDev editor when your press F9 to run it). >> >> Best Regards, >> >> Fabio >> >> On Tue, Jun 7, 2016 at 5:22 PM, Gary Roach <gar...@ve... >> <mailto:gar...@ve...>> wrote: >> >> The terminal is a plugin called TM Terminal. I mimics a standard >> bash terminal but works with the project files. Very handy. >> >> This is the first time that I have tried to run a py file without >> using the command line with python. I am not sure what you mean >> by using F9. This does nothing on my system. The Eclipse menu >> lists run as ^ F11 . I tried several different methods of running >> my test.py file. The only one that worked is python test.py on >> the command line of the terminal. This produced >> sys.version_info(major=2, minor=7, micro=11, >> releaselevel='final', serial=0). Whether I used the plugin >> terminal or my standard bash system terminal made no difference. >> I got the same results both ways. >> >> Gary R. >> >> On 06/07/2016 03:45 AM, Fabio Zadrozny wrote: >>> import sys >>> print(sys.version_info) >>> >> >> >> ------------------------------------------------------------------------------ >> What NetFlow Analyzer can do for you? Monitors network bandwidth >> and traffic >> patterns at an interface-level. Reveals which users, apps, and >> protocols are >> consuming the most bandwidth. Provides multi-vendor support for >> NetFlow, >> J-Flow, sFlow and other flows. Make informed decisions using capacity >> planning reports. >> https://ad.doubleclick.net/ddm/clk/305295220;132659582;e >> _______________________________________________ >> Pydev-users mailing list >> Pyd...@li... >> <mailto:Pyd...@li...> >> https://lists.sourceforge.net/lists/listinfo/pydev-users >> >> >> >> >> ------------------------------------------------------------------------------ >> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic >> patterns at an interface-level. Reveals which users, apps, and protocols are >> consuming the most bandwidth. Provides multi-vendor support for NetFlow, >> J-Flow, sFlow and other flows. Make informed decisions using capacity >> planning reports.https://ad.doubleclick.net/ddm/clk/305295220;132659582;e >> >> >> _______________________________________________ >> Pydev-users mailing list >> Pyd...@li... >> https://lists.sourceforge.net/lists/listinfo/pydev-users > > > > ------------------------------------------------------------------------------ > What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic > patterns at an interface-level. Reveals which users, apps, and protocols are > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > J-Flow, sFlow and other flows. Make informed decisions using capacity > planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e > > > _______________________________________________ > Pydev-users mailing list > Pyd...@li... > https://lists.sourceforge.net/lists/listinfo/pydev-users |