Questions tagged [external-calls]
Questions on calling external executables, not necessarily through MathLink.
213
questions
0
votes
0
answers
53
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
154
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
49
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
52
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
62
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
27
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
...
0
votes
0
answers
22
views
How to set up the default external evaluator for ExternalEvaluate?
I want to use a particular version of Python in ExternalEvaluate. I successfully registered it via RegisterExternalEvaluator. It ...
1
vote
0
answers
32
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
50
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 ...
6
votes
2
answers
438
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
60
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
69
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}
...
4
votes
1
answer
158
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
64
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
195
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
109
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
50
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
102
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
151
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
346
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
107
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
71
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
64
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
100
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
104
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
409
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
83
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
48
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
113
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
147
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
80
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
57
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
36
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
111
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
132
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
217
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
61
views
Alternative for ExternalEvaluate in version <11.2
I have code which uses ExternalEvaluate. Specifically the format using "Command" and ...
4
votes
2
answers
427
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
65
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
92
views
Evaluation taking extremely long
I am trying to solve the following:
...
0
votes
0
answers
47
views
External Evaluate Conversion method
One can run a command for example in python using ExternalEvaluate
...
1
vote
0
answers
57
views
Run a command which has a file parameter when the file path passed contains non-ASCII characters
I want to do run a Linux command from a Mathematica notebook. I see, that Mathematica and my Linux operating system use different character coding.
The problem is that the directories and the file ...
18
votes
3
answers
2k
views
How can I use Python's SciPy and NumPy functions in Mathematica to find the minimum of a function?
I have written my code in Mathematica, final aim of this code is to find the minimum of a function.
I found that FindMinimum and ...
0
votes
0
answers
70
views
Using Mathematica to run an external bash script
This seems like a straightforward problem, but I am having trouble. I have a bash script that runs a parallel process (OpenFoam). I would like to call this script from a Mathematica Module.
Processes ...
2
votes
0
answers
48
views
Exporting packages containing "Python Code" cells
I created a notebook with Python code cells (evaluated using External Evaluate) as can be created by typing > at the beginning of a cell. (And choosing Python ...
3
votes
0
answers
111
views
Create "Python Code" cells using custom executable
In https://mathematica.stackexchange.com/a/155815/45020 it is explained how to run cells using a custom virtual environment. How can I quickly create a cell that is evaluated using this environment. ...
0
votes
0
answers
49
views
ExternalEvaluate Error
I have installed NodeJS.
session = StartExternalSession["NodeJS"];
And I ran the comci.js file. comci.js file URL ( enter link description here)
However, ...
0
votes
1
answer
81
views
How to run JS files using NodeJS?
I have installed NodeJS.
And I ran the comci.js file.
comci.js file URL ( http://naver.me/5MUV22Uj )
After that, I entered the command getTimeTable according to the format and executed it. However, ...
1
vote
1
answer
160
views
How to call Python Methods from Mathematica employing ExternalEvaluate?
This question is about the compatibility of methods written in Python and ExternalEvaluate from Mathematica.
ExternalEvaluate allows Python functions to be called from Mathematica. For example, the ...