oscarpilote / Ortho4XP

A scenery generator for the X-Plane flight simulator
503 stars 205 forks source link

Problems with installation on M2 Mac / Sonoma #210

Closed max1mvs closed 1 year ago

max1mvs commented 1 year ago

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

w8sl commented 1 year ago

Instructions included in the latest build of Ortho4XP recommend to instal Python this way: brew install python

max1mvs commented 1 year ago

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.

w8sl commented 1 year ago

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)

max1mvs commented 1 year ago

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… 😁

max1mvs commented 1 year ago

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?

max1mvs commented 1 year ago

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.

max1mvs commented 1 year ago

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.

max1mvs commented 1 year ago

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.

max1mvs commented 1 year ago

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
w8sl commented 1 year ago

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:

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

max1mvs commented 1 year ago

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?

w8sl commented 1 year ago

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

max1mvs commented 1 year ago

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.

w8sl commented 1 year ago

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.

max1mvs commented 1 year ago

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?

w8sl commented 1 year ago

Executables are now just executables - not apps!

  1. 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 )

  2. 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!

MortyMars commented 1 year ago

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.

max1mvs commented 1 year ago

It seems to work like a charm! Awesome! Thank you for your help and effort! 🙌⭐️🕺

w8sl commented 1 year ago

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,

MortyMars commented 1 year ago

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

shizumaat commented 1 year ago

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?

w8sl commented 1 year ago

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)

shizumaat commented 1 year ago

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: @.***>

w8sl commented 1 year ago

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

shizumaat commented 1 year ago

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: @.***>

Frenchfly38 commented 1 year ago

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]

:8: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html Error compiling Cython file: ------------------------------------------------------------ ... bint free_context_on_error, ) except *: """ Setup the context for pyproj """ proj_log_func(context, NULL, pyproj_log_function) ^ ------------------------------------------------------------ pyproj/_datadir.pyx:40:33: Cannot assign type 'void (void *, int, const char *) except *' to 'PJ_LOG_FUNCTION'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (void *, int, const char *) except *'. Error compiling Cython file: ------------------------------------------------------------ ... proj_context_destroy(context) raise def pyproj_global_context_initialize(): proj_log_func(NULL, NULL, pyproj_log_function) ^ ------------------------------------------------------------ pyproj/_datadir.pyx:52:30: Cannot assign type 'void (void *, int, const char *) except *' to 'PJ_LOG_FUNCTION'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (void *, int, const char *) except *'. Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/33/krzc6xsx30xbydhyyt9w1lnh0000gn/T/pip-build-env-re1c88rh/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/33/krzc6xsx30xbydhyyt9w1lnh0000gn/T/pip-build-env-re1c88rh/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires self.run_setup() File "/private/var/folders/33/krzc6xsx30xbydhyyt9w1lnh0000gn/T/pip-build-env-re1c88rh/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 507, in run_setup super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script) File "/private/var/folders/33/krzc6xsx30xbydhyyt9w1lnh0000gn/T/pip-build-env-re1c88rh/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 341, in run_setup exec(code, locals()) File "", line 243, in File "", line 159, in get_extension_modules File "/private/var/folders/33/krzc6xsx30xbydhyyt9w1lnh0000gn/T/pip-build-env-re1c88rh/overlay/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize cythonize_one(*args) File "/private/var/folders/33/krzc6xsx30xbydhyyt9w1lnh0000gn/T/pip-build-env-re1c88rh/overlay/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one raise CompileError(None, pyx_file) Cython.Compiler.Errors.CompileError: pyproj/_datadir.pyx [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. hervekrotoff@macstudiorv ~ %
Frenchfly38 commented 1 year ago

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 import _tkinter # If this fails your Python may not be configured for Tk ^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named '_tkinter'

any clue on how to solve this?

Thanks much!!!

Frenchfly38 commented 1 year ago

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

Frenchfly38 commented 1 year ago

OK tried some adjustments by installing older versions of some components made it finally

w8sl commented 1 year ago

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):

  1. install Xcode Command Line Tools (copy paste line below into terminal):

xcode-select --install

  1. 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)"

  1. 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)"

  1. Execute in terminal:

brew install gdal python@3.11 proj spatialindex p7zip python-tk@3.11

  1. Execute in terminal:

pip3.11 install pyproj numpy shapely rtree pillow requests gdal

  1. In order to run Orto4XP 1.30 on macOS 14 it is necessary to remove .app extension as previously described: https://github.com/oscarpilote/Ortho4XP/issues/210#issuecomment-1753423634

Also downgrade 2 dependencies: pip3.11 install shapely==1.8.1 pip3.11 install numpy==1.23.5

  1. For Ortho4XP 1.4, skip step 6 and execute in terminal:

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

MortyMars commented 1 year ago

Hi w8sl,

Thank you very much for this summary, which is proving to be indispensable and which we'll have to keep very carefully :-)

Frenchfly38 commented 1 year ago

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.

w8sl commented 1 year ago

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.

Frenchfly38 commented 1 year ago

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.

scriptPilot commented 7 months ago

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):

  1. install Xcode Command Line Tools (copy paste line below into terminal):

xcode-select --install

  1. 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)"

  1. 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)"

  1. Execute in terminal:

brew install gdal python@3.11 proj spatialindex p7zip python-tk@3.11

  1. Execute in terminal:

pip3.11 install pyproj numpy shapely rtree pillow requests gdal

  1. 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

  1. 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!