Pipenv is not used for Jupyter notebooks, as well as root project path
See original GitHub issueIssue Type: Bug
- create or open any Pipenv-based workspace (or project… i don’t know the terminology)
- create a Jupyter notebbok (*.ipynb), or use existing one.
- run something that requires installed libraries in the pipenv
- see exception that library is not installed.
also, assuming i’m in notebooks
folder, i had to insert this snipped to sys.path
. as long as VSCode is launching the notebook, it should prepend not only current directory to sys.path, but also the project root, which holds main python module path though jupyter hooks.
import os
sys.path.append(os.path.abspath('..'))
Extension version: 2021.1.502429796 VS Code version: Code 1.53.0 (8490d3dde47c57ba65ec40dd192d014fd2113496, 2021-02-03T16:01:04.046Z) OS version: Darwin x64 19.6.0
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30211402
pythonvsdeb440:30248342
pythonvsded773:30248341
pythonvspyt600cf:30251589
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:10 (8 by maintainers)
Top Results From Across the Web
Is there a way to use pipenv with Jupyter notebook?
In your project folder: pipenv install ipykernel pipenv shell. This will bring up a terminal in your virtualenv like this:
Read more >Common Pipenv Errors - Towards Data Science
The virtual environment is stored globally with the name of the project's root directory plus the hash of the full path to the...
Read more >Configure a Pipenv environment | PyCharm Documentation
Open any directory with your source files that contains the Pipenv file: select File | Open from the main menu and choose the...
Read more >Set up your project - The Good Research Code Handbook
Therefore, one project = one paper = one folder = one git repository is a generally a ... If you don't use git...
Read more >Pyenv and Pipenv (on MacOS) – Index - Wilson Mar
If no .python-version is specified in any folder, the global $(pyenv root)/version file. Modify the global file using the command:
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
@joyceerhl it’s still not using the pipenv classpath, nope
No. We did support it earlier, but due to security reasons we cannot run pipenv without user consent, hence the support was removed.