Skip to main content

Questions tagged [external-calls]

Questions on calling external executables, not necessarily through MathLink.

Filter by
Sorted by
Tagged with
3 votes
1 answer
92 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 ...
Yao Li's user avatar
  • 111
1 vote
1 answer
36 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 ...
Joshua Schrier's user avatar
2 votes
0 answers
37 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 ...
Kirill Belov's user avatar
0 votes
0 answers
43 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 ...
Felipe's user avatar
  • 499
1 vote
0 answers
51 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 ...
Sergey Scorin's user avatar
0 votes
1 answer
40 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 ...
Alexey Golyshev's user avatar
1 vote
1 answer
80 views

Removing notebook cache from ExternalEvaluate

Question While working with Python's ExternalEvaluate the intermediate calculation results with Python are stored in the notebook. (...
Anton Antonov's user avatar
2 votes
1 answer
61 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 ...
Adam's user avatar
  • 3,956
1 vote
0 answers
28 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 ...
azerbajdzan's user avatar
  • 18.9k
0 votes
0 answers
24 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 ...
Rudy Potter's user avatar
  • 2,562
1 vote
0 answers
34 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 ...
user13892's user avatar
  • 9,443
0 votes
0 answers
42 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 ...
GregH's user avatar
  • 1,919
1 vote
1 answer
56 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 ...
apg's user avatar
  • 2,155
8 votes
3 answers
829 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: ...
Satoshi Oota's user avatar
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 ...
Azzurro94's user avatar
  • 499
4 votes
1 answer
296 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 ...
Daniel Berkowitz's user avatar
1 vote
0 answers
75 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)) ...
csk 7's user avatar
  • 403
4 votes
1 answer
81 views

Suppress printed output from ExternalEvaluate

ExternalEvaluate likes to print whatever hits stdout or stderr in the course of evaluation. For example, ...
thorimur's user avatar
  • 9,020
1 vote
0 answers
101 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 ...
Asim's user avatar
  • 1,150
3 votes
1 answer
144 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 ...
Doug Kimzey's user avatar
  • 2,279
1 vote
0 answers
65 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 ...
azerbajdzan's user avatar
  • 18.9k
7 votes
2 answers
642 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 ...
Yaroslav Bulatov's user avatar
1 vote
0 answers
76 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?
Irtiza Hassan's user avatar
4 votes
1 answer
78 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} ...
yode's user avatar
  • 26.8k
5 votes
1 answer
226 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 ...
Ben Izd's user avatar
  • 9,319
3 votes
1 answer
70 views

RunProcess : Save directly to Mathematica Variable

I can convert mysource.jpg to myresult.jpg using an external program myprog.exe, and set a ...
imida k's user avatar
  • 4,295
2 votes
0 answers
203 views

Call function defined in Mathematica from Matlab [closed]

Is it possible to call a defined function inside Mathematica like InterpolationFunction[...] from Matlab? Thanks!
Ulrich Neumann's user avatar
1 vote
0 answers
268 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/...
user2757771's user avatar
0 votes
0 answers
67 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. ...
user444's user avatar
  • 2,456
4 votes
1 answer
129 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 ...
Kirill Belov's user avatar
1 vote
0 answers
621 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 ...
Gennaro Arguzzi's user avatar
7 votes
2 answers
412 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 ...
D. Brown's user avatar
  • 304
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 ...
Ondrej Draganov's user avatar
1 vote
1 answer
118 views

How can I temporarily pause Dynamic expressions while external programs are called?

I am displaying a progress bar in my notebook like this: ...
Adalbert Hanßen's user avatar
0 votes
0 answers
84 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 ...
Alexey Popkov's user avatar
5 votes
1 answer
152 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 ...
Alexey Popkov's user avatar
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 ...
Pavel Perikov's user avatar
2 votes
1 answer
138 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 ...
tupoliedro's user avatar
4 votes
2 answers
532 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 ...
Konstantin's user avatar
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, ...
M.R.'s user avatar
  • 31.5k
0 votes
0 answers
64 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: ...
Wisdom's user avatar
  • 1,268
2 votes
0 answers
184 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 <...
Wisdom's user avatar
  • 1,268
2 votes
1 answer
185 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 ...
Davi's user avatar
  • 671
2 votes
0 answers
82 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 ...
TnTech's user avatar
  • 21
1 vote
0 answers
79 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 ...
Adalbert Hanßen's user avatar
3 votes
0 answers
42 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 ...
Grobi Grobsen's user avatar
1 vote
1 answer
167 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 ...
abstract's user avatar
  • 245
1 vote
2 answers
156 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) ...
string's user avatar
  • 167
5 votes
1 answer
275 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, ...
M.R.'s user avatar
  • 31.5k
1 vote
0 answers
63 views

Alternative for ExternalEvaluate in version <11.2

I have code which uses ExternalEvaluate. Specifically the format using "Command" and ...
Kvothe's user avatar
  • 4,491

1
2 3 4 5