Closed max1mvs closed 1 year ago
Instructions included in the latest build of Ortho4XP recommend to instal Python this way: brew install python
Thank you. So downloading from python.org is not recommended? Seems counter-intuitive… But then again, I'm only a hobbyist here. Thanks for clarifying.
You are welcome!
According to "Install_instructions.txt", downloading Python from org was never recommended for Linux and OSX.
(BTW: Problems regarding numpy and Shapely were discussed below)
I have used OrthoXP previously (XP11), and I believe I managed using a "regular" Python install there. I must learn to read up on the instructions… 😁
Did exactly as in the "Install_instructions.txt". But now with the following error to boot:
Traceback (most recent call last):
File "/Applications/Ortho4XP-master/Ortho4XP_v130.py", line 9, in <module>
import O4_Imagery_Utils as IMG
File "/Applications/Ortho4XP-master/./src/O4_Imagery_Utils.py", line 6, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
The installation script ended with
Successfully installed charset-normalizer-3.3.0 idna-3.4 pillow-10.0.1 requests-2.31.0 rtree-1.0.1 shapely-2.0.1 urllib3-2.0.6
… so I guess that 'requests' should have been installed?
Looking at the code in Visual Studio, it says:
Import "requests" could not be resolved from source
A search result guided me to https://www.linkedin.com/pulse/troubleshooting-python-requests-module-import-warning-irshad-n-/ … where he suggests writing import pip._vendor.requests
. I tried this, but I keep getting errors with modules not being installed… First numpy, then PIL…
I then did a complete reinstallation (uninstalled brew and all packages via uninstaller script, then ran the installer for both brew and Ortho4XP again) but with the same result.
Okay. I had messed up symlinks to Python. Using:
% echo 'export PATH=/opt/homebrew/opt/python@3.11/libexec/bin:$PATH' >> ~/.zprofile
% source ~/.zprofile
# For bash use ~/.bash_profile.
… finally solved my issues.
Then, one more problem arose. Shapely & numpy are "too new", so:
% pip3 install shapely==1.8.0
% pip3 install numpy==1.23.5
… makes the batch build work.
And another problem arises. Now this:
Exception in thread Thread-2 (build_tile_list):
Traceback (most recent call last):
File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "/Applications/Ortho4XP-master/./src/O4_Tile_Utils.py", line 170, in build_tile_list
OVL.build_overlay(lat,lon)
File "/Applications/Ortho4XP-master/./src/O4_Overlay_Utils.py", line 64, in build_overlay
f=open(os.path.join(FNAMES.Tmp_dir,FNAMES.short_latlon(lat,lon)+'_tmp_dsf.txt'),'r')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: './tmp/+55+012_tmp_dsf.txt'
I tried installing all versions of the packages as per the "requirements.txt" file being:
certifi==2021.5.30
chardet==4.0.0
idna==2.10
numpy==1.21.0
Pillow==8.2.0
pyproj==3.1.0
requests==2.25.1
Rtree==0.9.7
Shapely==1.7.1
urllib3==1.26.6
But that didn't help.
The following errors are from the Ortho4XP window:
WARNING: Triangle4XP could not achieve the requested quality (min_angle), most probably due to an uncatched OSM error.
It will be tempted now with no angle constraint (i.e. min_angle=0).
ERROR: Triangle4XP really couldn't make it !
If the reason is not due to the limited amount of RAM please
file a bug including the .node and .poly files that you
will find in /Users/massimo/Library/Application Support/Steam/steamapps/common/X-Plane 12/Custom Scenery/zOrtho4XP_+55+012.
_________________________________________________________________________________________________
Step 2.5 : Building masks for tile +55+012 :
--------
ERROR: Mesh file /Users/massimo/Library/Application Support/Steam/steamapps/common/X-Plane 12/Custom Scenery/zOrtho4XP_+55+012/Data+55+012.mesh absent.
_________________________________________________________________________________________________
Step 3 : Building DSF/Imagery for tile +55+012 :
--------
ERROR: A mesh file must first be constructed for the tile!
_________________________________________________________________________________________________
Step 4 : Extracting overlay for tile +55+012 :
--------
-> Making a copy of the original overlay DSF in tmp dir
-> The original DSF is a 7z archive, uncompressing...
-> Converting the copy to text format
-> Selecting overlays for copy/paste
The problem is, one can have several Python installations and packages landing here and there. Check integrity with: "brew doctor" command Verify versions with: "python3 --version", "pip3 list", brew list --versions. PATH to Homebrew must be set up correctly as prompted at the end of Homebrew installation:
Next steps:
Run these two commands in your terminal to add Homebrew to your PATH:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/YOUR FOLDER NAME/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)"
For oscarpilote/Ortho4XP-master on M1/M2 I recommend:
pip3 install certifi==2023.7.22 numpy==1.23.5 Pillow==10.0.0 pyproj==3.6.0 requests==2.31.0 Rtree==1.0.1 shapely==1.8.5 (check if numpy 1.25.2 was installed via Homebrew, uninstall if necessary)
For O4XP updated with PR186 (i.e. Ekaats/Ortho4XP):
pip3 install certifi==2023.7.22 numpy==1.25.2 Pillow==10.0.0 pyproj==3.6.0 requests==2.31.0 Rtree==1.0.1 shapely==2.0.1
I appreciate your help!
Brew refuses to uninstall Numpy because of Gdal, also installed via Brew. Should both of these be uninstalled? Should I be correct in assuming you should not have the same packages installed in both brew & pip3?
2 options:
Install updated Ortho4XP i.e. https://github.com/ekaats/Ortho4XP
Alternatively: (Updated info) pip3 install numpy==1.23.5 pip3 install Shapely==1.8.5
Thank you once more. Installed updated Ortho4XP (Ekaats/Ortho4XP) and your recommended packages. But I still get the same error...Brew integrity was checked and all versions/lists are okay.
Yes, I see now. Neither Triangle4XP or nvcompress is working on Sonoma and it is not a Gatekeeper problem, not M1 native vs Intel problem either. I currently don't know how to enable Triangle4XP and nvcompress on Sonoma.
Ah ok. So it is Sonoma that is the culprit… I am grateful you went to such lengths to troubleshoot; thank you. I must await some fix for this, then. Is there a way I can file an issue, or should this thread here suffice, even if it is a tad messy in terms of me not having a proper installation in the first place?
Executables are now just executables - not apps!
Open Ortho4XP/Utils/ folder, delete Linux executable "Triangle4XP"( black icon), rename "Triangle4XP.app" (cross-hair icon) into "Triangle4XP". Open file Ortho4XP/src/04_Mesh_Utils.py with a plain text editor like "Textedit" or (much better and free) "BBEdit". Find and rename "Triangle4XP.app" to "Triangle4XP" (line 18) (triangle.app and moulinette.app require same steps but are seldom in use )
In /Utils/nvcompress/ folder, rename "nvcompress.app" to just "nvcompress" Open Ortho4XP/src/04_Imagery_Utils.py with a plain text editor, find and rename "nvcompress.app" to just "nvcompress"
Repeat similar steps for DSFTool.app in Ortho4XP/Utils/ folder and /src/O4_Overlay_Utils.py file To clear Gatekeeper - just drag and drop Triangle4XP into Terminal, hit enter, "Cancel", go to settings, privacy and security, click "Open anyway", repeat. Same steps for nvcompress and DSFTools
It is also possible to remove .app extension, click on Triangle4XP, clear Gatekeeper as usual, then add .app extension
Enjoy!
Hello,
I had the same problem as Max1mvs but for an Intel Mac, and I was therefore following the progress of the solution to his problem with great interest. So I've just made the changes you suggest w8sl, and I'm delighted to tell you that it worked for me and that I'm now generating the tiles I couldn't build. So a big thank you to you and congratulations on finding and fixing this bug. Best Regards.
It seems to work like a charm! Awesome! Thank you for your help and effort! 🙌⭐️🕺
Thank you all for nice feedback!
I have dropped OSX14_fix.py renaming script into second branch on my fork. It is compatible with any branch. Works from main Ortho4XP folder.
Update: Thank you @MortyMars for suggestion! To simplify things, script was finally renamed to: Filename_fix_macOS.py as it seems to work on several latest versions of macOS. .app extension added to simple executable files is just not accepted anymore with macOS 14
Best regards,
Hi w8sl,
Thanks for this script correction. If I may say so, in order to be as close as possible to the real target and the recognized standard names, I would have named your file 'macOS14_fix.py'. But that's for sure, I'm quibbling ;-) Best regards
I was happy to see this thread! Previously I was only able to run it after switching to newer builds of Python but then Triangle4XP would always fail. Now I get through all the steps, but on two different tiles I have tried so far, there's a bunch of Errors that it's unable to convert a number of textures to dds. It appears to be downloading the jpgs, but just failing in the conversion process. Is it nvcompress that does that part? Anyone else having this issue?
Do you mean post #186 build? I have seen some tile dependent problems before. Trying to fix them on my fork. There is also a problem with Pillow 10.0.1. Latest working is 10.0.0 (it is necessary to delete and re-download jpegs)
I’m using your latest branch that includes the macOS 14 fix file, which I ran. I downgraded Pillow to 10.0.0, but still fails to convert a bunch of the textures. Last few lines of the output look like this:
WARNING: Could not convert texture ./build/Tiles/zOrtho4XP_-01-079/textures/32848_18512Arc16.dds WARNING: Could not convert texture ./build/Tiles/zOrtho4XP-01-079/textures/131328_73904Arc18.dds WARNING: Could not convert texture ./build/Tiles/zOrtho4XP-01-079/textures/32784_18560Arc16.dds WARNING: Could not convert texture ./build/Tiles/zOrtho4XP-01-079/textures/131312_73920Arc18.dds ERROR: Could not convert texture ./build/Tiles/zOrtho4XP-01-079/textures/32848_18512Arc16.dds (10 tries) ERROR: Could not convert texture ./build/Tiles/zOrtho4XP-01-079/textures/131328_73904Arc18.dds (10 tries) ERROR: Could not convert texture ./build/Tiles/zOrtho4XP-01-079/textures/32784_18560Arc16.dds (10 tries) ERROR: Could not convert texture ./build/Tiles/zOrtho4XP-01-079/textures/131312_73920_Arc18.dds (10 tries)
All the best,
Noah
On Oct 11, 2023 at 09:43:52, w8sl @.***> wrote:
Do you mean post #186 https://github.com/oscarpilote/Ortho4XP/pull/186 build? I have seen some tile dependent problems before. Trying to fix them on my fork. There is also a problem with Pillow 10.0.1. Latest working is 10.0.0
— Reply to this email directly, view it on GitHub https://github.com/oscarpilote/Ortho4XP/issues/210#issuecomment-1758090688, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFWFQWLALYFDO2OXCWLYDLX63EERANCNFSM6AAAAAA5S3SL6Q . You are receiving this because you commented.Message ID: @.***>
I have tried Progressive -01-079 zl14-18 with BI (just faster) with no problems. Not necessary same settings - may try better tomorrow. All jpegs downloaded with Pillow 10.0.1 must be deleted. These are not compatible with nvcompress, for same reason. I have not tried with convert. May be interesting - if you have many files: brew install imagemagick "True" --> in line 47 of O4_Imagery_Utils.py, dds_convert_cmd = "convert" -->in line 49
Sweet, it was the version of Pillow; after I deleted the previously downloaded images, it’s working now!
All the best,
Noah
On Oct 11, 2023 at 12:26:52, w8sl @.***> wrote:
I have tried Progressive -01-079 zl14-18 with BI (just faster) with no problems. Not necessary same settings - may try better tomorrow. All jpegs downloaded with Pillow 10.0.1 must be deleted. These are not compatible with nvcompress, for same reason. I have not tried with convert. May be interesting - if you have many files: brew install imagemagick "True" --> in line 47 of O4_Imagery_Utils.py, dds_convert_cmd = "convert" -->in line 49
— Reply to this email directly, view it on GitHub https://github.com/oscarpilote/Ortho4XP/issues/210#issuecomment-1758392750, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFWFQTMSZZNSONA3CCC3GLX63XHZANCNFSM6AAAAAA5S3SL6Q . You are receiving this because you commented.Message ID: @.***>
I went through this post but could not find a way to solve my issue : trying to install Ortho4XP on my M1 Mac under Sonoma, I succeeeded in installing homebrew but brew could not install pyproj 2.6.1, see below : hervekrotoff@macstudiorv ~ % pip3 install pyproj==2.6.1 Collecting pyproj==2.6.1 Using cached pyproj-2.6.1.tar.gz (528 kB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [54 lines of output]
finally succeeded in loading all modules but executing Ortho4xp returned this error :
ile "/opt/homebrew/Cellar/python@3.11/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/tkinter/init.py", line 38, in
any clue on how to solve this?
Thanks much!!!
here is what is installed : Package Version
certifi 2023.7.22 charset-normalizer 3.3.2 Cython 3.0.5 GDAL 3.7.2 idna 3.4 numpy 1.26.1 Pillow 10.1.0 pip 23.3.1 protobuf 4.25.0 pyproj 3.6.2.dev0 requests 2.31.0 Rtree 1.1.0 setuptools 68.2.2 shapely 2.0.2 urllib3 2.0.7 wheel 0.41.3
OK tried some adjustments by installing older versions of some components made it finally
Hi,
Obviously, some summary is needed. It is necessary to follow all these steps in the exact order!
To install from scratch (updated Feb 2024):
xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Run these two commands in your terminal to add Homebrew to your PATH:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/YOUR ACCOUNT NAME/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)"
brew install gdal python@3.11 proj spatialindex p7zip python-tk@3.11
pip3.11 install pyproj numpy shapely rtree pillow requests gdal
Also downgrade 2 dependencies: pip3.11 install shapely==1.8.1 pip3.11 install numpy==1.23.5
pip3.11 install scikit-fmm
1.40 requires a copy of X-Plane 12 in order to fetch bathymetry data During the first run of Ortho4XP, configuration variable "custom_overlay_src" should be set to: "../X-Plane 12/Global Scenery/X-Plane 12 Global Scenery" directory
As of Feb 2024 it is necessary to specify Python3.11 !!!
Open terminal, change directory to the main Ortho4XP-master folder and run:
python3.11 Ortho4XP_v130.py or python3.11 Ortho4XP.py
Hi w8sl,
Thank you very much for this summary, which is proving to be indispensable and which we'll have to keep very carefully :-)
Hi All, Thanks so much for this very useful summary. May I add that I had to install a special version of Python (python-tk) to avoid the issue of not finding tkinter (may be only for my config - Mac M1 Max under Sonoma)
Cheers Herve
Le 6 nov. 2023 à 17:31, w8sl @.***> a écrit :
Hi,
Obviously, some summary is needed.
To install from scratch:
install Xcode Command Line Tools: xcode-select --install
Install Homebrew /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Set up PATH Run these two commands in your terminal to add Homebrew to your PATH:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/YOUR FOLDER NAME/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)"
Change directory to Ortho4XP folder and execute in terminal: chmod +x ./install_mac.sh
Run "install_mac.sh" as a script by clicking on it or copy paste contents into terminal, line by line
As of November 2023 - downgrade 3 dependencies:
pip3 install numpy==1.23.5 pip3 install shapely==1.8.5 pip3 install pillow==10.0.0
On macOS 14 it is necessary to remove .app extension as previously described:
210 (comment) https://github.com/oscarpilote/Ortho4XP/issues/210#issuecomment-1753423634
(or use Filename_fix_macOS.py script from my unofficial fork) — Reply to this email directly, view it on GitHub https://github.com/oscarpilote/Ortho4XP/issues/210#issuecomment-1795356672, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDXWR6SDM4OBYIM3PTDZ4F3YDEGELAVCNFSM6AAAAAA5S3SL6SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJVGM2TMNRXGI. You are receiving this because you commented.
Hi All, You are welcome!
@Frenchfly38 - "brew install python-tk" is a part of "install_mac.sh" script included in: https://github.com/oscarpilote/Ortho4XP It has been updated last year.
Great! Thanks for everything Cheers
Le 6 nov. 2023 à 20:51, w8sl @.***> a écrit :
Hi All, You are welcome!
@Frenchfly38 https://github.com/Frenchfly38 - "brew install python-tk" is a part of "install_mac.sh" script included in: https://github.com/oscarpilote/Ortho4XP It has been updated last year.
Number of incompatible packages may be growing with time. We need to start using: pip3 install -r ./requirements.txt
Contents of requirements.txt file (confirmed to work with Python 3.11.* on macOS and Windows):
certifi==2023.7.22 numpy==1.23.5 Pillow==10.0.0 pyproj==3.6.0 requests==2.31.0 Rtree==1.0.1 shapely==1.8.5
— Reply to this email directly, view it on GitHub https://github.com/oscarpilote/Ortho4XP/issues/210#issuecomment-1796229896, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDXWR6SP7XXMIWGPUH77CZDYDE5TLAVCNFSM6AAAAAA5S3SL6SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJWGIZDSOBZGY. You are receiving this because you were mentioned.
Hi,
Obviously, some summary is needed. It is necessary to follow all these steps in the exact order!
To install from scratch (updated Feb 2024):
- install Xcode Command Line Tools (copy paste line below into terminal):
xcode-select --install
- Install Homebrew (copy paste the whole line below, including quotes, into terminal):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Set up PATH
Run these two commands in your terminal to add Homebrew to your PATH:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/YOUR ACCOUNT NAME/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)"
- Execute in terminal:
brew install gdal python@3.11 proj spatialindex p7zip python-tk@3.11
- Execute in terminal:
pip3.11 install pyproj numpy shapely rtree pillow requests gdal
- In order to run Orto4XP 1.30 on macOS 14 it is necessary to remove .app extension as previously described: Problems with installation on M2 Mac / Sonoma #210 (comment)
Also downgrade 2 dependencies: pip3.11 install shapely==1.8.1 pip3.11 install numpy==1.23.5
- For Ortho4XP 1.4, skip step 6 and execute in terminal:
pip3.11 install scikit-fmm
As of Feb 2024 it is necessary to specify Python3.11 !!!
Open terminal, change directory to the main Ortho4XP-master folder and run:
python3.11 Ortho4XP_v130.py or python3.11 Ortho4XP.py
This step by step solved all issues I had with a couple of hours of testing. Would be so much helpful to have this on the README page linked!
Disclaimer: I am not well versed in Python/Brew/Terminal. I am only an X-Plane hobbyist.
I have followed all the instructions included in the latest build of Ortho4XP, but I get the following errors when running Ortho4XP:
/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pyproj/crs/crs.py:141: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6 in_crs_string = _prepare_from_proj_string(in_crs_string) /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pyproj/crs/crs.py:141: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6 in_crs_string = _prepare_from_proj_string(in_crs_string) Traceback (most recent call last): File "/Applications/Ortho4XP-master/Ortho4XP_v130.py", line 9, in <module> import O4_Imagery_Utils as IMG File "/Applications/Ortho4XP-master/src/O4_Imagery_Utils.py", line 28, in <module> import O4_Vector_Utils as VECT File "/Applications/Ortho4XP-master/src/O4_Vector_Utils.py", line 5, in <module> from rtree import index File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/rtree/__init__.py", line 9, in <module> from .index import Index, Rtree # noqa ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/rtree/index.py", line 17, in <module> from . import core File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/rtree/core.py", line 74, in <module> rt = finder.load() ^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/rtree/finder.py", line 118, in load raise OSError("Could not load libspatialindex_c library") OSError: Could not load libspatialindex_c library