installing kernel from virtualenv (on macos) points to system binary
See original GitHub issueHi,
When installing ipykernel kernelspecs from inside virtualenv I’m expecting to have kernelspec.json to point to the binary of the virtualenv, however, I get the system binary.
This happens on macOS with python3 installed via homebrew. python 3.7.1, ipykernel 5.1.0.
Steps to reproduce:
python3 -m venv --system-site-packages ipykerneltest
source ./ipykerneltest/bin/activate
python3 -m ipykernel install --name ipykerneltest --user
head ~/Library/Jupyter/kernels/ipykerneltest/kernel.json
I’m getting:
{
"argv": [
"/usr/local/opt/python/bin/python3.7",
...
Am I doing it all wrong, or is it a bug somewhere?
Regards to the team!
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
How to Install Virtual Environments in Jupyter Notebook on Mac
The Install command is used in IPython kernel to add the specified virtual environment to the kernels in Jupyter Notebook. It specifies the...
Read more >Python Virtual Environment Setup on Mac OSX - Easiest Way
Python Virtual Environment Setup on Mac OSX using the venv module and using Homebrew for installing Python 3. This is a step by...
Read more >virtual environment from Mac to Linux - python - Stack Overflow
Install virtualenv using pip. sudo pip3 install virtualenv. Create a virtual environment. virtualenv venv. You can use any name instead of venv ......
Read more >Pipenv & Virtual Environments
While pip can install Python packages, Pipenv is recommended as it's a ... On Linux and macOS you can find the user base...
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 Free
Top 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
I had the same problem on Ubuntu. After installing the ipykernel inside the virtual environment, the python path was set to the standard python path (/usr/bin/python3). However, when I deactivated the virtual environment and reactivated it and installed another ipykernel in the virtual environment, the python path was set correctly to the path of the virtual environment.
@alexgawrilow’s workaround does it for me. I have never used the
--system-site-packages
option.