No python interpreter is available komodo

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.7.0 breaks Komodo #3592

Python 3.7.0 breaks Komodo #3592

Comments

Short Summary

Komodo IDE is not working with Python 3.7.0, it gives an error instead. New reserved keywords create an invalid syntax on the current code.

Steps to Reproduce

Using Python 3.7.0, open Komodo, try to run any python3 script or click in Tools->Start New Python3 Shell and it will give an error:

Traceback (most recent call last): File "/Applications/Komodo IDE 10.app/Contents/SharedSupport/dbgp/bin/py3_dbgp", line 105, in import dbgp.client File "/Applications/Komodo IDE 10.app/Contents/SharedSupport/dbgp/python3lib/dbgp/client.py", line 1975 def interaction(self, frame, tb = None, async = 0): ^ SyntaxError: invalid syntax 

This example is from Komodo 10, but Komodo 11 gives the same error.

Expected results

Actual results

Platform Information

Komodo IDE
Versions 10.2.3 and 11.1.0
Mac OS X El Capitan

Additional Information

After looking around I found that in Python 3.7 async and await are now reserved keywords (https://docs.python.org/3/whatsnew/3.7.html), so all variables named like that are now an invalid syntax and must be renamed.

The text was updated successfully, but these errors were encountered:

@cgchoffman please check the report, I tested with Komodo 11 and it breaks too.

I said This example is from Komodo 10, but Komodo 11 gives the same error. . I did not think it was necessary to add the same again for Komodo 11, but if you need it here it is:

Traceback (most recent call last): File "/Applications/Komodo IDE 11.app/Contents/SharedSupport/dbgp/bin/py3_dbgp", line 105, in import dbgp.client File "/Applications/Komodo IDE 11.app/Contents/SharedSupport/dbgp/python3lib/dbgp/client.py", line 1975 def interaction(self, frame, tb = None, async = 0): ^ SyntaxError: invalid syntax 

I did not think it was necessary to add the same again for Komodo 11

It’s not, i was just saying that your logs said 10. I did not read the whole report, my apologies.

After looking around I found that in Python 3.7 async and await are now reserved keywords

Thanks for looking this up btw. I can’t help but think this was a very very VERY silly change. This will break a ton of code I imagine. Maybe I missed warnings of this change coming.

Читайте также:  Colors in javascript alert

Yep, I’m now seeing similar breaks in other projects.

I went to the file and renamed all the async to asynch and it worked!

diff client_old.py client.py 1975c1975 < def interaction(self, frame, tb = None, async = 0): --- >def interaction(self, frame, tb = None, asynch = 0): 1979c1979 < return self.requester.cmdloop(async) --- >return self.requester.cmdloop(asynch) 2523c2523 < def cmdloop(self, async=0): --- >def cmdloop(self, asynch=0): 2526,2527c2526,2527 < #log.debug("cmdloop async=%d", async) < if async and not self.poll(): --- >#log.debug("cmdloop asynch=%d", asynch) > if asynch and not self.poll(): 2532c2532 < if not async and self._continueTransactionId is not None: --- >if not asynch and self._continueTransactionId is not None: 2549c2549 < if async: --- >if asynch: 2554c2554 < if async: --- >if asynch: 

After that it complained about something with locale instead:

Traceback (most recent call last): File "/Applications/Komodo IDE 11.app/Contents/SharedSupport/dbgp/bin/py3_dbgp", line 307, in sys.exit( main(sys.argv) ) File "/Applications/Komodo IDE 11.app/Contents/SharedSupport/dbgp/bin/py3_dbgp", line 166, in main _fixencoding() File "/Applications/Komodo IDE 11.app/Contents/SharedSupport/dbgp/bin/py3_dbgp", line 148, in _fixencoding codeset = locale.getdefaultlocale()[1] File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/locale.py", line 568, in getdefaultlocale return _parse_localename(localename) File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/locale.py", line 495, in _parse_localename raise ValueError('unknown locale: %s' % localename) ValueError: unknown locale: UTF-8 

Not sure if is related to your implementation or Python 3.7 itself (it works fine with Python 2.7) or MacOSX, but found how to fix that (https://stackoverflow.com/questions/38916461/valueerror-unknown-locale-utf-8-when-importing-pandas-in-python-2-7/38917471#38917471) by adding the LC_ALL=en_US.UTF-8 and LANG=en_US.UTF-8 to the User environment variables in Komodo settings, and now it finally works:

Python 3.7.0 (default, Jul 23 2018, 20:23:10) [Clang 8.0.0 (clang-800.0.42.1)] on darwin Type "copyright", "credits" or "license" for more information. 

Источник

Как запустить первую программу на Python в Komodo Edit 8.5?

Я изучаю Python впервые и использую Komodo Edit 8.5 для практики Python.

Но я не знаю, как запустить программу в Komodo Edit.

введите описание изображения здесь

4 ответа

В Komodo Edit нет функции отладки, но вы можете просто запустить текущий файл, создав команду запуска:

  1. перейдите в Панель инструментов -> Добавить -> Новая команда.
  2. в верхнем поле введите имя «Run Python file»
  3. в поле «Команда» введите этот текст: %(python) %F
  4. (необязательно) нажмите на вкладку «Связывание клавиш» и назначьте команду клавиш для этой команды
  5. нажмите ОК

Теперь у вас должна быть новая команда «Выполнить» в вашем наборе инструментов под названием «Запуск файла Python»; при двойном щелчке по нему команда должна запустить текущий скрипт Python, открытый в редакторе, и отобразить вывод на панели «Вывод команды».

Подробнее о командах запуска:

Хотя ответ 2014 года по-прежнему является полезным показателем того, что делать, Комодо пошел дальше. Сейчас он в версии 11. Предполагается, что вы используете Python 3, здесь приведены более подробные шаги для Windows.

В Komodo нажмите значок с тремя горизонтальными полосами в верхнем правом углу и выберите «Настройки». Затем выберите «Python 3». Komodo предложит вам выпадающее меню интерпретаторов Python 3, доступных в вашей системе. Выберите один.

предпочтения

Снова в Komodo, снова щелкните значок горизонтальной панели и выберите «Выполнить команду». Войти %(python) %F , как показано, и установите флажок «Добавить в панель инструментов», чтобы можно было повторно использовать команду.

бежать

Теперь вы должны увидеть этот дисплей. Komodo выполнит ваш код и добавит вашу команду в панель инструментов. Похоже, дважды в моем, потому что я писал это!

Читайте также:  Gradient descent algorithm python

Источник

Запуск пайтон файла через «run command» в Komodo Edit

Скачал komodo edit для python. В новом файле ввёл print(‘Hello, World!’). Сохранил файл как E:\py\helloworld.py. Хочу запустить файл в komodo через Tools -> Run Command -> «python3 helloworld.py» (пробовал и python3 E:\py\helloworld.py), файл не запускается. Выбивает это: This command string includes ‘%(python3)’, but no ‘python3’ interpreter could be found. You can configure this by visiting the Python3 preferences panel in Edit->Preferences. Это из-за того, что я не указал путь к интерпретатору? Если да, то как это можно сделать?

Как в Автозагрузку внести «run.exe» (запуск Денвера) ?
Здравствуйте. Как в Автозагрузку внести "run.exe" (запуск Денвера). Денвер как-то установила, но.

Хочу сделать так,чтобы пайтон игнорировал знаки препинания и тп. по типу «!» «?»
я сделал кортеж из знаков,которые нужно игнорировать(на их место перемещается ничего) def.

Запуск служб «Служба доступа к файлам» и «Клиент для сетей Microsoft» с использованием bat- или vbs-файла
Доброе время суток. Подскажите пожалуйста можно ли как нибудь запустить службы "служба доступа к.

как реализовать что бы при нажании на «edit» в «textarea» удалялся атрибут «readonly»?
document.querySelectorAll(‘.cotainer .edit’).forEach(ed => ed.addEventListener(‘click’.

KaffLime, хз что такое комодо. вероятно разновидность анаконды DDDDDD
но у тебя проблемма элементарнее: видимо не установлен питон, либо не активирована виртуальная среда.

вин+R-пишешь «переменные среды» (админ для всех текущий тока для тебя)-тебе нужно path, туда пишешь ; и путь к питону

то есть точка с запятой нужна если в конце её нет, путь к питону свой он может быть типа с:\python3 или с:\programm files\python3.24 то есть нужен тот путь куда ты устанавливал питон там где python.exe

так же можно переустановить питон поставив галочку где есть слово «path»

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error is thrown while switching to python interactive shell #2619

Error is thrown while switching to python interactive shell #2619

Comments

Short Summary

An error is thrown while trying to switch to python interactive shell

Steps to Reproduce

  1. Go to Tools -> Interactive Shell -> Start new Ruby Shell
  2. Go to Tools -> Interactive Shell -> Start new Python Shell

Expected results

Python shell is available

Actual results

Platform Information

Komodo Edit or IDE? IDE
Komodo Version? 10.2.2
Operating System (and version)? macOS 10.12.5

Additional Information

image
image

The text was updated successfully, but these errors were encountered:

Are you using this setting by any chance?

default

@mitchell-as Python shell does not work at all. I just upgraded my OS from 10.9 to 10.12.5 and Python shell has been throwing error since then. Other shells work as expected.

Читайте также:  Import turtle python ошибка

image.png

Please share your error log after reproducing the issue.

You can find your error log at Help > Troubleshooting > View Log File.

Can you reproduce this using Help > Troubleshooting > Restart in Safe-mode ?

@Naatan I am unable to reproduce this issue in safe-mode.

@cgchoffman can you stop by @mjainQA’s desk and see what about her setup is causing this? I suspect Python prefs or her environment settings.

Looks like it is. Can you still stop by her desk?

I did for #2496 and I couldn’t find anything. I’m pretty sure it’s just the debugger system failing for some reason. I’m also pretty sure a regular restart resolves this issue, starting in Safe Mode is not needed.

It’s not the same issue as reported in #2496.

Carey and I tried disabling the port debugging -> connection -> port -> system provided free port and custom port. This did not resolve the issue. Also, note that debugger is listening and has an assigned port. This implies that the error thrown is wrong and needs more investigation.

How do you figure it’s different from #2496?

The port has nothing to do with interactive shells, the port is only used for remote debugging.

@Naatan, I don’t know in what way exactly but if ports are screwed up on your system the debugger won’t work even for local debugging. Ask mitchell for more details.

The point is that the error reported by Komodo that @mjainQA posted in the first message is wrong and also different from the issue I thought was the same. There is no error in #2496.

We’ve done more digging and found that there are a couple issues going on here. For one, komodo allowed @mjainQA to set a Python interpreter that isn’t a python interpreter (the file didn’t even exist). When you select a Python interpreter in prefs Komodo checks that it’s Python 2 then complains if it’s not. It still sets the path as the preferences and worse it allows you to OK out of the window and saves the pref.

The other issue is that when Komodo tried to run the interpreter with a broken config it gave a useless error message.

I personally thing the only action item is fixing the prefs window so it doesn’t accept a broken config.

@cgchoffman @Naatan If you do end up investigating this further as per @cgchoffman suggestions, please update the reproduction steps for QA to add a test case for regression testing. Thanks!

please update the reproduction steps for QA to add a test case for regression testing. Thanks!

Hrm, good point. This ticket took a bit of a turn. Maybe we should refile this issue as a Preference window bug.

komodo allowed @mjainQA to set a Python interpreter that isn’t a python interpreter (the file didn’t even exist)

Alright so we basically need to validate interpreter configurations, which should theoretically be as simple as parsing the output of ruby —version .

Closing this ticket in favor of #2624, as this issue is basically fallout of a bad UX. It makes no sense to fix the symptom rather than the cause.

Источник

Оцените статью