julia executable path in vscode on windows - windows

I am trying to get Julia to run on VSCode on windows. I cannot get julia Language server to run. The executable path = "C:\Julia-1.1.1\bin\" which is the correct path. Where am I going wrong?

As stated in the parameter's description, the path should point to the julia executable. You need to add julia.exe to the end.
C:\Julia-1.1.1\bin\julia.exe
If you are editing the JSON file directly, you will need to escape the backslashes.
C:\\Julia-1.1.1\\bin\\julia.exe

The following setting works for me, without the .exe extension.
"julia.executablePath": "C:\\Users\\...\\Julia-1.3.0\\bin\\julia"

Related

Running python script on CMD which uses a folder to output results

I was using Pycharm as my editor to run the scripts since i need to add a task scheduler i had to test the code on the command prompt. Firstly this is the structure of my project.
When i try to run the following line
C:\Users\My_name\AppData\Local\Programs\Python\Python36-32\python.exe "C:\Users\My_name\PycharmProjects\FYP_CB006302\generateSummary.py"
I get this error,
From the knowledge i have i think it is because it doesn't recognize the path.
But when i change the directory to my project folder then give the path to python.exe and type generateSummary.py it works which was done as shown here.
However i highly doubt that this method can be used to task a schedule in Windows. Therefore, any ideas that would to run as shown in the beginning will be helpful.
The problem here is that when you use that line to run a particular script the folder which is causing the error is out of scope.
C:\Users\My_name\AppData\Local\Programs\Python\Python36-32\python.exe "C:\Users\My_name\PycharmProjects\FYP_CB006302\generateSummary.py"
In this case pickle_saves folder is out of scope. You can avoid this by giving a absolute path to that file in line 173. Where the absolute path is something like C:\user\documents\projects\pickle_saves\all_words

Makefile.mak giving error [duplicate]

I have Windows 7 and tried to use the 'make' command but 'make' is not recognized as an internal or external command.
I did Start -> cmd -> run -> make, which outputs:
'make' is not recognized as an internal or external command,operable program or batch file.
Then I typed 'mingw32-make' instead of 'make' (Start -> cmd -> run -> mingw32-make) and I get the same output:
'mingw32-make' is not recognized as an internal or external command,operable program or batch file.
What shall I do next in order to fix this problem?
In Windows10, I solved this issue by adding C:\MinGW\bin to Path and then called it using MinGW32-make not make.
Your problem is most likely that the shell does not know where to find your make program. If you want to use it from "anywhere", then you must do this, or else you will need to add the full path each time you want to call it, which is quite cumbersome. For instance:
"c:\program files\gnuwin32\bin\make.exe" option1=thisvalue option2=thatvalue
This is to be taken as an example, it used to look like something like this on XP, I can't say on W7. But gnuwin32 used to provide useful "linux-world" packages for Windows. Check details on your provider for make.
So to avoid entering the path, you can add the path to your PATH environment variable. You will find this easily.
To make sure it is registered by the OS, open a console (run cmd.exe) and entering $PATH should give you a list of default pathes. Check that the location of your make program is there.
This is an old question, but none of the answers here provide enough context for a beginner to choose which one to pick.
What is make?
make is a traditional Unix utility which reads a Makefile to decide what programs to run to reach a particular goal. Typically, that goal is to build a piece of software from a set of source files and libraries; but make is general enough to be used for various other tasks, too, like assembling a PDF from a collection of TeX source files, or retrieving the newest versions of each of a list of web pages.
Besides encapsulating the steps to reach an individual target, make reduces processing time by avoiding to re-execute steps which are already complete. It does this by comparing time stamps between dependencies; if A depends on B but A already exists and is newer than B, there is no need to make A. Of course, in order for this to work properly, the Makefile needs to document all such dependencies.
A: B
commands to produce A from B
Notice that the indentation needs to consist of a literal tab character. This is a common beginner mistake.
Common Versions of make
The original make was rather pedestrian. Its lineage continues to this day into BSD make, from which nmake is derived. Roughly speaking, this version provides the make functionality defined by POSIX, with a few minor enhancements and variations.
GNU make, by contrast, significantly extends the formalism, to the point where a GNU Makefile is unlikely to work with other versions (or occasionally even older versions of GNU make). There is a convention to call such files GNUmakefile instead of Makefile, but this convention is widely ignored, especially on platforms like Linux where GNU make is the de facto standard make.
Telltale signs that a Makefile uses GNU make conventions are the use of := instead of = for variable assignments (though this is not exclusively a GNU feature) and a plethora of functions like $(shell ...), $(foreach ...), $(patsubst ...) etc.
So Which Do I Need?
Well, it really depends on what you are hoping to accomplish.
If the software you are hoping to build has a vcproj file or similar, you probably want to use that instead, and not try to use make at all.
In the general case, MinGW make is a Windows port of GNU make for Windows, It should generally cope with any Makefile you throw at it.
If you know the software was written to use nmake and you already have it installed, or it is easy for you to obtain, maybe go with that.
You should understand that if the software was not written for, or explicitly ported to, Windows, it is unlikely to compile without significant modifications. In this scenario, getting make to run is the least of your problems, and you will need a good understanding of the differences between the original platform and Windows to have a chance of pulling it off yourself.
In some more detail, if the Makefile contains Unix commands like grep or curl or yacc then your system needs to have those commands installed, too. But quite apart from that, C or C++ (or more generally, source code in any language) which was written for a different platform might simply not work - at all, or as expected (which is often worse) - on Windows.
First make sure you have MinGW installed.
From MinGW installation manager check if you have the mingw32-make package installed.
Check if you have added the MinGW bin folder to your PATH. type PATH in your command line and look for the folder. Or on windows 10 go to Control Panel\System and Security\System --> Advanced system settings --> Environment Variables --> System Variables find Path variable, select, Edit and check if it is there. If not just add it!
As explained here, create a new file in any of your PATH folders. For example create mingwstartup.bat in the MinGW bin folder. write the line doskey make=mingw32-make.exe inside, save and close it.
open Registry Editor by running regedit. As explained here in HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER go to \Software\Microsoft\Command Processor right click on the right panel New --> Expandable String Value and name it AutoRun. double click and enter the path to your .bat file as the Value data (e.g. "C:\MinGW\bin\mingwstartup.bat") the result should look like this:
now every time you open a new terminal make command will run the mingw32-make.exe. I hope it helps.
P.S. If you don't want to see the commands of the .bat file to be printed out to the terminal put #echo off at the top of the batch file.
If you already have MinGW installed in Windows 7, just simply do the following:
Make another copy of C:\MinGW\bin\mingw32-make.exe file in the same folder.
Rename the file name from mingw32-make.exe to make.exe.
Run make command again.
Tested working in my laptop for above steps.
For window-10 resolved error- make' is not recognized as an internal or external command.
Download MinGW - Minimalist GNU for Windows from here https://sourceforge.net/projects/mingw/
install it
While installation mark all basic setup packages like shown in image
Apply changes
After completion of installation
copy C:\MinGW\bin
paste in system variable
Open MyComputer properties and follow as shown in image
You may also need to install this
https://sourceforge.net/projects/gnuwin32/
As other answers already suggested, you must have MinGW installed. The additional part is to add the following two folders to the PATH environment variable.
C:\MinGW\bin
C:\MinGW\msys\1.0\bin
Obviously, adjust the path based on where you installed MinGW. Also, dont forget to open a new command line terminal.
'make' is a command for UNIX/Linux. Instead of it, use 'nmake' command in MS Windows. Or you'd better use an emulator like CYGWIN.
Search for make.exe using the search feature, when found, note down the absolute path to the file. You can do that by right-clicking on the filename in the search result and then properties, or open location folder (not sure of the exact wording, I'm not using an English locale).
When you open the command line console (cmd) instead of typing make, type the whole path and name, e.g. C:\Windows\System32\java (this is for java...).
Alternatively, if you don't want to provide the full path each time, then you have to possibilities:
make C:\Windows\System32\ the current working directory, using cd at cmd level.
add C:\Windows\System32\ to you PATH environment variable.
Refs:
use full path: http://technet.microsoft.com/en-us/magazine/ff678296.aspx
cd: http://technet.microsoft.com/en-us/library/cc731237.aspx
PATH: http://technet.microsoft.com/en-us/library/bb490963.aspx
I am using windows 8. I had the same problem. I added the path "C:\MinGW\bin" to system environment variable named 'path' then it worked. May be, you can try the same. Hope it'll help!
try download & run my bat code
======run 'cmd' as admin 2 use 'setx'=====
setx scoop "C:\Users%username%\scoop" /M
echo %scoop%
setx scoopApps "%scoop%\apps" /M
echo %scoopApps%
scoop install make
=======Phase 3: Create the makePath environment variable===
setx makePath "%scoopApps%/make" /M
echo %makePath%
setx makeBin "%makePath%/Bin" /M
echo %makeBin%
setx Path "%Path%;%makeBin%" /M
echo %Path%
use mingw32-make instead of cmake in windows

c:\Ruby187\bin\ruby.exe: No such file or directory

I have been running my Ruby program using the Git Bash console for a while now.
Lately, when I wanted to run a simple ruby program, i go the following on the console:
c:\Ruby187\bin\ruby.exe: No such file or directory
Why is that? And, how can I solve this issue?
Thanks.
Check the PATH environment variable under both User and System.
Looks like it sees where it should be. Potentially a permissions issue? Can you run with a regular command prompt? Start->run, cmd.exe, ruby -v?
It seems that I had to explicitly save my ruby program with the extension .rb added at the end of the file name for this problem to disappear.
Thanks.

How to override Windows' convert command by ImageMagick's one?

In Windows, a command called convert is used to convert the filesystems. When you type convert, it will ask you to specify a filesystem.
In ImageMagick, convert command is used for image processing.
The problem is, even after setting the environment variable for ImageMagick convert, the tool doesn't get invoked. It calls only the Windows convert command. How to override that?
This is an old question, but the current solution with ImageMagick 7 is to use the "magick" command in place of "convert".
This is an old question, but I encountered this problem today, and this is my solution in Windows 7.
Windows convert.exe is located in folder C:\Windows\System32, so you have to modify the Windows PATH variable by putting the ImageMagick path (for example C:\Libs\ImageMagick-6.8.8-4) before the path that loads System32 (ie. %SystemRoot%\System32).
This will cause all ImageMagick executables to take priority over any similarly named system executables, which should do what you want but may cause unexpected behaviour.
Also, when you want to use the system convert.exe, you'll have to specify the full pathname such as C:\Windows\System32\convert.exe.
Renaming the ImageMagick convert.exe worked well for me.
I didn't like using full path each time, and changing the system PATH variable isn't possible for me on the work PC.
After renaming convert.exe to imgconvert.exe, no other changes were needed. You could now use the new command anywhere from the command line without it being confused with the intrinsic Windows file system convert
Edit: As of version 7.0, the command is now magick.exe, which no longer clashes with any native windows commands. So downloading the latest version if possible should solve the problem as well.
Did you logoff and login?
Or specify the Imagemagick's convert by providing the complete path
In powershell you can run this: $env:Path = "C:\path-to-convert\;$env:Path"
Now the imagemagick convert exe gets found because it comes first in the path.

Compiling Erlang code on Windows

I installed Erlang 13B and tried to follow the tutorials.
Every time I get to c(tut), I get an error instead of (ok, tut), so it seems like there are no modules installed. Can anyone point me in the right direction?
I've tried Emacs but I don't really know how to use it and haven't even got close to getting the Erlang mode working. For instance, where do I type:
(setq load-path (cons "C:/Program Files/erl5.6.2/lib/tools-<ToolsVer>/emacs"
load-path))
(setq erlang-root-dir "C:/Program Files/erl5.6.2")
(setq exec-path (cons "C:/Program Files/erl5.6.2/bin" exec-path))
(require 'erlang-start)
For c(tut) to work, there has to be a tut.erl file in the current directory.
This is easy to accomplish if you start the Erlang interpreter from the command line, as is common on systems like Linux and OS X, but this isn't the usual pattern on Windows. When you start Erlang on Windows from the icon in the Start menu, the current working directory defaults to the location of werl.exe, which isn't where your tut.erl file is.
To make your command work as expected, you have to change your working directory to be the location of tut.erl after starting the Erlang shell. If tut.erl is on the Desktop, the command will be something like this on Vista or Windows 7:
cd("c:/Users/myname/Desktop").
(Yes, you have to use forward slashes. Backslashes are special in Erlang strings.)
On Windows XP and older, your Desktop folder is buried much deeper. It might be simpler to put werl.exe in the system PATH and use the command line on such systems.
It isn't necessary, but you might want to consider installing Cygwin. Its Bash shell will give you a more Linux or OS X like environment, which will help you work with other tutorials that are structured for those OSes.
After you install Erlang open the shell and do:
1> pwd().
C:/Program Files/erl5.7.1/usr
ok
2>
Assume you have a file; "tut.erl" on your desktop. Content might look like this:
-module(tut).
-compile(export_all).
hello_world() ->
hello.
You must change the path of the current working directory to the desktop first (or where ever you want to do the compile). Like this perhaps:
2> cd("F:/Desktop").
F:/Desktop
ok
3>
Then you can perform the compile.
3> c(tut).
{ok,tut}
4>
Then test the module
4> tut:hello_world().
hello
5>
More info refer to the documentation here: Erlang official documentation
More info on the shell, look here: Shell module
Hope this gets your started.
You can also create an initialization file named .erlang under YourErlangInstallationPath\usr\
the content of the file should look something like this;
io:format("consulting .erlang in ~p~n" ,
[element(2,file:get_cwd())]).
%% Edit to the directory where you store your code
c:cd("O:/Erlang.Umut").
io:format("Now in:~p~n" , [element(2,file:get_cwd())]).
it will automatically change the path to your working folder. (Obviously, my path is O:/Erlang.Umut, you need to replace it with yours.)
No need to change folders every time you launch console. Console will be able to reach your erl files directly.
I recently tried Erlang on windows.
use the console window to make sure the text editor you are using is giving your files the correct extension ie. filename.erl and not filename.erl.txt like mine was!
when I saved my files in notepad it added .txt so I saved in unicode. fixed
If you are still getting "tut:erl:none: no such file or directory", the file name is wrong. If you open a Windows command prompt and move to your desktop and type "dir" you will see that tut.erl is really named tut.erl.txt. type "ren tut.erl.txt tut.erl" and now your compile will work.
When werl's current working directory is same as the file to be compiled, the filename is given as an argument without the whole path.
Otherwise, for eg. Assuming tut.erl is placed at C:\ErLang tutorials, one may try compiling as,
c("C:\\ErLang tutorials\\tut").
Note:
Without double quotes the : causes syntax error
The backslash is given using escape sequence

Resources