I am using Pop_os! system (ubuntu based system) and just installed VS Code. I would like to use Julia with it and installed Julia Extension in the VS Code Extension Marketplace. In the extension settings, I typed in the Julia executable path as where I installed it (in my case is: /opt/julia-1.5.3-linux-x86_64/julia-1.5.3/bin/julia.exe). It is able to run code and print hello world in the output window. However, when I try to click "julia: Execute file" button and run it in Julia REPL, it shows me error message:
Command failed: "/opt/julia-1.5.3-linux-x86_64/julia-1.5.3/bin/" --startup-file=no --history-file=no -e "using Pkg; println(dirname(Pkg.Types.Context().env.project_file))"
/bin/sh: 1: /opt/julia-1.5.3-linux-x86_64/julia-1.5.3/bin/: ***Permission denied***
`"/opt/julia-1.5.3-linux-x86_64/julia-1.5.3/bin/" --startup-file=no --history-file=no -e "using Pkg; println(dirname(Pkg.Types.Context().env.project_file))"` (exited with error code 126)
I noticed in the previous error message it says "permission denied", so I change the path to where the static link is located "/usr/local/bin/julia.exe", but in this case it shows me the same "permission denied" error message.
Does anyone know how to get around this issue?
Thanks!
The cause of the issue is when I installed vs code on linux, I accidentally synced the accounted settings I used in a windows laptop, and that seems to mess up the Julia extension (I used to use Julia extension in windows vs code). I tried uninstall and reinstall vs code, and make sure I don't sync my windows account settings, this time julia extension works for me right after installing it. I don't even need to define any paths.
Related
I have a new mac with python 3 installed from homebrew and visual studio code. I am not a python person by default I tend to use java but wanted to try a project for fun.
Just my terminal in VSCode has a system install of python 3.8 version that I am not using I want to use my brew install version as shown in screen shots. if I do echo $path it shows correct, my mac terminal shows correct and my VSCode python plugin has the correct version showing. I have rebooted several times in case it was cached.
I want to use the brew version 3.9.7. My project is failing to load imports such as "import requests" I assume because of this. The import fail error is.
Import "requests" could not be resolved from sourcePylancereportMissingModuleSource
I have installed and uninstalled requests many times always through VSCode command line.
Perhaps the values in $PATH of VS Code is in a different order than that of Terminal.app.
See https://github.com/microsoft/vscode/issues/70248 for more informations.
You can simply set "terminal.integrated.inheritEnv": false. This works well for me.
Try putting the following in settings.json:
"terminal.integrated.env.osx": {
"PATH": ""
}
Save the file, close any terminal window and restart VS Code.
You can read more here.
Go into VS Code settings: Code->Preferences->Settings. Type the following in the search box:
terminal.integrated.inheritEnv": false
Uncheck the option box beside the setting "whether new shells should inherit their environment from VS Code..." to set it to False.
Restart VS code and try again, you should have the same version of python as on your standard terminal.
I have installed the latest windows 10 version of Git v 24 and use the standard recommended install as shown on a number of websites including https://zarkom.net/blogs/how-to-install-git-and-git-bash-on-windows-9140
he has said that his install recommends for vers 19 are still ok for v24 and just click on Next etc. I have had this confirmed with other help guides but on install I type in after the $ sign either python and or python3 and nothing happens but I can see when running a test file the bash:
/c/Users/nigel/AppData/Local/Microsoft/WindowsApps/python3: Permission denied
I don't have python3 installed there but in standard C:\Users\nigel\AppData\Local\Programs\Python.
I have powershell running ok and am using Sublime Text 3 ok I can run code I prepare in Powershell version 5.6.. whatever it is now standard install part of Windows10. No issues running Python IDLE either.
When I search the reg with regedit and type in git bash I cannot trace this odd link to Microsoft/*/Python as above but in that folder there is an odd link not seen previously not sure what installed that other than sometime ago I might have started an instll of python via M store but sure I didn't but this odd python language server may have got installed through something else?
C:\Users\nigel\AppData\Local\Microsoft\Python Language Server\stubs.v1 is all I can find but in windowapps I found 0kb of a couple of files that are odd ie python.exe and python3.exe and size says 0kb.
I cant seem to find how to amend git so that it stops looking in this odd location and looks in correct folder as stated above ie C:\Users\nigel\AppData\Local\Programs\Python
I would appreciate any help although I am using powershell and ST3 ok on my python courses on UDEMY. I have tried to look at environmental path etc but cant see any reference to this odd path link with windowapps ? I have amended path ok previously for other editors or ensured that the path was pointing to correct python. The only other version of python I have is with Jupyter/ananconda but that is self contained my word ie it doesn't fire up unless I am in Anaconda or jupyter hope that makes sense which I use on another course ie bootcamp course
I am not sure if this is a right place to ask this type of questions. I am a python beginner or programmer overall at this point. I am using Spyder to use python 3.6 (via Anaconda). I wrote a code that works fine when I run it in the current Ipython console. But I really need to run it in an external system terminal. In order to do so, I chose the following path: Run-> configuration per file -> execute in an external system terminal. That has been working fine. But now it refuses to work!
I validated that there is nothing wrong with my code by running something simple and saw that running via external system terminal does not work.
So far I deleted Anaconda and re-installed it. Could someone suggest what I should be looking for to diagnose the problem and fix it?
Thanks!
I had the same problem and noticed that unless the Working directory settings is set to "The directory of the file being executed", it won't work.
You can change it in "Run" > "Run configuration per file".
I ran into this problem as did others noted in the comments on the solution given to Cucumber not showing coloured output in windows
I believe this is caused by using the ansicon -i method to install ansicon, which works fine when using a command prompt to run ansicon (which is what it says it's for), but not when using windows powershell. I fixed this by making sure the ansicon folder was located in a path with no spaces (I put it in c:\ANSICON) and adding the path to my Windows 10 system path environment variable, and restarting powershell. I think the issue is that powershell doesn't see ansicon when it's only installed with the -i option.
Operating System: Windows 8.1
Cygwin Version: Latest version, as of Sept. 9, 2014.
Guile Version: 1.8
Background:
My overall goal is to install a program called "MIT Photonics Band (MPB)" on Windows 8.1 using Cygwin. I am a new user, as I started using Cygwin a few days ago. I was able to install all required packages successfully after some troubleshooting. Eventually, I installed the MPB program using the generic ./configure, make, make install commands with slight modifications. All of this appeared to be successful.
The Problem:
When I try to run the executable program, I get the following error:
ERROR: In procedure primitive-load-path:
ERROR: Unable to find file "ice-9/boot-9.scm" in load path
Attempt At Solution:
The following is a page of the MPB installation manual:
MPB Installation Manual - Shared Libraries.
It appears to address my issue. Note that it mentions LIBDIR and foobar. For my operating system, foobar is PATH. The LIBDIR, however, I do not know explicitly because my "make install" output did not indicate it, as the manual suggests it should have. Anyhow, I found the location of ice-9/boot-9.scm through a computer search and its directory happens to be here:
C:\cygwin64\usr\share\guile\1.8\ice-9
Hence, I ran the following command (again, for a Windows 8.1 operating system) in bash:
$ export PATH="/usr/share/guile/1.8/ice-9:$PATH"
However, note that when I run $PATH, I get this message:
-bash: /usr/share/guile/1.8/ice-9:/usr/local/bin:/usr/bin:/cygdrive/c/Program: No such file or directory
I also tried:
$ export GUILE_LOAD_PATH="/usr/share/guile/1.8/ice-9:$GUILE_LOAD_PATH"
That yielded:
-bash: /usr/share/guile/1.8/ice-9:: No such file or directory
Furthermore, I tried to copy and paste the "ice-9" folder in various locations for a quick and sloppy solution, but it was to no avail. I searched online for answers as some users have had an issue with the program not finding the ice-9/boot-9.scm file in the past. I could not get my problem solved.
Please let me know if I need to provide more information. I appreciate the help!
EDIT: In response to the first user's post, I used the command echo $PATH and the following was the output:
/usr/share/guile/1.8:/usr/local/bin:/usr/bin:/cygdrive/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/cygdrive/c/Program Files (x86)/AMD APP/bin/x86_64:/cygdrive/c/Program Files (x86)/AMD APP/bin/x86:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/cygdrive/c/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static:/cygdrive/c/Program Files/MATLAB/R2013a/runtime/win64:/cygdrive/c/Program Files/MATLAB/R2013a/bin:/cygdrive/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit:/cygdrive/c/Program Files/Microsoft SQL Server/110/Tools/Binn:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/MATLAB/MATLAB Compiler Runtime/v81/runtime/win64:/usr/lib/lapack
Note that the problem still persists.
EDIT 2:
So I opened the "load.scm" file for GUILE and I found this line:
(define load-path '("/usr/share/emacs/20.7/lisp/"
"/usr/share/emacs/20.7/lisp/emacs-lisp/"))
I tried to add /usr/share/guile/1.8/ to these directories, but that didn't do anything either. Can't tell what's wrong.