[OS X TeX] How to get xasy to run?

Murray Eisenberg murrayeisenberg at gmail.com
Fri Aug 21 18:14:04 CEST 2020


The corresponding anaconda command is “conda install ….”.

WIth my (ana)conda environment, I already had cson, numpy, and PyQt5.sip installed. Plus pyqt (but not pyqt5).

There’s confusion here: I tried to install pyqt5, but that’s for python 2.7, whereas my anaconda environment is python 3.7. On the other hand, I tried to use pip3, which is the version installed as part of Anaconda; when I tried “pip3 install pyqt5”, it said that it’s already installed in my Anaconda python 3.7 environment.

Very confusing!

On the other hand, pyqt5 is available as a MacPorts port. However, MacPorts lists no port of PyQt5.sip. And even if the latter were available, to switch from using the Anaconda python to the MacPorts python would take some doing: lots of changes would be needed to the order of entries in my PATH.



> On 20 Aug2020, at 9:16 PM, William Slough <wslough at gmail.com> wrote:
> 
> Murray,
> 
> I think the solution to this problem is to install the missing Python packages, as noted in Section 11.1 of the Asymptote documentation. In particular, it indicates a number of packages can be installed like this:
> 
>    pip3 install cson numpy pyqt5 PyQt5.sip
> 
> As a reminder, pip3 is the Python package installer. However, since your Python installation appears to be from Anaconda, I believe it uses its own package manager. You may need to consult the Anaconda documentation to see exactly how to use that, since I do not have first-hand experience with it.
> 
> I am encouraged by the fact that this single "pip3" command was all I needed to turn a broken xasy into a functioning one. (It did have a small problem with a missing font, but this seemed like a small issue.) Thus, I think if you can convince Anaconda to install these missing Python packages you will have similar success.
> 
> Good luck!
> 
> Bill Slough
> 
> On Thu, Aug 20, 2020 at 7:18 PM Murray Eisenberg <murrayeisenberg at gmail.com <mailto:murrayeisenberg at gmail.com>> wrote:
> I tried the MacPorts port of asymptote. But that does not seem to include xasy!
> 
>> On 20 Aug2020, at 6:20 PM, William Slough <wslough at gmail.com <mailto:wslough at gmail.com>> wrote:
>> 
>> Murray,
>> 
>> My guess is that the GUI version, xasy, is not necessarily expected to run "out of the box" from a MacTeX installation, even though the script to start it is present. For what it's worth, I'm still on Mojave and when I tried to run xasy I got a slightly different error when try to run xasy:
>> 
>> Traceback (most recent call last):
>>   File "/Library/TeX/texbin/xasy", line 4, in <module>
>>     import PyQt5.QtWidgets as Qw
>> ModuleNotFoundError: No module named 'PyQt5'
>> 
>> This may not be the answer you are looking for, but I think the simplest way to get it to run is to install it via Macports. If you already use Macports, this will probably be a simple matter to do a "port install." (Using Macports is one of the recommended approaches for OS X given on the Asymptote site. The other is compiling from source, which could be a daunting procedure.)
>> 
>> Bill Slough
>> Eastern Illinois University
>> Mathematics and Computer Science Department (emeritus)
>> Charleston, IL
>> 
>> 
>> On Thu, Aug 20, 2020 at 10:51 AM Murray Eisenberg <murrayeisenberg at gmail.com <mailto:murrayeisenberg at gmail.com>> wrote:
>> My understanding is that the executable asymptote command-line binary is included with MacTeX/TeXLive (2020), along with support packages to use it with TeX. That executable seems to be asy in /Library/TeX/texbin (actually, tracing the link, in /usr/local/texlive/2020/bin/x86_64-darwin). And I can get that to work with the TeXShop Asymptote engine.
>> 
>> MacTeX/TeXLive also include the GUI app xasy, which I want to be able to use without going through TeXShop
>> 
>> QUESTION: How can I get xasy to work (under macOS Catalina)?
>> 
>> If I try to execute xasy at the Terminal command line, I get the error message show below.
>> I did look at the troubleshooting link referenced in the error but still do not see how to proceed. 
>> 
>> I did run the 3-line python script, provided at the end of the troubleshooting page, to check environmental variables. But I don’t have a clue still as to what could be wrong.
>> 
>> $ xasy
>> Traceback (most recent call last):
>>   File "/opt/anaconda3/lib/python3.7/site-packages/numpy/core/__init__.py", line 22, in <module>
>>     from . import multiarray
>>   File "/opt/anaconda3/lib/python3.7/site-packages/numpy/core/multiarray.py", line 12, in <module>
>>     from . import overrides
>>   File "/opt/anaconda3/lib/python3.7/site-packages/numpy/core/overrides.py", line 7, in <module>
>>     from numpy.core._multiarray_umath import (
>> ImportError: dlopen(/opt/anaconda3/lib/python3.7/site-packages/numpy/core/_multiarray_umath.cpython-37m-darwin.so <http://multiarray_umath.cpython-37m-darwin.so/>, 2): Library not loaded: @rpath/libopenblas.dylib
>>   Referenced from: /opt/anaconda3/lib/python3.7/site-packages/numpy/core/_multiarray_umath.cpython-37m-darwin.so <http://multiarray_umath.cpython-37m-darwin.so/>
>>   Reason: image not found
>> 
>> During handling of the above exception, another exception occurred:
>> 
>> Traceback (most recent call last):
>>   File "/Library/TeX/texbin/xasy", line 6, in <module>
>>     from Window1 import MainWindow1
>>   File "/usr/local/texlive/2020/texmf-dist/asymptote/GUI/Window1.py", line 10, in <module>
>>     import numpy as np
>>   File "/opt/anaconda3/lib/python3.7/site-packages/numpy/__init__.py", line 140, in <module>
>>     from . import core
>>   File "/opt/anaconda3/lib/python3.7/site-packages/numpy/core/__init__.py", line 48, in <module>
>>     raise ImportError(msg)
>> ImportError: 
>> 
>> IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
>> 
>> Importing the numpy C-extensions failed. This error can happen for
>> many reasons, often due to issues with your setup or how NumPy was
>> installed.
>> 
>> We have compiled some common reasons and troubleshooting tips at:
>> 
>>     https://numpy.org/devdocs/user/troubleshooting-importerror.html <https://numpy.org/devdocs/user/troubleshooting-importerror.html>
>> 
>> Please note and check the following:
>> 
>>   * The Python version is: Python3.7 from "/opt/anaconda3/bin/python3"
>>   * The NumPy version is: "1.19.1"
>> 
>> and make sure that they are the versions you expect.
>> Please carefully study the documentation linked above for further help.
>> 
>> Original error was: dlopen(/opt/anaconda3/lib/python3.7/site-packages/numpy/core/_multiarray_umath.cpython-37m-darwin.so <http://multiarray_umath.cpython-37m-darwin.so/>, 2): Library not loaded: @rpath/libopenblas.dylib
>>   Referenced from: /opt/anaconda3/lib/python3.7/site-packages/numpy/core/_multiarray_umath.cpython-37m-darwin.so <http://multiarray_umath.cpython-37m-darwin.so/>
>>   Reason: image not found
>> 
>> 
>> ---
>> Murray Eisenberg			murrayeisenberg at gmail.com <mailto:murrayeisenberg at gmail.com>
>> 503 King Farm Blvd #101	Home (240)-246-7240
>> Rockville, MD 20850-6667	Mobile (413)-427-5334
>> 
>> 
>> ----------- Please Consult the Following Before Posting -----------
>> TeX FAQ: http://www.tex.ac.uk/faq <http://www.tex.ac.uk/faq>
>> List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/ <https://sites.esm.psu.edu/~gray/tex/>
>> List Archives: http://dir.gmane.org/gmane.comp.tex.macosx <http://dir.gmane.org/gmane.comp.tex.macosx>
>>                 https://email.esm.psu.edu/pipermail/macosx-tex/ <https://email.esm.psu.edu/pipermail/macosx-tex/>
>> TeX on Mac OS X Website: http://mactex-wiki.tug.org/ <http://mactex-wiki.tug.org/>
>> List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex <https://email.esm.psu.edu/mailman/listinfo/macosx-tex>
>> ----------- Please Consult the Following Before Posting -----------
>> TeX FAQ: http://www.tex.ac.uk/faq <http://www.tex.ac.uk/faq>
>> List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/ <https://sites.esm.psu.edu/~gray/tex/>
>> List Archives: http://dir.gmane.org/gmane.comp.tex.macosx <http://dir.gmane.org/gmane.comp.tex.macosx>
>>                https://email.esm.psu.edu/pipermail/macosx-tex/ <https://email.esm.psu.edu/pipermail/macosx-tex/>
>> TeX on Mac OS X Website: http://mactex-wiki.tug.org/ <http://mactex-wiki.tug.org/>
>> List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex <https://email.esm.psu.edu/mailman/listinfo/macosx-tex>
> 
> ---
> Murray Eisenberg			murrayeisenberg at gmail.com <mailto:murrayeisenberg at gmail.com>
> 503 King Farm Blvd #101	Home (240)-246-7240
> Rockville, MD 20850-6667	Mobile (413)-427-5334
> 
> 

---
Murray Eisenberg			murrayeisenberg at gmail.com
503 King Farm Blvd #101	Home (240)-246-7240
Rockville, MD 20850-6667	Mobile (413)-427-5334


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/macostex-archives/attachments/20200821/dbc4b999/attachment-0001.html>
-------------- next part --------------
----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex


More information about the macostex-archives mailing list.