Questions tagged [external-calls]
Questions on calling external executables, not necessarily through MathLink.
235 questions
4
votes
1
answer
264
views
How to call Mathematica commands from Maple on same PC without leaving Maple?
I have both Maple and Mathematica installed on same PC (Linux).
I would like to call Mathematica command from inside my Maple worksheet (say Integrate, but it could be any other command) and get back ...
10
votes
1
answer
378
views
How to deal with the zombie apocalypse caused by Python ExternalSessions?
I am working on a Mathematica package for knot theory that combines functionality of several other packages. Two notable examples are SnapPy and Regina. Fortunately, both have a rich Python interface ...
2
votes
0
answers
71
views
RemoteRunProcess failing to establish an SSH connection
I have a notebook with a workflow that I use to update several servers. I have used it many times and I know it works. Until today. For some reason the ...
7
votes
1
answer
309
views
How to use FORM together with Mathematica?
How to use FORM together with Mathematica?
What configuration steps should I do? Any guide is appreciated.
0
votes
0
answers
87
views
External Python evaluator exists, but trying to register causes process not to start
I am trying to register an external installation of Python 3.13 to be usable through ExternalEvaluate in Mathematica v14. After running
FindExternalEvaluators["Python"], I can see the ...
0
votes
0
answers
117
views
Qhull Runtime Error for ConvexHullMesh/ConvexHullRegion under Mathematica Version 14.2 on Red Hat 9.4
Executing the below example from the Mathematica Documentation from the URL
Documentation ConvexHullMesh
let me observe under RHEL 9.4 (Lustre 2.14.0_ddn154) for Mathematica Version 14.2 the ...
5
votes
1
answer
197
views
ExternalEvaluate "Shell" with ssh keeps running forever
I have an ExternalEvaluate ("Shell") that does not return/keeps running. I want to ssh into a server, parse a logfile there and get the resulting values ...
5
votes
1
answer
115
views
WSL from ExternalEvaluate not finishing
UNIX/Linux commands are highly optimized so it is often useful to call them from within Wolfram/Mathematica. Under Windows, a well supported way of running Linux commands is the Windows Subsystem for ...
3
votes
1
answer
176
views
Efficiently converting real data into String and saving to disk via C++ Mathlink
Consider this minimal-example code:
...
2
votes
0
answers
46
views
What is the best way to combine ExternalEvaluate with RemoteRunProcess?
session = StartExternalSession["Python"] starts a python session on the local machine.
...
1
vote
0
answers
84
views
How to apply a function f to the output of external language cell?
I have a External language session of "SQL-JDBC" created and connected to the External language cell:
...
3
votes
1
answer
172
views
How to Convert WLSymbolFactory to Python String?
I'm trying to simulate with python and Mathematica, Python need to generate and save some pictures to the directory of current mma notebook, I know the function that ...
1
vote
1
answer
80
views
Using ExternalObjects for python iterators
Iterators are a common pattern in python. A trivial example is:
example = iter(("apple", "banana", "cherry"))
next(example)
(yes, of ...
2
votes
0
answers
62
views
Checking debug mode in C-code when call CreateLibrary with Debug -> True
I create a C-library and compile it using the tools in LibraryLink. When I create a code binary like this
...
0
votes
0
answers
65
views
Mathematica data to python session
I am doing some work and the last part of it needs to be done in python. All I need is to transfer a list of numeric higher rank tensors that I generated in the mathematica notebook to python. I am ...
1
vote
0
answers
115
views
Connect Wolfram Mathematica to Unity
My question is how to connect Wolfram Mathematica with Unity.
Following the post https://stackoverflow.com/questions/60574542/cant-open-unity-link-in-wolfram-mathematica, I get an error when i try to ...
0
votes
1
answer
90
views
What is the fastest way to change Python environment?
We can see all registered Python environments through FindExternalEvaluators["Python"].
But the user interface will use the last registered one.
How to ...
1
vote
1
answer
150
views
Removing notebook cache from ExternalEvaluate
Question
While working with Python's ExternalEvaluate the intermediate calculation results with Python are stored in the notebook. (...
2
votes
1
answer
137
views
Exported function discovery with LibraryFunction
Many internal calls boil down to invocations like
LibraryFunction["path/to/library", "funcName" , ...]
I'm on a mac, so I can use the ...
1
vote
0
answers
71
views
Python external evaluator missing first print
Can you confirm this bug when evaluating Python code in Mathmatica?
Type > select Python by clicking on the icon on the left then paste the following code and ...
1
vote
0
answers
80
views
How to decide which evaluator is used by ExternalLanguage Cell for a particular language?
By default when I start an ExternalLanguage cell for Shell it starts powershell.exe.
Even ...
0
votes
0
answers
137
views
Using Run on Windows without Command Prompt Opening
I am trying to batch process a large number of files on Windows 10 generated by Mathematica using the Run command. Specifically, I am using Mathematica to create ...
1
vote
1
answer
95
views
Mathematica truncates output from an external python session
I am running an external python session in Mathematica via ExternalEvaluate. It sends commands to the Bloomberg API in command prompt on Microsoft Windows.
I start ...
8
votes
3
answers
1k
views
How to pass values to Python?
I would like to pass Mathematica variable values to Python. But I found that it was not that trivial. For example, a typical way would be:
...
0
votes
0
answers
118
views
Can I connect to Cloud API using Java code?
I have a Java program that connects to a Mathematica Kernel, installed on my computer. I am able to call the APIs and receive the expression results, like to the code below. But is there any cloud ...
4
votes
1
answer
523
views
Executing a Python Jupyter Book .ipynb or . py File in Mathematica 13
I'm trying to execute a .ipynb from Mathematica.
I tried this code ...
1
vote
0
answers
116
views
How to use FunctionCompile and Compile as external definition?
Let's consider the following functions (in $Version: 12.3.0 for Linux x86 (64-bit) (May 10, 2021))
...
4
votes
1
answer
163
views
Suppress printed output from ExternalEvaluate
ExternalEvaluate likes to print whatever hits stdout or stderr in the course of evaluation. For example,
...
1
vote
0
answers
214
views
How to import specific Python Libraries using External Evaluate
I want to use specific python libraries via the Mathematica frontend. This is possible as follows
...
3
votes
1
answer
252
views
Missing dependencies for NodeJS reported by FindExternalEvaluators["NodeJS"]
I am setting up NodeJS for use as an external evaluator in Mathematica 13.1 and am getting a message about missing dependencies.
I am following the steps in the Workflow documented at ...
1
vote
0
answers
89
views
What are ExternalLanguage cells good for? [closed]
You can type > at the beginning of a cell (or right click and choose "insert new cell" - "ExternalLanguage") and then you can choose the ...
7
votes
2
answers
771
views
Getting data into Julia session?
Mathematica has a way of integrating with Julia, and automatically convert Julia outputs into Mathematica objects (Julia seems to have nice support for low-rank approximation). What is the best way to ...
1
vote
0
answers
93
views
Calling Mathematica functions from Node js project. Similar to .NET by making Mathematica Kernel? [closed]
How to call Mathematica functions from my Node js project?
Is there any way I can do it like we do in .NET by making mathematica kernel?
4
votes
1
answer
136
views
How to assign the value to the mma variable when use the ExternalSession?
Of course, I can use the this code:
session = StartExternalSession["Python"];
mmaVar1 = ExternalEvaluate[session, "a=[3,6,4];a"]
{3, 6, 4}
...
5
votes
1
answer
292
views
Use function defined in Mathematica from Matlab
This question is the same as this post which was closed too early to be answered and efforts to reopen it were unsuccessful.
How could we use a defined function inside Mathematica from Matlab?
With ...
3
votes
1
answer
123
views
RunProcess : Save directly to Mathematica Variable
I can convert mysource.jpg to myresult.jpg using an external program myprog.exe, and set a ...
2
votes
0
answers
257
views
Call function defined in Mathematica from Matlab [closed]
Is it possible to call a defined function inside Mathematica like InterpolationFunction[...] from Matlab?
Thanks!
1
vote
0
answers
481
views
Using a Remote Kernel
I'm trying to connect the front end on Mac OS (version 13.0) use a remote (also 13.0) kernel running on an Ubuntu machine. I've followed the basic steps here (https://reference.wolfram.com/language/...
0
votes
0
answers
134
views
Error while using External Evaluator (Python)
In the above screenshot, I've shared the installed and registered version of python. However, when I try to use it, it ends up with an error.
...
4
votes
1
answer
173
views
Change DataStructure (or maybe just a symbol) from JLink/Java program
I try to use JLink and Java program for receiving responses from the abstract WebSocket server. WSS not supported by Wolfram Language now, but I can use this java project + JLink for the creating a ...
1
vote
0
answers
930
views
Creating a function, saving it in a file, and calling it in another file
I'd like to know how to wrap up a function in a file an then how to call it in another file. For example, I've the following long piece of code which is used to create the function PlotExplorer. I ...
7
votes
2
answers
527
views
Calling a Python class function from ExternalEvaluate
I am attempting to use ExternalEvaluate to use some python packages (ARC) to save me some effort in performing the calculations in Mathematica, and for the most part I think it works as intended.
The ...
7
votes
1
answer
196
views
RunProcess computation time steadily increasing for the same command -- what gives?
I am running an externally compiled C++ program using RunProcess, and I encountered a strange thing: when I run the RunProcess ...
1
vote
1
answer
182
views
How can I temporarily pause Dynamic expressions while external programs are called?
I am displaying a progress bar in my notebook like this:
...
0
votes
0
answers
123
views
Failure connecting local MySQL server
I have locally installed and run the latest version of Oracle MySQL Community Server 8.0 on port 3306. I successfully established connections to it from locally installed Oracle MySQL Workbench 8.0 ...
5
votes
1
answer
249
views
Is it possible to run Linux utils from Mathematica using Windows Subsystem for Linux?
I have Windows 10 Professional x64 with WSL2 installed. I've also installed Ubuntu 20.04 LTS from Microsoft Store.
I can type ubuntu2004 in the CMD and get access ...
0
votes
0
answers
79
views
Is it possible to run kernel in address space of another process?
Kernel executables seem to be relatively small wrappers around "dynamic link library" that contains all the functionality of the kernel.
Is it possible to load the kernel (as a dynamic link ...
2
votes
1
answer
191
views
ExternalEvaluate not running the whole Python file
I have the following 'test.py' written in Python:
import numpy as np
f = open('normals.txt', 'r')
content = f.read()
print(content)
and I want to execute it from ...
4
votes
2
answers
665
views
How to transfer a list as a Python function argument
This issue was already discussed here, but the answer is unclear yet.
I use very simple Python function for converting a string list to upper case
...
4
votes
0
answers
121
views
Exporting a DimensionReducerFunction
I need to run my DimensionReducerFunction in a standalone fashion outside of MMA. That is, without calling into a kernel or through an APIFunction.
For example, ...