Python interface x plane 11

Leeft / python279-win-xplane.md

Installing the dependencies that this script needs can be a bit of a pain. Additionally, X-Plane (from my experience) only works well together with one particular Python version, 2.7.9. So here’s what you need to do:

  1. Go to: https://www.microsoft.com/en-us/download/details.aspx?id=44266 and download and install this compiler for Python.
  2. Download Python 2.7.9 64bit from https://www.python.org/downloads/release/python-279/ and make sure to pick the «Windows x86-64 MSI installer» for the 64 bit version. Run the installer you just downloaded to install Python. Most defaults are fine, you can choose a different drive if you really want to. Python isn’t very large though, so your system drive is probably just fine. When installing you are presented with the option to «customise» the installation. Scroll to the bottom and choose «Will be installed on local hard drive» for the «Add python.exe to PATH» option. This’ll make your life a lot easier as there will be less to type, where you can just type python instead of e.g. C:\Python27\python.exe or pip instead of C:\Python27\Scripts\pip.exe .
  3. We need some packages for Python which have to be installed by downloading them and pointing the installer to them. This site can be a bit slow, so you’ll start downloading these files while we continue with other things. Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy and click on and download numpy‑1.11.3+mkl‑cp27‑cp27m‑win_amd64.whl . Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy and click on and download scipy‑0.19.0‑cp27‑cp27m‑win_amd64.whl . Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#basemap and click on and download basemap‑1.1.0‑cp27‑cp27m‑win_amd64.whl . Make sure you know where these files are being downloaded to. Normally that would be C:\Users\Yourusername\Downloads , unless you chose a different path.
  4. We need to update pip (the python package management tool) or not all the steps below will work correctly. Open a «Windows Command Processor», normally accessed by going to the start menu, go to «Run» and then type cmd.exe . You do not need to run the command prompt as an administrator. Now in the command prompt you can type python if you want to make sure it is installed correctly and it was added to the path. Type exit() and hit enter to get out of this again. Type python -m pip install —upgrade pip to update pip itself:
  5. Install some packages that are easy to install: Still in your command prompt, type pip install numpy regex . You should see something like this:
  6. matplotlib should also install correctly at this point: Type pip install matplotlib :
  7. Now we can install the 3 packages we downloaded earlier. You’ll need to provide the path to where you downloaded the files to. Type pip install «C:\Where\The\File\Was\Saved\Filename.whl» for each of these three files:
  8. One more package to install now, this is another «easy» one as everyone we need is installed now. Type pip install nvector (I typed a few more package names just to make sure they were installed):
  9. We’re done. Download the sids+starsGUI_win.py Python script from http://forums.x-plane.org/index.php?/files/file/38286-starssidsgui/ and save it to your X-Plane 11 folder. You should be able to doubleclick this file, which will then start the Python interpreter and after a little while (it has to read the navdata) the program should pop up.
Читайте также:  Html css разметка примеры

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Next Generation Python Interface for X-Plane

License

stormrose-va/FlyWithPython

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

FlyWithPython — New Python Interface for X-Plane

This project repository contains all code of FlyWithPython, a new Python Interface for X-Plane. This project aims at providing a successor for the well-known but abandoned Python Interface by Sandy Barbour.

FlyWithPython is being developed for a couple of reasons, although the legacy Python interface still works. These reasons also form the objectives of this project:

  • Open Source Develoment: Sandy’s work cannot be continued by the community as he decided to keep the sources closed. FlyWithPython on the contrary is Open Source, licensed under one of the most permissive licenses available.
  • Python 3 Compatibility: The latest published legacy Python interface only works with a quite dated version of the Python 2.7 branch. FlyWithPython is designed to bring the latest Python 3 to X-Plane.
  • Improved Encapsulation: The legacy interface relied on a system-wide installed Python interpreter, sometimes creating conflicts with third-party dependencies or simply version mayhem. FlyWithPython bundles a dedicated Python interpreter to avoid such problems.
Читайте также:  Learn python programming hub

Will scripts created for Sandy Barbour’s Python Interface run on FlyWithPython?

FlyWithPython is not a drop-in replacement for the previous Python interface. Thus, most probably existing scripts will not work out of the box with FlyWithPython, but will need some adaptation to the new structures. Furthermore, FlyWithPython will work by default with a Python 3 interpreter, so most probably also the Python code itself will need some love & care before it can run on FlyWithPython.

Will you provide an installer bundle?

We hope there won’t be a need for complex installer bundles. We seek at creating a traditional plugin package which won’t need any third party packages to be installed on your computer. However, our first priority is providing a stable release before thinking about any bundling (that would require some careful studying of licenses not only of Python itself, but of all other 3rd party stuff included to prevent us from being sued for distributing stuff we were not allowed to).

Will you support all three OSes X-Plane runs on?

That is certainly one of our objectives, but this will depend on whether we can get hold of a sufficient number of testers for the different platforms. Particularly Linux could prove to be difficult to be supported due to the high number of flavours, coming all with different versions of the Python interpreter.

Will X-Plane 11 be supported?

Indeed, FlyWithPython is being develped only for X-Plane 11.10 and later versions. This project uses the most recent API SDK (version 3.0) and thus is not compatbile with older X-Plane versions.

For the time being, we cannot tell. FlyWithPython is being developed by volunteers in their leisure time, so the resources we can dedicate to this project are limited.

About

Next Generation Python Interface for X-Plane

Источник

Plugin Installation¶

This version of XPPython3 requires X-Plane 12. If you are using X-Plane 11.52, you must install XPPython3 v3.1.5. See Installation for X-Plane 11.

If you’re upgrading from XPPython v3.1.5, see Upgrading XPPython3 .

Installation¶

Warning

Do not use Python 3.11.1 on Windows. It has a loading bug and will not work.

Version 3.10.x is okay, 3.11.0 is okay, 3.11.2+ is okay.

Читайте также:  Sun certified java programmer scjp

../_images/windows_python_environment.jpg

For Windows

select “Add Python x.x to PATH” (PLEASE. This is the single most common error!)

Choose either “Install Now” or “Customize Installation”, either will work as long as python is added to your path!

For Linux

use your package manager (deb, apt, etc.) install as root, and make sure you also have pip and libpython. (e.g., apt-get install python3-pip ) Check which version of python3 is actually installed, because you’ll need to get that version of XPPython3 plugin: python3 —version .

We search for the matching library along the usual library search path. If you’re using a virtual environment or install a personal copy of python, just make sure it’s visible on the search path.

For Mac

just install directly from python.org.

Questions, see 1. Want to use a different version of python, see Other Versions of Python.

Select zipfile based on the version of python you are using:

For Python 3.11.x

xp311.zip

For Python 3.10.x

xp310.zip

  1. Extract the xp31x.zip into your X-Plane/Resources/plugins folder, such that you have folder there called XPPython3 .

This plugin XPPython3 folder must be placed in /Resources/plugins . On first execution, XPPython3 will create the Resources/plugins/PythonPlugins folder.

You should place any third-party python plugins in that PythonPlugins folder. (On first run of the plugin, XPPython3 will automatically download a set of sample plugins into your Resources/plugins/PythonPlugins/samples folder. To execute a sample, move a plugin up into the PythonPlugins folder.)

You file system layout should match:

/ └─── Resources/ └─── plugins/ └─── XPPython3/ ├─── mac_x64/ | └─── XPPython3.xpl ├─── lin_x64/ | └─── XPPython3.xpl └─── win_x64/ └─── XPPython3.xpl

Extra For Mac

STOP! Before continuing, you need to remove the quarantine. Follow instructions in Mac Quarantine .

If you forget to do this, XPPython3 will not load and you’ll get error popup indicating XPPython3.xpl cannot be opened. See Common Installation Errors .

../_images/python_samples_popup.png

On installation success, we’ll popup a window:

If you have problems with installation

  1. Actually read this page.
  2. Check Common Installation Errors .
  3. If you still have problems with installation provide information described in Getting Support .

If it’s running, get familiar with XPPython3 Menus .

But I already have a copy of python on my computer”. Yes, you probably do. Is it the right version, includes the necessary packages and scripts, and located in the correct location? Maybe, but no one wants to try and debug that, so please: you have the disk space. Download a brand new copy of python, place it in the recommended location and think of it as being used exclusively for X-Plane.

Table of Contents

Источник

Оцените статью