Attempt to find and validate the orca executable specified by the `plotly.io.orca.config.executable` property. If the `plotly.io.orca.status.state` property is 'validated' or 'running' then this function does nothing. How it works: - First, it searches the system PATH fo
()
| 897 | # Public orca server interaction functions |
| 898 | # ---------------------------------------- |
| 899 | def validate_executable(): |
| 900 | """ |
| 901 | Attempt to find and validate the orca executable specified by the |
| 902 | `plotly.io.orca.config.executable` property. |
| 903 | |
| 904 | If the `plotly.io.orca.status.state` property is 'validated' or 'running' |
| 905 | then this function does nothing. |
| 906 | |
| 907 | How it works: |
| 908 | - First, it searches the system PATH for an executable that matches the |
| 909 | name or path specified in the `plotly.io.orca.config.executable` |
| 910 | property. |
| 911 | - Then it runs the executable with the `--help` flag to make sure |
| 912 | it's the plotly orca executable |
| 913 | - Then it runs the executable with the `--version` flag to check the |
| 914 | orca version. |
| 915 | |
| 916 | If all of these steps are successful then the `status.state` property |
| 917 | is set to 'validated' and the `status.executable` and `status.version` |
| 918 | properties are populated |
| 919 | |
| 920 | Returns |
| 921 | ------- |
| 922 | None |
| 923 | """ |
| 924 | # Check state |
| 925 | # ----------- |
| 926 | if status.state != "unvalidated": |
| 927 | # Nothing more to do |
| 928 | return |
| 929 | |
| 930 | # Initialize error messages |
| 931 | # ------------------------- |
| 932 | install_location_instructions = """\ |
| 933 | If you haven't installed orca yet, you can do so using conda as follows: |
| 934 | |
| 935 | $ conda install -c plotly plotly-orca |
| 936 | |
| 937 | Alternatively, see other installation methods in the orca project README at |
| 938 | https://github.com/plotly/orca |
| 939 | |
| 940 | After installation is complete, no further configuration should be needed. |
| 941 | |
| 942 | If you have installed orca, then for some reason plotly.py was unable to |
| 943 | locate it. In this case, set the `plotly.io.orca.config.executable` |
| 944 | property to the full path of your orca executable. For example: |
| 945 | |
| 946 | >>> plotly.io.orca.config.executable = '/path/to/orca' |
| 947 | |
| 948 | After updating this executable property, try the export operation again. |
| 949 | If it is successful then you may want to save this configuration so that it |
| 950 | will be applied automatically in future sessions. You can do this as follows: |
| 951 | |
| 952 | >>> plotly.io.orca.config.save() |
| 953 | |
| 954 | If you're still having trouble, feel free to ask for help on the forums at |
| 955 | https://community.plot.ly/c/api/python |
| 956 | """ |