Finding "build_config.json" file to fix kite installation - python-3.x

I am trying to install kite on jupyter-lab 3.0.5 using a Linux terminal but the server extension is not working. Instead, I am getting this error message:
Server Extension Unreachable
The jupyterlab-kite extension will not work because the jupyter-kite server extension could not be reached.
To fix this, please ensure the jupyter-kite server extension is installed and active (`jupyter serverextension list`), then restart the JupyterLab process.
I have tried uninstalling it and reinstalling it using:
pip install "jupyterlab-kite>=2.0.2"
but I cannot get the server extension to work. When I try to enable the server extension, I get an error as shown below.
thamu#thamu-PC:~$ jupyter server extension enable jupyter_kite
Enabling: jupyter_kite
- Writing config: /usr/etc/jupyter
- Validating jupyter_kite...
jupyter_kite 2.0.2 OK
X Validation failed: [Errno 13] Permission denied: '/usr/etc'
I have found what I think is a solution on GITHUB here but I have not installed Jupyter using Anaconda so this address (<conda_root>/share/jupyter/lab/settings/build_config.json) is not the same as on my computer to delete the build_config.json file. Does anyone know how else I could find this file in order to enable the kite server?

Related

Jupyter notebook open from cmd at any location or any drive

Recently I uninstalled Python and Anaconda. And again reinstalled it. But now I am facing an issue. Previously I was able to open jupyter notebook at any location in any drive by opening Command prompt by typing cmd in the address bar but it's now showing the following error:
> Fatal error in launcher: Unable to create process using '"C:\Python310\python.exe" "C:\Python310\Scripts\jupyter.exe" notebook': The system cannot find the file specified.
How should I handle this now? Please help. I want Jupyter notebook to be open at a specific folder location in a specific drive by opening command prompt through address bar. But not working now.
Your issue is probably related to your Windows environment variables.
To get to the interface, type the following into a terminal window with admin privileges:
rundll32 sysdm.cpl,EditEnvironmentVariables
Under 'Path' make sure that your python installation folder is present, if not add it. For me, python is under 'C:\Anaconda' and jupyter under 'C:\Anaconda\Scripts', but that is for an Anaconda installation. For reference see https://docs.python.org/3/using/windows.html#setting-envvars.
To make sure that everything works, type:
> where python
> where jupyter
You should see the respective installation folders now.

VScode Source Control Failing on Ubuntu

I've been getting the following error from the source control plugin on VSCode "Extension host terminated unexpectedly".
If I check the logs I see the following info: "EMFILE too many open files."
I've already tried a few things like:
Remove and install VSCode again.
Increase the number of opened files on Ubuntu.
Install Watchmen
Unfortunately, none of this solved the problem... Any suggestions?

import win32api in python 3.7 resulting in dll import error

I am having the error while running jupyter notebook. Error replication:
python --version
Python 3.7.9
python
import win32api
The error was: ImportError: DLL load failed
After doing a some stackoverflow, I got to know that there are 2 dll files missing namely: pythoncom37.dll and pywintypes37.dll
I also got to know that I can run this post command: pywin32_postinstall.py in the Scripts folder. I ran this script. Restarted my pc. I manually download these two dll and copied it to my system32. After manually downloading, I started to have a different type of error: ImportError: DLL load failed: %1 is not a valid Win32 application
I used anaconda and ran my jupyter notebook which was my main aim but can you please make me aware as what is going wrong?
I've run into this recently, but with a different version of the DLLs. What solved it for me was using a different version of pywin32.
My solution (conda env, python 3.8.5):
pip install pywin32==300
or try 225, 227, 228. The latest pywin32 (301 as of this post) seems to be having dll search issues (I wouldn't be surprised if whatever version you were using is also having dll search issues). 301 was released after your issue started, but you may have a similar problem nonetheless.
There is currently an issue on pywin32 DLL loading failing: https://github.com/mhammond/pywin32/issues/1709
Factors involved (in my experience) include your PATH variable (if you're using conda). I haven't tested it myself, but I'd be curious to see if this issue occurs without conda. This issue stops happening for me if the first dlls found are those for 301. In my case, that means putting them in my C:\Windows\System32 folder (yeah I'm on Windows; joy).
So a possible solution #2 would be to run the pywin32 post install script which should be located under your venv/Scripts/pywin32_postinstall.py
To try that solution, open an ADMIN command prompt (very important that it's admin), navigate to your venv, and run:
ppython.exe Scripts\pywin32_postinstall.py --install
You shouldn't HAVE to do this, but if you just need a one-off solution and it works, great!
pip install --upgrade pywin32 ==225 worked for me. Tried version 300 and was unsuccessful.

Windows error when trying to run a .robot file through PyCharm

I'm getting an error as below when trying to run my test case with .robot extension. I've Python 3.9.2 installed.
"This file does not have an app associated with it for performing this action. Please install an app or, if one is already installed, create an association in the Default Apps Settings page."
I've tried regedit HKEY_CLASSES_ROOT\Lnkfile and checked for IsShortcut string file but no luck.
What could be wrong or missing?

Why does pip3 want to create a kdewallet after installing/updating packages on Ubuntu 20.04?

I recently updated my system from Ubuntu 18.04 to 20.04. Afterwards I tried to update all of my pip3 packages using the shell command mentioned here (I changed "pip" to "pip3").
After it updated a couple of packages, this prompt came up:
KDE Wallet Service
Since I never saw it while updating/installing a package, I cancelled it which resulted in an instant reopening of the same prompt and the terminal showed following warning:
WARNING: Keyring is skipped due to an exception: Failed to unlock the keyring!
I pressed CTRL+C after the same happend with the next package it tried to install. Ever since when I try to install a package the same happens.
Example:
pip3 install numpy
WARNING: Keyring is skipped due to an exception: Failed to unlock the keyring!
WARNING: Keyring is skipped due to an exception: Failed to unlock the keyring!
Collecting numpy
WARNING: Keyring is skipped due to an exception: Failed to unlock the keyring!
Using cached numpy-1.19.2-cp38-cp38-manylinux2010_x86_64.whl (14.5 MB)
Installing collected packages: numpy
WARNING: The scripts f2py, f2py3 and f2py3.8 are installed in '/home/gesuchter/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed numpy-1.19.2
I already tried to fix my issue with reinstalling python3-pip.
Here are hopefully some helpful information:
pip3 --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
ls ~/.local/share/keyrings
default login.keyring user.keystore
find ~/.config/kwalletrc
find: ‘/home/gesuchter/.config/kwalletrc’: No such file or directory
This solved it for me:
python3 -m keyring --disable
Running it adds:
[backend]
default-keyring=keyring.backends.null.Keyring
to the file ~/.config/python_keyring/keyringrc.cfg.
Presumably PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring mentioned at https://stackoverflow.com/a/68504137/895245 offers an environment variable way to achieve the same result.
Without this, it would show the annoying KDE keyring popup every time I try to install a package:
Google, index this:
The KDE Wallet System
The application '/usr/lib/python3/dist-packages/pip/__main__.py' has requested to create a new wallet named 'kdewallet'. This is used to store sensitive data in a secure fashion. Please choose the new wallet's type below or click cancel to deny the application's request.
Classic, blowfish encrypted file
Use GPG encryption, for better protection
Related: https://askubuntu.com/questions/1205161/annoying-kde-wallet-service-popup-the-application-kded5-has-requested-to-open
Tested on Ubuntu 21.04, Python 3.9.5, pip3 20.3.4, keyring==22.2.0.
This issue was reported upstream, see https://github.com/pypa/pip/issues/8090 and the other issues linked from that thread.
tl;dr: new versions of pip too eagerly search keyrings for credentials that might be required to access some package downloads. If it ends up querying a keyring (such as kdewallet) which doesn't exist yet, the prompt you noticed shows up. It's not yet clear how exactly and in which release this will be fully fixed.
EDIT: Please note that stackoverflow is not the right place for bug reports: pip maintainers are unlikely to see this, and as far as I can tell it's also not really in scope for stackoverflow. It could be a question for another stackexchange community (superuser maybe?). But since you were already sure that this was a problem with pip, the best place for a report would have been any of the communication channels indicated in the README on https://github.com/pypa/pip
You can add this to your startup file
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
Credit to jrd's comment on a python bug

Resources