oscarpilote / Ortho4XP

A scenery generator for the X-Plane flight simulator
498 stars 202 forks source link

I noticed this error message on a different OS but that fix did not work for macOS. . . #241

Closed OldSubSailor closed 6 months ago

OldSubSailor commented 6 months ago

I reinstalled everything on my old 2017 iMac, Ventura 13.6, and am now getting a No module named 'skfmm" error message. I tried the install scikit-fmm , but no joy.
Python 3.11

but same for Python 3.9 % pip3.11 list Package Version


certifi 2024.2.2 charset-normalizer 3.3.2 idna 3.6 numpy 1.26.4 pillow 10.2.0 pip 24.0 protobuf 4.25.3 pyproj 3.6.1 requests 2.31.0 Rtree 1.2.0 scikit-fmm 2023.4.2 setuptools 69.1.0 shapely 2.0.1 urllib3 2.2.1 wheel 0.42.0

w8sl commented 6 months ago

pip3.11 install scikit-fmm

OldSubSailor commented 6 months ago

Please note above that I tried that, and it shows up in the listing. Just to verify: % pip3.11 install scikit-fmm Requirement already satisfied: scikit-fmm in /usr/local/lib/python3.11/site-packages (2023.4.2) Requirement already satisfied: numpy>=1.0.2 in /usr/local/lib/python3.11/site-packages (from scikit-fmm) (1.26.4)

and if I use python3.11 to try and run Ortho4, I get the error message.

w8sl commented 6 months ago

You need also run: python3.11 Ortho4XP.py

OldSubSailor commented 6 months ago

crossing wires here, I did all that prior to posting

OldSubSailor commented 6 months ago

I was using a build that was about 2 years old with no issues. but just had to play and alas trashed the old one by mistake.

w8sl commented 6 months ago

Try to comment out "import skfmm" in O4_Mask_Utils.py and see if everything else is working. Just don't use distance masks

OldSubSailor commented 6 months ago

I went back to my branch (https://github.com/OldSubSailor/Ortho4XP) and got the older version that works

OldSubSailor commented 6 months ago

I understand what you are saying, however, what is needed is a real fix to that issue. We have had to comment out things in the past. The directory skfmm is in the site packages directory on the iMac.

w8sl commented 6 months ago

Usually, fix is only possible if someone can reproduce the problem. Is it due to wrong install instructions? Problem with skfmm on a specific platform? There is actually a problem on some linux distros requring build from source.

I can reproduce similar error with Python 3.11 installed twice: via Homebrew (coming with brew install gdal) and directly from org. The solution is to get rid of python from org which is tricky on Mac as there is no uninstaller.

OldSubSailor commented 6 months ago

Ok, there are odd things going on with it commented out. It starts up then I got as far as the Build Imagery / DSF and things went south with dsf and the tile not being active. And I do seem to have a mess of python versions floating around on this iMac that I really do not know what belongs with what.

However the older version does work.

OldSubSailor commented 6 months ago

I went deep into the iMac and got rid of all versions (I even had 3.12)of Python except 3.9. I uncommented the import line and called Ortho and it came up ( version 1.40) as expected. It is getting past this old man's bed time so I did not try running it tonight. Hopefully, I will have time for that tomorrow.

w8sl commented 6 months ago

Default Python 3.9 + 2 versions installed via Homebrew are normal these days. It is easy to control by brew link, brew unlink or brew uninstall commands. The only problem is Python from org. Ortho4XP 1.40 requires XP-12 and configuration variable "custom_overlay_src" should be set to: "../X-Plane 12/Global Scenery/X-Plane 12 Global Scenery" directory in order to fetch bathymetry data. (X-Plane 12 Demo Areas are also working with tile +45-123). The only visible difference between 1.30 and 1.40 is 3D water. There is an option "water-tech: XP11+bathy" which actually is 3D water + XP11 style overlay.

OldSubSailor commented 6 months ago

I am glad that you pointed that out. I did buy XP 12, but it truly taxes this iMac, so I no longer have it installed. So I take it that I actually am at a stopping point seeing as how I only have XP 11 (and simHeaven which works pretty nicely with Ortho4). But what the heck, may as well play with it, I'm retired. In the pip3 listing, I saw that the "install scikit-fmm" shows >> certifi 2024.2.2 rather than scikit-fmm that the python3.11 install did. ALSO that is a good catch on your part regarding Python.Org and you need to point it out in GitHub proper, and then we can close this out I suppose, what do you think?

w8sl commented 6 months ago

Thank you! I will look into this. The goal is to have properly working instructions on GitHub. I have stored original install instructions with suggested changes on my unofficial XP12 branch for now.

OldSubSailor commented 6 months ago

Well, it still will not finish building a tile. I get this at the end: Converting orthophoto(s) to build texture 108144_63280_GO218.dds. Download of textures completed. DDS conversion of textures completed. *Activating DSF file. ERROR : could not rename DSF file, tile is not actived.

Because it is in XP 11 perhaps?

w8sl commented 6 months ago

I think so. You may test with Portland tile an XP12 demo

OldSubSailor commented 6 months ago

I went back to the older version. I had no issues making a tile yesterday day. Today after all the messing around I got the on the terminal. Ortho appeared to lock up or stopped. File "/Users/trav/Ortho4XP-master/./src/O4_Vector_Map.py", line 138, in include_airports APT.smooth_raster_over_airports(tile,dico_airports) File "/Users/trav/Ortho4XP-master/./src/O4_Airport_Utils.py", line 429, in smooth_raster_over_airports for polygon in full_area: TypeError: 'MultiPolygon' object is not iterable

I uninstalled Homebrew and etc and reinstalled, no joy.

scriptPilot commented 6 months ago

Same for me. Downloaded the current master branch, applying the MacOS installation steps in order but receive an error when re-creating a tile: ERROR : could not rename DSF file, tile is not actived.

w8sl commented 6 months ago

I have yesterday updated instructions previously posted on closed issue regarding install on Sonoma. Step 6 is necessary to run 1.30. (Removing app extension is only necessary on Sonoma). For Ventura: pip3.11 install shapely==1.8.1 pip3.11 install numpy==1.23.5 You can also test my unofficial branch: Progressive_XP11 (nvcompress and Triangle4XP without .app extension are included, work on Ventura also) That is what I am still using self. Works with XP11 and XP12. It has several fixes and workarounds. (My XP12 branch works similar to official 1.40 as only GUI was replaced and functions designed by Artesim, with updated syntax were added)

OldSubSailor commented 6 months ago

I was back to Python 3.9, so its back to 11 then. I looked at your branch this morning between preps for Easter Dinner. That is a nice upgrade to the shell script if new folks can, and will, follow your instructions. I am sure that you have seen the issues we have had with the Reading Test Failures, (I was Old Blue Nose in another life) in the X-Plane.org forums.

I installed PY.3.11, and all the pip3.11 installs, including those above with my older Ortho4 version, 2021, and things are running just fine again. I downloaded your Progressive_XP11, will try to get to it/if when time allows before we leave here. My new Mac mini came in last week, so I will also try to get around to installing XP 12 and try messing with Ortho 1.40 when I get back home. I am waaaaay up in the Texas Piney Woods now, and just moved the old iMac here.

I was not going to use Ortho4 here, I had all the files on an external drive back home, but I just could not stand the standard scenery, so I am will make tiles for a few of my favorite places in Louisiana and Texas, 4 I think.

w8sl commented 6 months ago

Thank you again! Your old pull request was first that worked. Homebrew was far from perfect at the time.

OldSubSailor commented 6 months ago

To sum it up then. It was a combination of the Python.org version and my X-Plane 11 with your version 1.40 of Ortho4. We had some incompatible versions of things crashing into each other. For Ventura: X-Plane 11 my old 2021 Ortho4XP will work with Python3.11 and the listing as shown below (installed as per the instructions And yours): % pip3.11 list Package Version


certifi 2024.2.2 charset-normalizer 3.3.2 idna 3.6 numpy 1.23.5 pillow 10.2.0 pip 24.0 protobuf 4.25.3 pyproj 3.6.1 requests 2.31.0 Rtree 1.2.0 setuptools 69.1.0 Shapely 1.8.1 urllib3 2.2.1 wheel 0.42.0

SO WE SHOULD BE ABLE TO CLOSE NOW? or feel free to close with closing comments next then. @w8sl and thank you so much for all your time.

w8sl commented 6 months ago

Looks perfect. You are welcome!