Перейти к контенту
19 / 19 / 2 Регистрация: 15.05.2011 Сообщений: 142 |
|
1 |
|
04.05.2017, 20:14. Показов 24611. Ответов 5
Пробовал прописывать и так —> plot2d(f(x), [x, -%pi, %pi]); и так wxplot2d(sin(x), [x, 0, 2*%pi]); Выдает различные ошибки: Код --> plot2d(f(x), [x, -%pi, %pi]); Maxima encountered a Lisp error: OPEN: Directory #P"C:UsersKORSAR~1AppDataLocalTemp" does not exist Automatically continuing. To enable the Lisp debugger set *debugger-hook* to nil. Код (%i15) wxplot2d(sin(x), [x, 0, 2*%pi]); Maxima encountered a Lisp error: OPEN: Directory #P"C:UsersKORSAR~1AppDataLocalTemp" does not exist Automatically continuing. To enable the Lisp debugger set *debugger-hook* to nil. Код (%i17) plot2d(f(x), [x, -10, 10]); plot2d: expression evaluates to non-numeric value everywhere in plotting range. plot2d: nothing to plot. (%o17) false 2 |
Programming Эксперт 94731 / 64177 / 26122 Регистрация: 12.04.2006 Сообщений: 116,782 |
04.05.2017, 20:14 |
Ответы с готовыми решениями: WxMaxima 2d график Не строится график
5 |
5 / 5 / 1 Регистрация: 26.01.2017 Сообщений: 2 |
|
20.09.2017, 23:43 |
2 |
Здравствуйте. Код maxima_tempdir: "C:UsersИмя пользователяAppDataLocalTemp"; . 2 |
19 / 19 / 2 Регистрация: 15.05.2011 Сообщений: 142 |
|
22.09.2017, 17:23 [ТС] |
3 |
Konstantin_P, благодарю за помощь по вопросу! Миниатюры
0 |
5 / 5 / 1 Регистрация: 26.01.2017 Сообщений: 2 |
|
22.09.2017, 19:22 |
4 |
РешениеВы немного не так задали функцию. Вот так надо: Код /* Можно ещё так (универсально) задать папку для временных файлов. */ maxima_tempdir: "C:WindowsTemp"; /* Вы не поставили двоеточие. */ f(x):=x^2; /* Для графика в этом окне. */ wxplot2d (f(x), [x, -2, 2]); /* Для графика в отдельном окне. */ plot2d (f(x), [x, -2, 2]); В начале этого кода есть ещё один способ (универсальный) задать папку для временных файлов. 3 |
1 / 1 / 0 Регистрация: 01.04.2018 Сообщений: 15 |
|
01.04.2018, 22:23 |
5 |
korsar-pirat, Добрый день, коллега! Интересуюсь — удалось ли решить проблему с Maxima? Я столкнулся с тем же самым. С программой только начинаю работать. 0 |
19 / 19 / 2 Регистрация: 15.05.2011 Сообщений: 142 |
|
16.04.2018, 16:32 [ТС] |
6 |
ANazarov1980, прошу прощения не сразу увидел, но предложенный выше вариант мне тогда помог, надеюсь, как и вам) 0 |
IT_Exp Эксперт 87844 / 49110 / 22898 Регистрация: 17.06.2006 Сообщений: 92,604 |
16.04.2018, 16:32 |
6 |
#installation #maxima
Вопрос:
Я недавно установил Maxima (5.45.0-Windows) на свою 64-разрядную машину с Windows 7, следуя приведенному здесь руководству. Однако, когда я пытаюсь использовать графический интерфейс wxMaxima, при запуске я получаю сообщение об ошибке, в котором говорится, что файл maxima.bat не может быть обнаружен, и это говорит о том, что Maxima была установлена неправильно. Сообщение об ошибке в полном объеме;
«Не могу запустить Maxima. Наиболее вероятной причиной является то, что Maxima не установлена (ее можно загрузить с https://maxima.sourceforge.io) или в диалоге конфигурации wxMaxima неверно указано местоположение Maxima».
Однако в меню Правка-Настройка-Maxima в разделе Программа Maxima у меня есть путь C:maxima-5.45.0binmaxima.bat
, который должен быть правильным. На самом деле, при попытке выполнить команды maxima через promp командной строки или через xmaxima, это работает просто отлично. Графический интерфейс, однако, не распознает мой файл maxima.bat, даже при перемещении его в другое место и «указании пользователем» пути, консоль графического интерфейса застряла на
Maxima Excited...
Restart Maxima with 'Maxima-Restart Maxima'
Но попытка перезапустить Maxima не дает никакого эффекта. Перезапуск всей программы с графическим интерфейсом или запуск ее от имени администратора также не помогает.
Я искал это в Интернете, но все результаты поиска, похоже, касаются установки Linux или ошибки подключения к Интернету, что, похоже, не является моей проблемой здесь.
Комментарии:
1. Привет, отладка проблем с установкой часто бывает довольно сложной. Мой совет-скопируйте ваше сообщение в список рассылки Maxima, где оно привлечет больше внимания и обсуждения. См.: sourceforge.net/projects/maxima/lists/maxima-discuss
2. Та же ошибка здесь даже с версией 5.45.1. maxima.bat отлично работает из командной строки, Xmaxima тоже. Кроме справочной системы Xmaxima. Брандмауэр-это не проблема, я временно отключил его. Я предполагаю, что есть внутренняя проблема с обработкой косой черты и обратной косой черты.
Ответ №1:
я столкнулся с той же проблемой (предыдущие версии, теперь также 5.45.1 в Windows 10). в моем случае это решается путем ручного удаления «файлов конфигурации пользователя» в разделе %USERPROFILE%maxima. эти файлы остались от предыдущей версии и не удалены программой установки.
попробуйте одно из следующих действий, затем снова запустите wxmaxima.
[командная строка] del %USERPROFILE%maxima*.*
[исследователь] C:Users<ваш идентификатор пользователя>maxima
Комментарии:
1. Это не сработало для меня.
Comments
Hello,
I’m new to portable programs, but I just installed Maxima to my USB stick and was testing its plotting features. I encountered an error, notifying me of the following:
Maxima encountered a Lisp error:
OPEN: Directory #P»C:UsersUsernameHereAppDataLocalTempMaximaPortableTemp» does not exist
Automatically continuing.
To enable the Lisp debugger set debugger-hook to nil.
This concerns me for a couple of reasons:
-
I checked my PC and was able to access the folder which it says does not exist
-
I thought that the files which a portable app could make would be via the portable drive, and not on the actual computer. Isn’t that the point of the portability?
At any rate I’m hoping to get a fix soon, because I really only use Maxima for plotting purposes. Is there something incorrect in the installation? Is there a way to set up a temp folder on the USB stick so that it doesn’t write on the PC?
TIA
PS: Forgot to mention
wxMaxima version: 17.10.1
Maxima version: 5.41.0a_dirty
Maxima build date: 2017-10-23 00:00:36
Host type: i686-w64-mingw32
System type:
gcc -mno-cygwin -g -O2 -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -Wno-format-nonliteral -O2 -fexpensive-optimizations -falign-functions=4 -D_WIN32 -DENABLE_UNICODE -I/usr/local/include -DDYNAMIC_FFI -I. -L/usr/local/lib -lintl /usr/local/lib/libreadline.dll.a -L/usr/local/lib -ltermcap /usr/local/lib/libavcall.a /usr/local/lib/libcallback.a -luser32 -lws2_32 -lole32 -loleaut32 -luuid -liconv -L/usr/local/lib -lsigsegv libgnu_cl.a
SAFETY=0 HEAPCODES STANDARD_HEAPCODES GENERATIONAL_GC SPVW_BLOCKS SPVW_MIXED TRIVIALMAP_MEMORY
libsigsegv 2.8
libiconv 1.13
libreadline 6.0 GNU C 3.4.5 (mingw-vista special r3) PC/386
That is a bug in the clisp compiler the next maxima version will ship around.
In wxMaxima’s config dialogue you can add additional command-line parameters. If you are lucky Maxima portable is shipped with a Maxima version compiled with sbcl, as well. If it is the command line parameter
-l sbcl
will work around the problem.
Kind regards,
Gunter.
Am 1. September 2018 02:46:59 MESZ schrieb BenLis213 <notifications@github.com>:
…
Hello,
I’m new to portable programs, but I just installed Maxima to my USB
stick and was testing its plotting features. I encountered an error,
notifying me of the following:
> Maxima encountered a Lisp error:
OPEN: Directory
#P»C:UsersUsernameHereAppDataLocalTempMaximaPortableTemp»
does not exist
Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
This concerns me for a couple of reasons:
1. I checked my PC and was able to access the folder which it says does
not exist
2. I thought that the files which a portable app could make would be
via the portable drive, and not on the actual computer. Isn’t that the
point of the portability?
At any rate I’m hoping to get a fix soon, because I really only use
Maxima for plotting purposes. Is there something incorrect in the
installation? Is there a way to set up a temp folder on the USB stick
so that it doesn’t write on the PC?
TIA
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/andrejv/wxmaxima/issues/1028
—
Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
Ok… …with any luck I now have found a 2nd way to avoid the problem.
Hello,
Thanks for your help. After digging I found the config file and added the parameter. Now it plots like a charm.
Thanks again!
Actually, scratch that. It seemed to work once, but I can’t get the results to replicate. I still get the same error issue.
Does maxima portable forget the «-l sbcl»?
If that isn’t the case I guess the directory doesn’t exist any more.
What does build_info() output when the problem reoccurs?
If nothing works an ugly workaround would be a
maxima_tempdir:"<a path to a writable directory that has shorter names>"
before doing a plot. In the config dialogue there should be a tab with startup commands. One could add the maxima_tempdir line here.
We really need a new maxima release as many issues have been resolved since the last one.
We really need to default to sbcl on Windows I think! #1043 was another fallout from this. And does this still happen is the question. Where does this portable Maxima come from, and is there a nightly of it?
Я новичок в maxima, которую я установил несколько дней назад через brew
на MacOS ARM. следовательно, я не знаю, то ли я нашел баг, то ли фичу, то ли вообще туплю. В следующем примере показана непредвиденная ошибка, которую я получаю:
$ maxima
Maxima 5.46.0 https://maxima.sourceforge.io
using Lisp SBCL 2.3.3
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) load ("distrib");
(%o1) /opt/homebrew/Cellar/maxima/5.46.0_11/share/maxima/5.46.0/share/distrib/
distrib.mac
(%i2) cdf_binomial(4,4,p);
(%o2) 1
(%i3) subst( [S=3], cdf_binomial(S,4,p));
3 2
(%o3) (1 - p) (p + p + p + 1)
(%i4) subst( [S=4], cdf_binomial(S,4,p));
beta_incomplete: beta_incomplete(0,5,1-p) is undefined.
-- an error. To debug this try: debugmode(true);
(%i5)
Я делаю что-то не так здесь? (PS: мое реальное использование будет интегрировать от p до 1, что также вызывает эту проблему.) Существуют ли стандартные обходные пути?
Совет ценится.
1 ответ
Ошибка, которую вы видите, на самом деле является тонким следствием того, как обрабатываются невычисленные условные выражения. (Пример невычисленного условного оператора возвращается cdf_binomial(S, 4, p)
.) Более простой пример ошибки (я создам отчет об ошибке) — это '(if 0 > 0 then 0/0 else inf)
, который сталкивается с ошибкой деления на 0, хотя 0 > 0
ложно.
В качестве обходного пути попробуйте ev(myexpr, S = 4)
, где myexpr
присваивается значение, возвращаемое cdf_binomial(S, 4, p)
.
Этот обход через ev
не нужен, если S
имеет назначенное значение — в этом случае cdf_binomial
возвращает тот или иной случай и не возвращает невычисленное условное выражение. Потребность в специальной обработке возникает, когда cdf_binomial
был вызван с S
, не имеющим назначенного значения, поэтому cdf_binomial
не знал, какую ветвь использовать, и поэтому возвращал невычисленное условное выражение.
0
Robert Dodier
7 Апр 2023 в 22:48
Если кто-то еще сталкивается с этой же проблемой, то здесь решение:
Обязательно следуйте каждому шагу. Иногда, когда вы находитесь на шаге 9b, и вы выходите из среды Maxima, он фактически не создаст файл maxima.core, где ему нужно.
Итак, вы должны следовать следующим простым шагам:
- Перезапустите среду Common Lisp. Повторите шаг 8. Теперь сделайте
(maxima-dump)
Это должно создать maxima.core, и вы можете запускать максимум без каких-либо проблем.
19 / 19 / 2 Регистрация: 15.05.2011 Сообщений: 142 |
|
1 |
|
04.05.2017, 20:14. Показов 24743. Ответов 5
Пробовал прописывать и так —> plot2d(f(x), [x, -%pi, %pi]); и так wxplot2d(sin(x), [x, 0, 2*%pi]); Выдает различные ошибки: Код --> plot2d(f(x), [x, -%pi, %pi]); Maxima encountered a Lisp error: OPEN: Directory #P"C:\Users\KORSAR~1\AppData\Local\Temp\" does not exist Automatically continuing. To enable the Lisp debugger set *debugger-hook* to nil. Код (%i15) wxplot2d(sin(x), [x, 0, 2*%pi]); Maxima encountered a Lisp error: OPEN: Directory #P"C:\Users\KORSAR~1\AppData\Local\Temp" does not exist Automatically continuing. To enable the Lisp debugger set *debugger-hook* to nil. Код (%i17) plot2d(f(x), [x, -10, 10]); plot2d: expression evaluates to non-numeric value everywhere in plotting range. plot2d: nothing to plot. (%o17) false
2 |
Programming Эксперт 94731 / 64177 / 26122 Регистрация: 12.04.2006 Сообщений: 116,782 |
04.05.2017, 20:14 |
Ответы с готовыми решениями: WxMaxima 2d график Не строится график
5 |
5 / 5 / 1 Регистрация: 26.01.2017 Сообщений: 2 |
|
20.09.2017, 23:43 |
2 |
Здравствуйте. Код maxima_tempdir: "C:\Users\Имя пользователя\AppData\Local\Temp"; .
2 |
19 / 19 / 2 Регистрация: 15.05.2011 Сообщений: 142 |
|
22.09.2017, 17:23 [ТС] |
3 |
Konstantin_P, благодарю за помощь по вопросу! Миниатюры
0 |
5 / 5 / 1 Регистрация: 26.01.2017 Сообщений: 2 |
|
22.09.2017, 19:22 |
4 |
РешениеВы немного не так задали функцию. Вот так надо: Код /* Можно ещё так (универсально) задать папку для временных файлов. */ maxima_tempdir: "C:\Windows\Temp"; /* Вы не поставили двоеточие. */ f(x):=x^2; /* Для графика в этом окне. */ wxplot2d (f(x), [x, -2, 2]); /* Для графика в отдельном окне. */ plot2d (f(x), [x, -2, 2]); В начале этого кода есть ещё один способ (универсальный) задать папку для временных файлов.
3 |
1 / 1 / 0 Регистрация: 01.04.2018 Сообщений: 15 |
|
01.04.2018, 22:23 |
5 |
korsar-pirat, Добрый день, коллега! Интересуюсь — удалось ли решить проблему с Maxima? Я столкнулся с тем же самым. С программой только начинаю работать.
0 |
19 / 19 / 2 Регистрация: 15.05.2011 Сообщений: 142 |
|
16.04.2018, 16:32 [ТС] |
6 |
ANazarov1980, прошу прощения не сразу увидел, но предложенный выше вариант мне тогда помог, надеюсь, как и вам)
0 |
IT_Exp Эксперт 87844 / 49110 / 22898 Регистрация: 17.06.2006 Сообщений: 92,604 |
16.04.2018, 16:32 |
6 |
#installation #maxima
Вопрос:
Я недавно установил Maxima (5.45.0-Windows) на свою 64-разрядную машину с Windows 7, следуя приведенному здесь руководству. Однако, когда я пытаюсь использовать графический интерфейс wxMaxima, при запуске я получаю сообщение об ошибке, в котором говорится, что файл maxima.bat не может быть обнаружен, и это говорит о том, что Maxima была установлена неправильно. Сообщение об ошибке в полном объеме;
«Не могу запустить Maxima. Наиболее вероятной причиной является то, что Maxima не установлена (ее можно загрузить с https://maxima.sourceforge.io) или в диалоге конфигурации wxMaxima неверно указано местоположение Maxima».
Однако в меню Правка-Настройка-Maxima в разделе Программа Maxima у меня есть путь C:maxima-5.45.0binmaxima.bat
, который должен быть правильным. На самом деле, при попытке выполнить команды maxima через promp командной строки или через xmaxima, это работает просто отлично. Графический интерфейс, однако, не распознает мой файл maxima.bat, даже при перемещении его в другое место и «указании пользователем» пути, консоль графического интерфейса застряла на
Maxima Excited...
Restart Maxima with 'Maxima-Restart Maxima'
Но попытка перезапустить Maxima не дает никакого эффекта. Перезапуск всей программы с графическим интерфейсом или запуск ее от имени администратора также не помогает.
Я искал это в Интернете, но все результаты поиска, похоже, касаются установки Linux или ошибки подключения к Интернету, что, похоже, не является моей проблемой здесь.
Комментарии:
1. Привет, отладка проблем с установкой часто бывает довольно сложной. Мой совет-скопируйте ваше сообщение в список рассылки Maxima, где оно привлечет больше внимания и обсуждения. См.: sourceforge.net/projects/maxima/lists/maxima-discuss
2. Та же ошибка здесь даже с версией 5.45.1. maxima.bat отлично работает из командной строки, Xmaxima тоже. Кроме справочной системы Xmaxima. Брандмауэр-это не проблема, я временно отключил его. Я предполагаю, что есть внутренняя проблема с обработкой косой черты и обратной косой черты.
Ответ №1:
я столкнулся с той же проблемой (предыдущие версии, теперь также 5.45.1 в Windows 10). в моем случае это решается путем ручного удаления «файлов конфигурации пользователя» в разделе %USERPROFILE%maxima. эти файлы остались от предыдущей версии и не удалены программой установки.
попробуйте одно из следующих действий, затем снова запустите wxmaxima.
[командная строка] del %USERPROFILE%maxima*.*
[исследователь] C:Users<ваш идентификатор пользователя>maxima
Комментарии:
1. Это не сработало для меня.
Вопрос настолько прост, насколько следует из названия, хотя я ограничен тем фактом, что я пытаюсь создать вопрос Moodle STACK и поэтому не могу получить доступ ко всем библиотекам Maxima (и не помещаю выражения в несколько строк в форме question variables
. -field, среди других ограничений, о которых я, вероятно, даже не знаю). Тем не менее, основные операции с матрицей, такие как получение строки матрицы, кажутся доступными.
Есть ли для этой цели готовая функция (документация подразумевает, что ее нет), или мне нужно сделать свою собственную? Из-за упомянутых ограничений сделать это самому может быть невозможно.
Не существует встроенной функции для возврата ненулевых элементов матрицы, хотя есть sublist
и sublist_indices
, которые фильтруют (т. Е. Выбирают элементы в соответствии с предикатом) списка. Как вы ожидаете, что будут выглядеть выходные данные ненулевых матричных элементов? Кажется, было бы просто изобрести такую функцию, учитывая функции фильтрации списка.
— Robert Dodier
25.06.2018 18:42
Я работаю над вопросом симплекс-алгоритма, и было бы очень удобно, если бы я мог выбрать ненулевые элементы из первой строки матрицы решения. Функция maximize_lp
загружена, но ее использование было ограничено системным администратором, поэтому я не могу использовать ее для получения ответа учителя.
— SeSodesa
25.06.2018 20:13
Ответы
1
Ответ принят как подходящий
Хорошо, если предположить, что проблема в том, чтобы «выбрать ненулевые элементы из первой строки матрицы решения». Попробуй это:
sublist (M[1], lambda ([x], notequal (x, 0)));
предполагая, что M
является рассматриваемой матрицей.
Другие вопросы по теме
Comments
Hello,
I’m new to portable programs, but I just installed Maxima to my USB stick and was testing its plotting features. I encountered an error, notifying me of the following:
Maxima encountered a Lisp error:
OPEN: Directory #P»C:UsersUsernameHereAppDataLocalTempMaximaPortableTemp» does not exist
Automatically continuing.
To enable the Lisp debugger set debugger-hook to nil.
This concerns me for a couple of reasons:
-
I checked my PC and was able to access the folder which it says does not exist
-
I thought that the files which a portable app could make would be via the portable drive, and not on the actual computer. Isn’t that the point of the portability?
At any rate I’m hoping to get a fix soon, because I really only use Maxima for plotting purposes. Is there something incorrect in the installation? Is there a way to set up a temp folder on the USB stick so that it doesn’t write on the PC?
TIA
PS: Forgot to mention
wxMaxima version: 17.10.1
Maxima version: 5.41.0a_dirty
Maxima build date: 2017-10-23 00:00:36
Host type: i686-w64-mingw32
System type:
gcc -mno-cygwin -g -O2 -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -Wno-format-nonliteral -O2 -fexpensive-optimizations -falign-functions=4 -D_WIN32 -DENABLE_UNICODE -I/usr/local/include -DDYNAMIC_FFI -I. -L/usr/local/lib -lintl /usr/local/lib/libreadline.dll.a -L/usr/local/lib -ltermcap /usr/local/lib/libavcall.a /usr/local/lib/libcallback.a -luser32 -lws2_32 -lole32 -loleaut32 -luuid -liconv -L/usr/local/lib -lsigsegv libgnu_cl.a
SAFETY=0 HEAPCODES STANDARD_HEAPCODES GENERATIONAL_GC SPVW_BLOCKS SPVW_MIXED TRIVIALMAP_MEMORY
libsigsegv 2.8
libiconv 1.13
libreadline 6.0 GNU C 3.4.5 (mingw-vista special r3) PC/386
That is a bug in the clisp compiler the next maxima version will ship around.
In wxMaxima’s config dialogue you can add additional command-line parameters. If you are lucky Maxima portable is shipped with a Maxima version compiled with sbcl, as well. If it is the command line parameter
-l sbcl
will work around the problem.
Kind regards,
Gunter.
Am 1. September 2018 02:46:59 MESZ schrieb BenLis213 <notifications@github.com>:
…
Hello,
I’m new to portable programs, but I just installed Maxima to my USB
stick and was testing its plotting features. I encountered an error,
notifying me of the following:
> Maxima encountered a Lisp error:
OPEN: Directory
#P»C:\Users\UsernameHere\AppData\Local\Temp\MaximaPortableTemp\»
does not exist
Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
This concerns me for a couple of reasons:
1. I checked my PC and was able to access the folder which it says does
not exist
2. I thought that the files which a portable app could make would be
via the portable drive, and not on the actual computer. Isn’t that the
point of the portability?
At any rate I’m hoping to get a fix soon, because I really only use
Maxima for plotting purposes. Is there something incorrect in the
installation? Is there a way to set up a temp folder on the USB stick
so that it doesn’t write on the PC?
TIA
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/andrejv/wxmaxima/issues/1028
—
Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
Ok… …with any luck I now have found a 2nd way to avoid the problem.
Hello,
Thanks for your help. After digging I found the config file and added the parameter. Now it plots like a charm.
Thanks again!
Actually, scratch that. It seemed to work once, but I can’t get the results to replicate. I still get the same error issue.
Does maxima portable forget the «-l sbcl»?
If that isn’t the case I guess the directory doesn’t exist any more.
What does build_info() output when the problem reoccurs?
If nothing works an ugly workaround would be a
maxima_tempdir:"<a path to a writable directory that has shorter names>"
before doing a plot. In the config dialogue there should be a tab with startup commands. One could add the maxima_tempdir line here.
We really need a new maxima release as many issues have been resolved since the last one.
We really need to default to sbcl on Windows I think! #1043 was another fallout from this. And does this still happen is the question. Where does this portable Maxima come from, and is there a nightly of it?
Я новичок в maxima, которую я установил несколько дней назад через brew
на MacOS ARM. следовательно, я не знаю, то ли я нашел баг, то ли фичу, то ли вообще туплю. В следующем примере показана непредвиденная ошибка, которую я получаю:
$ maxima
Maxima 5.46.0 https://maxima.sourceforge.io
using Lisp SBCL 2.3.3
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) load ("distrib");
(%o1) /opt/homebrew/Cellar/maxima/5.46.0_11/share/maxima/5.46.0/share/distrib/
distrib.mac
(%i2) cdf_binomial(4,4,p);
(%o2) 1
(%i3) subst( [S=3], cdf_binomial(S,4,p));
3 2
(%o3) (1 - p) (p + p + p + 1)
(%i4) subst( [S=4], cdf_binomial(S,4,p));
beta_incomplete: beta_incomplete(0,5,1-p) is undefined.
-- an error. To debug this try: debugmode(true);
(%i5)
Я делаю что-то не так здесь? (PS: мое реальное использование будет интегрировать от p до 1, что также вызывает эту проблему.) Существуют ли стандартные обходные пути?
Совет ценится.
1 ответ
Ошибка, которую вы видите, на самом деле является тонким следствием того, как обрабатываются невычисленные условные выражения. (Пример невычисленного условного оператора возвращается cdf_binomial(S, 4, p)
.) Более простой пример ошибки (я создам отчет об ошибке) — это '(if 0 > 0 then 0/0 else inf)
, который сталкивается с ошибкой деления на 0, хотя 0 > 0
ложно.
В качестве обходного пути попробуйте ev(myexpr, S = 4)
, где myexpr
присваивается значение, возвращаемое cdf_binomial(S, 4, p)
.
Этот обход через ev
не нужен, если S
имеет назначенное значение — в этом случае cdf_binomial
возвращает тот или иной случай и не возвращает невычисленное условное выражение. Потребность в специальной обработке возникает, когда cdf_binomial
был вызван с S
, не имеющим назначенного значения, поэтому cdf_binomial
не знал, какую ветвь использовать, и поэтому возвращал невычисленное условное выражение.
0
Robert Dodier
7 Апр 2023 в 22:48
Если кто-то еще сталкивается с этой же проблемой, то здесь решение:
Обязательно следуйте каждому шагу. Иногда, когда вы находитесь на шаге 9b, и вы выходите из среды Maxima, он фактически не создаст файл maxima.core, где ему нужно.
Итак, вы должны следовать следующим простым шагам:
- Перезапустите среду Common Lisp. Повторите шаг 8. Теперь сделайте
(maxima-dump)
Это должно создать maxima.core, и вы можете запускать максимум без каких-либо проблем.
[решено] Not connected to maxima (при запуске wxMaxima)
Модератор: /dev/random
-
Flaming
- Сообщения: 2579
[решено] Not connected to maxima
У меня почему-то не работает maxima
Если запускаю wxmaxima, то он мне пишет, что процесс maxima завершён, и ничего не работает после этого. Точнее, при каждом действии пишет, что Not connected to maxima!
Если запускать вручную maxima, то выдаёт:
Код: Выделить всё
Maxima 5.14.0 http://maxima.sourceforge.net
Using Lisp SBCL 1.0.14-gentoo
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
Если ввести bug_report, то он ничего не выводит.
Или я чего-то недопонимаю?
-
/dev/random
- Администратор
- Сообщения: 5202
- ОС: Gentoo
Re: [решено] Not connected to maxima
Сообщение
/dev/random » 09.10.2008 23:47
Flaming писал(а): ↑
09.10.2008 23:16
У меня почему-то не работает maxima
Если запускаю wxmaxima, то он мне пишет, что процесс maxima завершён, и ничего не работает после этого. Точнее, при каждом действии пишет, что Not connected to maxima!
Это бывает по многим причинам. 2 самые распространённые:
1) iptables настроен неправильно, блокируя localhost-to-localhost
2) $HOME/.wxMaxima остался от очень старой, несовместимой версии. В этом случае его нужно просто удалить.
Бывают и другие причины. Если это не подойдёт, нужно разбираться подробнее.
-
Flaming
- Сообщения: 2579
Re: [решено] Not connected to maxima
Сообщение
Flaming » 10.10.2008 00:46
Ни то, ни другое не подходит. iptables совсем вырубил — ни на что не повлияло, каталог удалил (хотя его по-моему раньше не было, только сейчас и создался).
Честно говоря, у меня нет даже примерных мыслей, почему не работает… Как я понимаю, maxima не должна эта писать, что она в консоли пишет?
Flaming писал(а): ↑
09.10.2008 23:16
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
-
Portnov
- Модератор
- Сообщения: 1786
- Статус: Матёрый линуксоид
- ОС: Debian testing/unstable
- Контактная информация:
Re: [решено] Not connected to maxima
Сообщение
Portnov » 10.10.2008 10:07
Помнится, в какой-то версии wxmaxima в настройках в поле ‘команда maxima` оказывалось почему-то ‘1’… Но это, похоже, не ваш случай.
Какая версия wxmaxima? Может, просто maxima ‘слишком новая’ для данной wxmaxima.
-
/dev/random
- Администратор
- Сообщения: 5202
- ОС: Gentoo
Re: [решено] Not connected to maxima
Сообщение
/dev/random » 10.10.2008 15:05
Flaming писал(а): ↑
10.10.2008 11:36
Забыл написать, вообще в первую очередь надо было. maxima-5.14.0, wxmaxima-0.7.4
1) У меня те же версии, и проблем нет.
2) А если прописать в maxima= полный путь к maxima?
3) И попробуйте протестировать maxima в серверном режиме (именно в нём она взаимодействует с wxMaxima):
В одном терминале запустите:
nc -l -p 4010
(должен быть установлен пакет net-analyzer/netcat)
Затем в другом:
maxima -s 4010
В перврм терминале должен появиться интерфейс maxima.
4) А xmaxima работает?
-
Flaming
- Сообщения: 2579
Re: [решено] Not connected to maxima
Сообщение
Flaming » 10.10.2008 20:49
/dev/random писал(а): ↑
10.10.2008 15:05
3) И попробуйте протестировать maxima в серверном режиме (именно в нём она взаимодействует с wxMaxima):
В одном терминале запустите:
nc -l -p 4010
(должен быть установлен пакет net-analyzer/netcat)
Затем в другом:
maxima -s 4010В перврм терминале должен появиться интерфейс maxima.
Какой-то результат есть:
Код: Выделить всё
jfa: starting server on port 4010
Maxima encountered a Lisp error:
Name service error in "getaddrinfo": -2 (Имя или служба не известны)
Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.
debugger invoked on a SIMPLE-ERROR in thread #<THREAD "initial thread" {BB7FAC9}>:
Error during processing of --eval option "(cl-user::run)":
attempt to THROW to a tag that does not exist: RETURN-FROM-DEBUGGER
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [CONTINUE] Ignore and continue with next --eval option.
1: [ABORT ] Skip rest of --eval options.
2: Skip to toplevel READ/EVAL/PRINT loop.
3: [QUIT ] Quit SBCL (calling #'QUIT, killing the process).
((LAMBDA (SB-IMPL::E)) #<SB-INT:SIMPLE-CONTROL-ERROR {BC224C1}>)
Если честно, мало что понятно… но ошибка хоть какая есть.
-
/dev/random
- Администратор
- Сообщения: 5202
- ОС: Gentoo
Re: [решено] Not connected to maxima
Сообщение
/dev/random » 11.10.2008 02:27
У меня две версии.
1) Возможно, какой-то баг в sbcl. Можно попробовать пересобрать maxima с использованием clisp вместо sbcl (включается соответствующим use-флагом)
2) Возможно, что-то всё-таки с сетевыми настройками. Например, с hostname.
-
Flaming
- Сообщения: 2579
Re: [решено] Not connected to maxima
Сообщение
Flaming » 02.11.2008 23:02
/dev/random писал(а): ↑
11.10.2008 02:27
2) Возможно, что-то всё-таки с сетевыми настройками. Например, с hostname.
А что с ним может быть не так?
/dev/random писал(а): ↑
11.10.2008 02:27
1) Возможно, какой-то баг в sbcl. Можно попробовать пересобрать maxima с использованием clisp вместо sbcl (включается соответствующим use-флагом)
Попробовал — не помогло. wxmaxima также пишет, что нет коннекта.
-
Flaming
- Сообщения: 2579
Re: [решено] Not connected to maxima
Сообщение
Flaming » 03.11.2008 00:07
Обновил wxmaxima до версии 0.7.6, maxima — 5.16.3 — не помогает.
Вот, с какими юзами собран maxima:
Код: Выделить всё
flaming@gentoo ~ $ equery u maxima
[ Searching for packages matching maxima... ]
[ Colour Code : set unset ]
[ Legend : Left column (U) - USE flags from make.conf ]
[ : Right column (I) - USE flags packages was installed with ]
[ Found these USE variables for sci-mathematics/maxima-5.16.3 ]
U I
+ + X : Adds support for X11
+ + clisp : Add support for GNU ANSI Common Lisp (dev-lisp/clisp)
- - cmucl : Add support for CMU Common Lisp (dev-lisp/cmucl)
- - emacs : Adds support for GNU Emacs
- - gcl : Add support for GNU Common Lisp (dev-lisp/gcl)
- - latex : Adds support for LaTeX (typesetting package)
- - linguas_es : <unknown>
- - linguas_pt : <unknown>
- - linguas_pt_BR : <unknown>
+ + nls : Adds Native Language Support (using gettext - GNU locale utilities)
- - sbcl : Add support for Steel Bank Common Lisp (dev-lisp/sbcl)
- - tk : Adds support for Tk GUI toolkit
+ + unicode : Adds support for Unicode
- - xemacs : Add support for XEmacs
/dev/random писал(а): ↑
10.10.2008 15:05
4) А xmaxima работает?
Команда не найдена.
-
/dev/random
- Администратор
- Сообщения: 5202
- ОС: Gentoo
Re: [решено] Not connected to maxima
Сообщение
/dev/random » 03.11.2008 21:35
Flaming писал(а): ↑
03.11.2008 21:10
/dev/random, у тебя с какими юзами собрано?
Код: Выделить всё
$ eix -I maxima
[I] sci-mathematics/maxima
Available versions: 5.13.0-r1 5.14.0 ~5.15.0-r1 ~5.16.3 {X clisp cmucl emacs gcl latex linguas_es linguas_pt linguas_pt_BR nls sbcl tk unicode xemacs}
Installed versions: 5.14.0(02:23:49 10/11/08)(X clisp latex nls tk unicode -cmucl -emacs -gcl -linguas_es -linguas_pt -linguas_pt_BR -sbcl -xemacs)
Homepage: http://maxima.sourceforge.net/
Description: Free computer algebra environment based on Macsyma
[I] sci-mathematics/wxmaxima
Available versions: 0.7.3a 0.7.4 ~0.7.5 ~0.7.6 {unicode}
Installed versions: 0.7.4(23:37:16 10/09/08)(unicode)
Homepage: http://wxmaxima.sourceforge.net/
Description: Graphical frontend to Maxima, using the wxWidgets toolkit.
Found 2 matches.
-
Flaming
- Сообщения: 2579
Re: [решено] Not connected to maxima
Сообщение
Flaming » 04.11.2008 11:55
После замены sbcl на clisp ошибка при запуске nc поменялась:
Код: Выделить всё
jfa: starting server on port 4010
Maxima encountered a Lisp error:
UNIX error 22 (EINVAL): Invalid argument
Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.
*** - THROW: there is no CATCHer for tag RETURN-FROM-DEBUGGER
Break 1 [1]>
Это на терминале, где maxima запускаю, а на другом пусто
-
Portnov
- Модератор
- Сообщения: 1786
- Статус: Матёрый линуксоид
- ОС: Debian testing/unstable
- Контактная информация:
Re: [решено] Not connected to maxima
Сообщение
Portnov » 04.11.2008 21:48
localhost _должен быть_ привязан к 127.0.0.1 (вариант: к 127.*.*.1) в /etc/hosts. Хотите своему хосту другое имя — сделайте alias:
I recently installed Maxima (5.45.0-Windows) on my 64bit, windows 7 machine, following the guide here.
However, when I try to use the GUI, wxMaxima I get an error on launch, saying that the maxima.bat file could not be detected, and it suggests that Maxima was not properly installed. The error message in full is;
«Can not start Maxima. The most probable cause is that Maxima isn’t installed (it can be downloaded from https://maxima.sourceforge.io) or in wxMaxima’s config dialogue the setting for Maxima’s location is wrong.»
However, in the Edit-Configure-Maxima menu, under Maxima program I have the path C:maxima-5.45.0binmaxima.bat
which should be correct. In fact, when trying to run maxima commands through the command-line promp or through xmaxima, it works just fine.
The GUI however, fails to recognize my maxima.bat file, even when moving it to a different place and ‘user specifying’ the path, the GUI console is stuck on
Maxima Excited...
Restart Maxima with 'Maxima-Restart Maxima'
But trying to restart Maxima has no effect. Restarting the entire GUI program, or running it as administrator doesn’t help either.
I’ve searched the web for this, but all the search results seem to concern Linux installations or a connection error wrt. internet, which doesn’t seem to be my problem here.