Questions tagged [external-calls]

Questions on calling external executables, not necessarily through MathLink.

Filter by
Sorted by
Tagged with
1
vote
2answers
71 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
1answer
164 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
0answers
48 views

Alternative for ExternalEvaluate in version <11.2

I have code which uses ExternalEvaluate. Specifically the format using "Command" and ...
4
votes
2answers
232 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]...
0
votes
1answer
51 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
1answer
76 views

Evaluation taking extremely long

I am trying to solve the following: ...
0
votes
0answers
24 views

External Evaluate Conversion method

One can run a command for example in python using ExternalEvaluate ...
1
vote
0answers
34 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
3answers
1k 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
0answers
49 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
0answers
41 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
0answers
60 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
0answers
25 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
1answer
62 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, ...
0
votes
1answer
92 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 ...
0
votes
0answers
29 views

How to use conda environments in StartExternalSession?

I am trying to get a conda python environment to run in Mathematica under Windows. It includes the following packages (in case you want to reproduce): ...
5
votes
1answer
132 views

How to enable WakaTime for the Mathematica front end?

WakaTime is a tool for logging one's coding activities, and now have amazing coverage for code editors. Although I write Wolfram in VS Code, I still spend a lot of time tweaking and testing in the ...
3
votes
0answers
32 views

Can one preset credentials for ServiceConnect[“Twitter”, “New”] to allow wolframscript headless use?

Trying to run some wolframscript code from a server, is it possible to set ServiceConnect credentials in the environmental variables for example?
1
vote
1answer
72 views

ExternalEvaluate Python: Cannot import local file

I am trying to use ExternalEvaluate for a Python session. For some reason I cannot import a file from there that I can import successfully when I call python some ...
0
votes
1answer
71 views

Send plain text out through a COM port (such as Labview, MATlab, Python or even a terminal emulator)

We have purchased a pump. And we would like to control the pump through Mathematica. The furnished has explained to us: ...
1
vote
1answer
51 views

External Controllers - Unexpected Behaviour and Operation

My system has Windows 10 Pro 20H2, Mathematica 11.1.1.0 and the following external controllers plus Loupedeck Live: 1- Why do the following commands work: a) These don't: b) These don't update in ...
1
vote
0answers
34 views

Substitute for MathLink to integrate PARI with Mathematica?

How does one access MathLink with current version of Mathematica? I'm trying to integrate the "computer algebra system" PARI with Mathematica, as documented at https://pari.math.u-bordeaux....
0
votes
0answers
47 views

How to call LabVIEW's .vi files in Mathematica?

I want to use Mathematica to process the data collected by LabVIEW, is there any way to implement Mathematica's call to LabVIEW's .vi files?
0
votes
1answer
67 views

Solving linear systems efficiently

In certain calculation I encountered a system of linear equations in 144 variables, and it takes hours to compute. Most probably the reason is that coefficients are really huge integers (about $10^{50}...
1
vote
0answers
59 views

Problem with RunProcess

I'm trying to use the RunProcess function to run docker on Mac OS using Mathematica. But there is a problem: ...
1
vote
1answer
47 views

External evaluations — selecting one of several Python versions

I have several Python versions installed and registered to Mathematica: FindExternalEvaluators["Python"] When I run the following code which one of ...
3
votes
1answer
76 views

IMO WSTP does not work with the Visual Studio 2019 tools, can you prove otherwise?

Can LINK addtwo.obj addtwotm.obj wstp64i4.lib /OUT:addtwo.exe actually work with Visual Studio 2019 tools, if so how? ...
0
votes
1answer
87 views

Capture screenshot of a certain window given its title

Is there a way to find the handle of a certain window and take a screenshot in Mathematica without having to call external programs? Something that connects with the API for the operating system.
5
votes
2answers
494 views

How to assemble Python abstract syntax trees (AST) in Mathematica?

I would like to assemble Python 'ast.Module' objects inside of Mathematica and then submit them to Python via e.g. ExternalEvaluate["exec(astObject)"]. ...
14
votes
4answers
373 views

Is it possible to call back to Mathematica when using Python through ExternalEvaluate?

ExternalEvaluate makes it possible to call Python code from Mathematica. The Wolfram Client for Python makes it possible to call Mathematica from Python. When using ...
2
votes
1answer
169 views

How to use Python's input() with External Evaluation?

I want to use input() in Python code which runs in the Wolfram Notebook. So I create an external evaluation cell by typing ">" and choosing Python. Then I define this function: ...
2
votes
0answers
18 views

Remove existing ServiceConnect authentication credentials

I am working on a project using the BingSearch ServiceConnect (ServiceConnect["BingSearch"]) and I would like to use a different authentication key then ...
2
votes
0answers
101 views

How to use Mathematica code in LaTeX files?

How can you use Mathematica code in LaTeX files? any similar to A random number is RNUMBER and the square of RNUMBER is RNUMBER^2 appearing numbers instead the capital letters (or Mathematica code) ...
4
votes
0answers
34 views

How to install node modules for external evaluation?

I was hoping for some extra clarity configuring additional modules for use in external evaluation, since there's no mention of this in the the nodejs workflow. It seems mathematica looks only at <...
2
votes
1answer
151 views

Missing Dependencies for Python in Conda in MMA 12.1 in Windows 10

I tried to run python code in MMA 12.1 on my Windows 10 computer. However, it seems that the python in conda has MissingDependencies, as shown below. According to this FAQ thread, https://support....
3
votes
0answers
40 views

How to use ExternalEvaluate in ResourceFunction?

Are there any working examples or best practices for writing ResourceFunction that package or depend on external language code (and package dependencies) through <...
5
votes
0answers
73 views

How to monitor progress with external language code?

I'm trying to figure out how to get tqdm (a python progress monitoring tool) to work with ExternalEvaluate and "ExternalLanguage"...
7
votes
1answer
138 views

How to enable R in ExternalLanguage cell?

Mathematica 12.1 adds support for R in the ExternalLanguage cell. But this does not work out of the box. Mathematica downloads very old RLinkRuntime-Windows-9.0.0.0...
2
votes
0answers
303 views

Opening PDF file on a specific page

Trying to keep track of my Mathematica projects I usually include references to various PDF documents, websites, directories etc. such that I can open them from within the project. In this context I ...
11
votes
1answer
178 views

Installing R libraries for use with ExternalEvaluate?

As of version 12.1, R is an officially supported external language, however, I can't seem to install any packages. I tried using my RStudio: ...
7
votes
1answer
225 views

RegisterExternalEvaluator claims MissingDependencies even though ZMQ is installed

I have an Anaconda Python installation in a non-standard location. So I ran RegisterExternalEvaluator["Python", "path-to-python.exe"] But I got the following ...
10
votes
1answer
184 views

Interfacing Mathematica with Tableau desktop

Are there any known methods or examples of connecting Mathematica with Tableau in any fashion? I'll accept any solution that demonstrates a method of either: Calling Tableau from within Mathematica ...
1
vote
0answers
72 views

How to call the function calculation result of Magma in MMA

Magma is a very useful abstract algebra calculation software.How to call the function calculation result of magma in MMA? ...
2
votes
1answer
96 views

InstallR fails on MacOS 10.15 (Catalina)

Here is code I evaluated and the error message: ...
8
votes
1answer
273 views

ExternalEvaluate[pySys, pyCmd] evaluates to Failure[…]

ExternalEvaluate[pySys, pyCmd] evaluates to Failure[...] every time pyCmd contains some ...
7
votes
0answers
276 views

Failed to start python external session

I use Wolfram Mathematica 12 on Windows 10. Whey I try to register external evaluator RegisterExternalEvaluator["Python", "C:\\Python27\\python.exe"] it fails ...
3
votes
0answers
137 views

Calling custom function from C++

I'm programming a project where I use multivariate symbolic polynomials. At some point I need to perform a PolynomialMod over a prime modulus, but the library GiNaC which I use works only over the ...