Questions tagged [external-calls]
Questions on calling external executables, not necessarily through MathLink.
221
questions
0
votes
1
answer
34
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
72
views
Removing notebook cache from ExternalEvaluate
Question
While working with Python's ExternalEvaluate the intermediate calculation results with Python are stored in the notebook. (...
1
vote
1
answer
38
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
26
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 ...
0
votes
0
answers
21
views
Why is ExternalEvaluate running the command Quantity[471.04`, "Kilobytes"] on RaspberryPi
Raspberry Pi 4B with 32 bit Raspberry Pi OS Full:
Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
Mathematica for Raspberry Pi 13.1
The command
...
0
votes
0
answers
30
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
37
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
52
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 ...
7
votes
3
answers
715
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
74
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
239
views
Executing A Python Jupyter Book .ipynb or . py File From Mathematica 13
I'm trying to execute a .ipynb from Mathematica.
I tried this code ...
1
vote
0
answers
67
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
62
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
93
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
...
0
votes
0
answers
30
views
Troubleshoot DMARC Policy Preventing Emails Being Sent Through Mathematica
I'm trying to a send a large number of emails through Mathematica. Here is a sketch of the code
...
3
votes
1
answer
112
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
59
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
562
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
72
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
76
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
204
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
68
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
201
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
198
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
59
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
113
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
468
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
399
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
116
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
93
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
76
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
137
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
50
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
128
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
484
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
88
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, ...
0
votes
0
answers
57
views
How to extract some information from my email?
I want to search my email inbox by word "subscriber" and then extract some information from results (precisely from the body of each email). So the following steps should be done:
...
2
votes
0
answers
153
views
How to login to Gmail using MailServerConnect[ ]?
I am trying to login to my Gmail account using the built-in function MailServerConnect[] and require help with the process:
Connecting to the Gmail server (using <...
2
votes
1
answer
162
views
Python packages inside Mathematica's notebook: problem with sympy [closed]
With Mathematica's notebook, sometimes I hit the > key at the beginning of a new line and start writing python code.
I can call and use the standard package ...
2
votes
0
answers
81
views
Store Mathematica results in an external rdbms
I want to store Mathematica results in an external rdbms, Postgres specifically.
The Mathematica documentation talks a lot (eg in 'Relational Database Quick Start') about extracting data from external ...
1
vote
0
answers
70
views
Open a Terminal by StartProcess and write commands to it does not work as expected
Probably my expecations are wrong: I want to open a terminal window on my Xubuntu 20.04 system. Then I want to issue the command tail -f ~/M to display the tail of ...
3
votes
0
answers
40
views
Is it possible to change the timeout for ExternalEvaluate?
I am using ExternalEvaluate in Mathematica 12.3.1.0 to do a computation with Jupyter and sagemath as kernel. Everything works fine if the computation finishes within 15 seconds, otherwise I get the ...
1
vote
1
answer
140
views
Running an executable in the shell from Mathematica
I have a txt file called exec.txt, that I have made executable using chmod. Running it from the shell using ./exec.txt works correctly. However, I need to run it from my Mathematica nb file.
Following ...
1
vote
2
answers
151
views
Mathematica-Python interfacing: time lag in importing Python output in Mathematica
GOAL:
I want to do a part of computation in Mathematica, write a text file (I call it INPUT.txt) containing the result from this partial calculation. Then I want to import this text file (INPUT.txt) ...
5
votes
1
answer
249
views
How to run wolfram code from the finder in macos?
I'd like to run wolfram code (probably a .wls script) on a file or set of files by selecting them in the finder and using Right-click > Services.
For example, ...
1
vote
0
answers
62
views
Alternative for ExternalEvaluate in version <11.2
I have code which uses ExternalEvaluate. Specifically the format using "Command" and ...
5
votes
2
answers
540
views
Within Mathematica, how to export the output of python code to the Mathematica expression?
I run some Python code in the external code cell as following:
The above Python code produced the result (as shown with red [1]...
1
vote
1
answer
79
views
Quit Mathematica script (no matter what)
I have a complicated script (not just written by me) that gets called using MathKernel -script script.m. Among others script.m ...
0
votes
1
answer
97
views
Evaluation taking extremely long
I am trying to solve the following:
...
0
votes
0
answers
62
views
External Evaluate Conversion method
One can run a command for example in python using ExternalEvaluate
...