Configuring Lauch configuration using anaconda and KDevelop - python-3.x

How do i configure Kdevelop enviroment on windows to point to my anaconda python installation. I have already set the path on windows. The configure enviroment variable does not have the option to put the path rather it gives the option to enter variable and value.
!https://drive.google.com/open?id=1zcfVGZb8-bKGkw9ww2I4PjBa8yIH9QvG

Related

How to open VSCode from a Windows Linux Subsystem?

I have VSCode installed on my host OS which is Windows 10 on which I have an Ubuntu Subsystem terminal (WSL) and I'm trying to open VSCode from whitin it with this command code . The problem is that the output is Command 'code' not found. How can I make this work?
Assuming you have installed VSCode in its default place, then in WSL you can do :
PATH="$PATH:/mnt/c/Users/your-user-name/AppData/Local/Programs/Microsoft VS Code"
and run code.exe .
First, try installing the Remote - WSL extension in VSCode (or the meta Remote Development extension pack, which includes the WSL work).
I doubt that's your main problem, but it could help.
Next, try running code . under PowerShell - Does that work? If not, then VSCode isn't in the Windows path. Try reinstalling it -- If it's not in the path, some other associations may not be correctly installed either. I don't recall if there's an option during installation to add or not add it to the Windows path, but if so, it could be that it was deselected during installation.
If it does launch in Windows, then obviously it's in the Windows path. By default, WSL appends the Windows path to the default path in Ubuntu during init. So (again, by default) code . should work in WSL if it is working under PowerShell.
Check your $PATH under Ubuntu (echo $PATH). Is the .../Microsoft VS Code/bin directory (wherever it is installed) in the path? If not, then WSL may not be doing its default append. Edit /etc/wsl.conf under Ubuntu and look to see if there's an [interop] section, as in:
[interop]
appendWindowsPath=false
If so, then change it to true (or, delete it entirely) to allow WSL to add the Windows path. While it's the default setting if missing, you might try adding it and setting it to true (although that shouldn't have any effect).
If that still doesn't work, then check your startup scripts (e.g. .profile, .bash_profile, .bashrc) to see if there are any modifications to the PATH which could be causing this problem.

Visual Studio Code with Python for Windows AND Anaconda

I'm trying to use Visual Studio Code with both Anaconda and Python for Windows.
I have both installed, and I have the visual studio code extensions for both.
But no matter what I do now the Conda Base gets activated -
(base) PS C:\Users
even though the Python for Windows is the selected version
or if I try to activate an environment I get a mix of both, the venv with python for windows and the conda base activated.
(venv_iocparser) (base) PS C:\Users\
The settings.json file in this folder only has python for windows in the 'python.pythonPath'; with no mention of conda, but still activates the conda base.
Does anyone know a good article that walks through setting VSCode up with both? With python for windows as the default?
Thank you!
Had a similar issue. Its most likely since you installed VS Code with Anaconda, for some reason or another it just assumes thats what env you want when starting it.
To get out of it just run $ conda deactivate and then activate whatever env you want after that. I fixed it by changing the PATH for the python to only point at the non-conda versions though. I also had uninstalled it all and reinstalled it all at one point though.

Problem with using node.js on VSC with Windows

My laptop is 64-bit operating system, Windows 10
I have installed Node.js for Windows (version v12.17.0)
I have installed code.runner on VSC as well
However, the error msg
"Command 'node' not found, but can be installed with:
sudo apt install nodejs"
keep appearing. I have no idea what is wrong.
Will changing the user settings or workspace settings help ?
The problem is that you have not set the Path in the Environment Variables.
In Windows, search for "Environment Variables".
Open Environment Variables.Open Path and add the PATH : C:\Program Files\nodejs\bin
By default, the installer uses the Node.js distribution in C:\Program Files\nodejs. If node is installed in C:\Program Files\nodejs directory, then add the PATH in in window's PATH environment variable as C:\Program Files\nodejs\bin.
Restart any open command prompts for the change to take effect.

JAVA_HOME path in Linux EC2

I had open JDK installed in my Linux EC2. But then i installed oracle JDK.
As i wanted to set oracle JDK path for all users i have set in
/etc/profile
When i do echo $JAVA_HOME.It shows me correct path of oracle JDK.
But when i do it shows me path of openJDK.
$env
JAVA_HOME path showing open JDK
Please suggest why JAVA_HOME is still pointing to openJDK and how to make it point to oracle JDK for all users.I have reboot the system but its still showing openJDK path when i do env.
From https://superuser.com/questions/664169/what-is-the-difference-between-etc-environment-and-etc-profile
/etc/environment - This file is specifically meant for system-wide environment variable settings. It is not a script file, but rather consists of assignment expressions, one per line. Specifically, this file stores the system-wide locale and path settings
You may be seeing environment variables for a non interactive shell. Non interactive shells do not invoke /etc/profile.
Try setting the path in /etc/environment instead. This is the correct file to use for setting the system path.

VSCode remote Python virtual environment

Here is how the thing doesn't work:
The project source code is located on a remote machine. The Python virtual environment is installed in the project's root directory (using venv).
I sshfs the project folder and start local VSCode. It detects the virtual environment, but doesn't see pylint or other packages installed in it.
Python 3.6.7
VS Code - latest version
OSs - Debian 9 remote, Linux Mint 19 local
Both sshfs connection and venv installation are performed under the same account.
Is there some special way a virtual environment should be set up to be usable remotely?
There were problems with sshfs in early VSCode versions, but recent distrib has Remote Development extension that lets you develop your code via ssh.
Since you have activated your virtual environment, just get venv python path with which python command and copy it to the Select Interpreter menu.
Activate your python environment:
source venv/bin/activate
Find which python path you are using:
which python
Usually it is in :
venv/bin/python
Go to the bottom of VS Code, and click on the version number :
Click on Enter interpreter path... :
Enter the path you found above with the which python command.

Resources