|
From: Adam D. <ade...@ex...> - 2013-04-03 15:58:50
|
I just tried to install pyjsbsim on a different computer. I have jsbsim
sim installed, with libraries. If I use pip it seems to install fine:
$sudo pip-2.6 install PyJSBSim:
Downloading/unpacking PyJSBSim
Downloading PyJSBSim-0.5.5.tar.gz (60kB): 60kB downloaded
Running setup.py egg_info for package PyJSBSim
Requirement already satisfied (use --upgrade to upgrade): numpy in
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/s
ite-packages (from PyJSBSim)
Installing collected packages: PyJSBSim
Running setup.py install for PyJSBSim
skipping 'cython/fgfdmexec.cpp' Cython extension (up-to-date)
building 'pyjsbsim.jsbsim_cython' extension
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe -O2
-fwrapv -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
-I/usr/local/include/JSBSim
-I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/include/pytho
n2.6 -c cython/fgfdmexec.cpp -o
build/temp.macosx-10.8-x86_64-2.6/cython/fgfdmexec.o
/usr/bin/clang++ -L/opt/local/lib -bundle -undefined dynamic_lookup
build/temp.macosx-10.8-x86_64-2.6/cython/fgfdmexec.o -lJSBSim -o
build/lib.macosx-10.8-x86_64-2.6/pyjsbsim/jsbsim_cython.so
Successfully installed PyJSBSim
Cleaning up...
And pip thinks that it is installed. Pip freeze shows:
$pip-2.6 freeze
PyJSBSim==0.5.5
But, if I then try to use it, it doesn't appear to be installed:
$python
>>> from pyjsbsim import FGFDMExec
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pyjsbsim
And, if I look in my site-packages folder I see these:
pyjsbsim
PyJSBSim-0.5.5-py2.6.egg-info
Any idea how this could be going on? I do have other things that I have
installed with pip that are in my site-package folder and I can import
them in python correctly.
-- Adam
On 3/7/13 2:05 PM, "James Goppert" <jam...@gm...> wrote:
>Here is a quick start at your question:
>
>Dependencies are Cython > 0.18, NumPy.
>
>The easiest way to install everything is:
>
>pip install PyJSBSim
>(of course this requires that you install pip first)
>
>I have it generating BADA files now, see attached for a 737 bada file
>that was produced. This still needs some work probably. But it is a
>great way to see how JSBSim compares with real flight data!
>
>Here is a short example with plotting:
>
>from pyjsbsim import FGFDMExec
>from pylab import *
>
># load
>fdm = FGFDMExec(debug_level=0)
>fdm.load_model("f16")
>
># trim
>fdm.set_property_value("ic/h-agl-ft",1000)
>fdm.set_property_value("ic/vc-kts",400)
>fdm.set_property_value("ic/gamma-deg",0)
>fdm.do_trim(0)
>
># simulate
>(t,y) = fdm.simulate(
> t_final=10,
> dt=0.1,
> record_properties=["position/h-agl-ft", "attitude/theta-deg"])
>
># plot
>title("test")
>xlabel("t, sec")
>ylabel("h-agl, ft")
>plot(t,y["position/h-agl-ft"])
>show()
>
>-James
>
>On Mon, Mar 4, 2013 at 4:46 PM, Agostino De Marco <ago...@un...>
>wrote:
>> Hey James,
>> this looks really interesting. I've looked into the
>> 737_trim.py where you call many times the simplex trim function.
>>
>> It would be cool if we could write some tips to get started
>> with this work environment.
>> Like:
>> How to setup the python environment and which are the
>> suggested additional packages to install (such as numpy).
>> How to start a simulation from Python.
>> How can time histories be plotted (e.g. matplotlib).
>>
>> It would be nice to add these new features to the JSBSim manual.
>>
>> Agostino
>>
>>
>>
>>
>> James Goppert <jam...@gm...> ha scritto:
>>
>>> This is now functional. I am using it to generate BADA tables for
>>> aircraft modeled in JSBSim. There is an example script in
>>> scripts/737_trim.py
>>>
>>> I have interfaced all of the FGFDMExec class. You can do about
>>> anything using the set/get property functions, so not really a need to
>>> interface the rests of the classes, also will keep maintenance
>>> requirements low.
>>>
>>> -James
>>>
>>> On Sat, Mar 2, 2013 at 5:16 PM, James Goppert
>>> <jam...@gm...> wrote:
>>>> I'm working on interfacing JSBSim with Cython. I looked at the
>>>> existing python jsbsim wrapper, but it seemed to be out of date. Also
>>>> cython seems to be much faster.
>>>>
>>>> https://pypi.python.org/pypi/PyJSBSim
>>>>
>>>> -James
>>>
>>>
>>>------------------------------------------------------------------------
>>>------
>>> Everyone hates slow websites. So do we.
>>> Make your web apps faster with AppDynamics
>>> Download AppDynamics Lite for free today:
>>> http://p.sf.net/sfu/appdyn_d2d_feb
>>> _______________________________________________
>>> Jsbsim-devel mailing list
>>> Jsb...@li...
>>> https://lists.sourceforge.net/lists/listinfo/jsbsim-devel
>>> _______________________________________________
>>> The JSBSim Flight Dynamics Model project
>>> http://www.JSBSim.org
>>> _______________________________________________
>>>
>>>
>>>
>>
>>
>>
>> -------------------------------------------------------
>> Agostino De Marco, PhD
>>
>> Assistant Professor
>>
>> Università degli Studi di Napoli Federico II
>>
>> Dipartimento di Ingegneria Industriale - Sezione Aerospaziale
>>
>> Aircraft Design & AeroFlightDynamics Group (ADAG)
>>
>> ** University of Naples Federico II
>> ** Industrial Engineering Department
>> ** Aircraft Design & AeroFlightDynamics Group
>>
>> via Claudio 21, 80125 Napoli - Italy
>> Tel.: +39 0817683323
>> Fax: +39 0817683622
>> Email: ago...@un...
>> Web 1: www.dii.unina.it
>> Web 2: www.adag.unina.it
>> Web 3: www.eolpowergroup.com
>> -------------------------------------------------------
>>
>>
>>
>>-------------------------------------------------------------------------
>>-----
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics
>> Download AppDynamics Lite for free today:
>> http://p.sf.net/sfu/appdyn_d2d_feb
>> _______________________________________________
>> Jsbsim-devel mailing list
>> Jsb...@li...
>> https://lists.sourceforge.net/lists/listinfo/jsbsim-devel
>> _______________________________________________
>> The JSBSim Flight Dynamics Model project
>> http://www.JSBSim.org
>> _______________________________________________
>>
|