I have a problem with my build system specified in project settings. Currently my project settings look like this
{
"build_systems":
[
{
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"name": "Anaconda Python Builder",
"selector": "source.python",
"shell_cmd": "$project_path/bin/python -u $file"
}
],
"folders":
[
{
"file_exclude_patterns":
[
"pip-selfcheck.json",
"pyvenv.cfg"
],
"folder_exclude_patterns":
[
"lib",
"include",
"bin"
],
"follow_symlinks": true,
"path": "."
}
],
"settings":
{
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
"*.tga",
"*.dds",
"*.ico",
"*.eot",
"*.pdf",
"*.swf",
"*.jar",
"*.zip",
"client/node_modules/**",
"data/**"
]
}
}
The actual problem problem is in the line:
"shell_cmd": "$project_path/bin/python -u $file"
Every time I close sublime and reopen it my shell_cmd gets substituted with this
"shell_cmd": "\"python\" -u \"$file\""
Which fails my build. Is there a way to fix this problem? What do I do to disable this automatic substitution?
Mac OS X 10.11.3
Sublime Text 3103
I already answered this question in the Anaconda's issues tracker but I will do it here for any other user that lands in this question with a similar problem.
That specific build system is used by Anaconda itself and that is why it is called "Anaconda Python Builder", it will update the "shell_cmd" with anything that you used as configuration for your "python_interpreter" setting into your anaconda's settings file (general, user or per project).
If you have specific needs for your build system, you should create a new build entry with your own options and stick to that one. Anaconda's build system is a convenience for users that need to use their configured Python interpreter instead of the embedded ST3 one.
I solved this issue without a custom build system by adding python_interpreter: 'full/path/to/python' to the settings dictionary. python part in the Anaconda Python Builder shell_cmd gets replaced with it.
Related
Description:
I'm using Vscode Studio for python coding, I've installed every extension related to python and I wanna use Jupyter. I'm experiencing no problem with importing packages or running code but when I try to grab the input from the user it throws me an error stating 'StdinNotImplementedError: raw_input was called, but this frontend does not support input requests.' which I don't find using the console.
[Image Error]
https://i.stack.imgur.com/BDUC5.jpg
Error
StdinNotImplementedError Traceback (most recent call last)
in
9 while 1:
10 #ask for new item
---> 11 new_item=input("> ")
12 #add new items to our list
13 shopping_list.append(new_item)
~\AppData\Local\Programs\Python\Python37-32\lib\site-packages\ipykernel\kernelbase.py in raw_input(self, prompt)
846 if not self._allow_stdin:
847 raise StdinNotImplementedError(
--> 848 "raw_input was called, but this frontend does not support input requests."
849 )
850 return self._input_request(str(prompt),
StdinNotImplementedError: raw_input was called, but this frontend does not support input requests.
Steps Taken:
Use the raw_input function instead of input.
Install and uninstall python and jupyter extension.
Checked the version of jupyter notebook --version (5.7.4) and python -m ipykernel --version (7.2.0).
Restarted kernel but encounter the same error.
Observation:
The issue is not replicable when the code is executed with python integrated terminal
Please let me know if there is setting which I'm missing or is this a bug.
Ctrl + Shift + D
Environment -> Python
This creates launch.json file within a .vscode directory in the current directory
Paste the following json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Python",
"type": "python",
"request": "launch",
"stopOnEntry": true,
"pythonPath": "${config.python.pythonPath}",
"program": "${file}",
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput"
],
"console": "integratedTerminal"
}
]}
Save the file and open python script in the editor
Start without debugging
I'm currently struggling with a bug(?), which completely breaks Sublime after some time of using it and requires a complete OS reboot to make it work again. The only correlation I found so far is that this always happens whenever a tree view refreshment is triggered (either manually or by creating or deleting a file or directory). Though, it also happened once when I hit tabulator for auto completion, so I'm not quite sure.
The first time this happened was after I opened a very large SQL file by mistake and killed the process, because, you know, Sublime and large files.
I already tried deleting the session files, but that didn't change anything.
I have absolutely no idea what this could be about, so I'd be very thankful for any kind of ideas, that could lead to the right direction.
Operating System: Arch Linux. Maybe that's of some relevance, I don't know. I'm using the official stable channel for pacman, though.
Package Control / Packages: A File Icon, AdvancedNewFile, Alignment, All Autocomplete, Autoprefixer, Case Conversion, CodeFormatter, Color Highlighter, CSScomb, DocBlockr, Emmet, FileDiffs, Git, GitGutter, Grunt, HTML-CSS-JS Prettify, Inc-Dec-Value, jQuery, Less, Local History, MarkdownEditing, Material Theme, Package Control, PHP-Twig, PyV8, Sass, SFTP, SideBarEnhancements, SQLTools, SublimeCodeIntel, SublimeLinter, SublimeLinter-php, Sublimerge 3, Symfony2 Snippes, Terminal, Xdebug Client, zzz A File Icon zzz
Settings:
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"dictionary": "Packages/Language - English/en_US.dic",
"ensure_newline_at_eof_on_save": true,
"font_options":
[
"gray_antialias"
],
"font_size": 10,
"ignored_packages":
[
"Markdown",
"Vintage"
],
"indent_guide_options":
[
"draw_normal",
"draw_active"
],
"line_padding_bottom": 3,
"line_padding_top": 3,
"material_theme_bright_scrollbars": true,
"overlay_scroll_bars": "enabled",
"remember_full_screen": true,
"rulers":
[
80,
120
],
"show_encoding": true,
"show_line_endings": true,
"theme": "Material-Theme.sublime-theme",
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true
}
I have heard that Dot net core only generates dll file and the only way to run them is using the command
dotnet myapp.dll
I have a chrome extension and i am trying to do some operations . For example, on chrome extension i enter two numbers and then click send button. this triggers the native messaging and a windows executable/dll is called which takes these 2 numbers as stdin and returns the sum as stdout which would be displayed on chrome extension .
Earlier it was an exe file which was working fine. Now i have migrated the code to dotnet core 2.0 . My unit tests work fine but the dll is unable to execute . i dont see any logs as well . my best guess is that the dll is not getting called at all. somehow i have no idea how to check if the app is getting called from chrome extension
{
"name": "myapp",
"description": "myapp",
"path": "C:\\Program Files (x86)\\myapp.dll",
"type": "stdio",
"allowed_origins": [
"chrome-extension://lpfjfcebobk**************/"
]
}
UPDATE -1
I was able to solve this by creating a bat file which in turn calls the dll file by the following command
dotnet my_app.dll
Also my bat file looks like this
#echo off
:: Copyright (c) 2013 The Chromium Authors. All rights reserved.
:: Use of this source code is governed by a BSD-style license that can be
:: found in the LICENSE file.
dotnet "my_app.dll" %*
and my app_manifest looks like this
{
"name": "myapp",
"description": "myapp",
"path": "C:\\Program Files (x86)\\myapp.bat",
"type": "stdio",
"allowed_origins": [
"chrome-extension://lpfjfcebobk**************/"
]
}
So I am using sublime text 3 and I have the following build system to remove the existing executable then build then run, but it seems deletion command is not working. So is there a way to actually do this command in the build system?
{
"cmd": ["del", "${file_base_name}","&", "g++", "${file}", "-std=c++11", "-o", "${file_path}/${file_base_name}", "&", "start", "cmd", "/c", "${file_base_name} & echo. & pause"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"shell": true,
"encoding":"utf-8",
}
I found the problem by myself. In win32 you should delete "${file_base_name}.exe rather than "${file_base_name}.
hope this can help others.
I'm trying to install cl-jupyter. (Debian)
I've done the following steps:
install gcl (apt-get install gcl)
install sbcl (apt-get install sbcl)
run command python3 ./install-cl-jupyter.py
try to run command sbcl --load ./cl-jupyter.lisp but I get the following and don't know what to do. I've tried to choose all option, but nothing happend.
Output:
This is SBCL 1.2.4.debian, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
debugger invoked on a SB-C::INPUT-ERROR-IN-LOAD in thread
#<THREAD "main thread" RUNNING {10039CE993}>:
READ error during LOAD:
Package ASDF does not exist.
Line: 3, Column: 29, File-Position: 150
Stream: #<SB-SYS:FD-STREAM
for "file /home/ivan/all/language_packages/cl-jupyter-master/cl-jupyter.lisp"
{10039D64A3}>
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT ] Abort loading file "/home/ivan/all/language_packages/cl-jupyter-master/./cl-jupyter.lisp".
1: [CONTINUE] Ignore runtime option --load "./cl-jupyter.lisp".
2: Skip rest of --eval and --load options.
3: Skip to toplevel READ/EVAL/PRINT loop.
4: [EXIT ] Exit SBCL (calling #'EXIT, killing the process).
(SB-C:COMPILER-ERROR SB-C::INPUT-ERROR-IN-LOAD :CONDITION #<SB-INT:SIMPLE-READER-PACKAGE-ERROR "Package ~A does not exist." {10039D9E83}> :STREAM #<SB-SYS:FD-STREAM for "file /home/ivan/all/language_packages/cl-jupyter-master/cl-jupyter.lisp" {10039D64A3}>)
update file ipython/your_kernel_name/kernel.json
from
{"language": "lisp", "display_name": "SBCL Lisp", "argv": ["sbcl", "--non-interactive", "--load", "/home/ivan/all/language_packages/cl-jupyter-master/cl-jupyter.lisp", "/home/ivan/all/language_packages/cl-jupyter-master/src", "/home/ivan/all/language_packages/cl-jupyter-master", "{connection_file}"]}
to
{
"argv": [
"sbcl","--non-interactive", "--load",
"/path/to/cl-jupyter/cl-jupyter.lisp",
"/path/to/cl-jupyter/src",
"/path/to/cl-jupyter",
"{connection_file}"
],
"display_name": "SBCL Lisp",
"language": "lisp"
}
(information from here)
Now I can see the SBCL Lisp kernel in jupyter but it doesn't work and breaks all the time when I try to write and run smth.
Please, help
I've done it! Now it works fine.
1)I forgot to install quicklisp
2) here i just put right paths to cl-jupyter.lisp, /src, /cl-jupyter:
{
"argv": [
"sbcl","--non-interactive", "--load",
"/path/to/cl-jupyter/cl-jupyter.lisp",
"/path/to/cl-jupyter/src",
"/path/to/cl-jupyter",
"{connection_file}"
],
"display_name": "SBCL Lisp",
"language": "lisp"
}