Python interpreter is not the same in JupyterLab - Notebook vs Terminal
See original GitHub issuein notebook:
import pandas
import sys
print(sys.executable)
(pandas import works)
in terminal
python -c "import pandas" # fails
ls -lah $(which python)
let
mach-nix = import (builtins.fetchGit {
url = "https://github.com/DavHau/mach-nix/";
ref = "refs/heads/master";
#rev = "1bc3bee2d0eb3acaa4af106d242b8c4bd7ec66a4";
});
nixpkgs = import mach-nix.nixpkgs.path {config= { allowUnfree = true; }; };
py = nixpkgs.python37Packages ;
py_env = mach-nix.mkPython rec {
pkgs = nixpkgs;
python = nixpkgs.python37;
requirements = ''
ipython
jupyterlab
pandas
'';
providers = {
};
};
in
nixpkgs.mkShell rec {
buildInputs = [
nixpkgs.bash
nixpkgs.nix-tree
( (py_env).override( args:{ignoreCollisions=true; }) )
] ;
shellHook = ''
# # # install data/pretrained pipes from spark-nlp
python -c "import pandas"
jupyter lab
'';
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Change Interpreter in Jupyter notebook - Stack Overflow
When I execute the following code with Jupyter notebook I am getting the python installation within the Anaconda main folder and not the...
Read more >VS Code does not show correct environment/interpreter in ...
I have this problem while using ipynb notebook, so I opened this issue ... Select Interpreter, or by clicking bottom left and doing...
Read more >Jupyter Kernel not running same Python version as the Virtual ...
I want to be able to run both Python 3.8 (currrent version) and Python 3.7 in my Jupyter Notebook. I understand creating different...
Read more >Working with Jupyter Notebooks in Visual Studio Code
To select an environment, use the Python: Select Interpreter command from the Command Palette (Ctrl+Shift+P).
Read more >Writing and running Python code
Jupyter Notebooks are an application that combines source code with ... Python interpreter, and system terminal flexible and viewable within the same window ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
on the NixOS system there is no JupyterLab installed
nix-shell
sare you sure the kernel you are using in the notebook is the nix-installed one and some other one found on your system?