import sys import os set dirname's value to current folder by default. To use for example the environment worklab that we just created in a Jupyter notebook, a solution is to use ipykernel. When you run listfilepath.py, it will first print out each command-line argument when you invoke it and then show all the file or folder’s absolute path in the folder that you pass to the python file. That returns in my case for example: # conda environments: # base /Users/mb/anaconda3 websitedev /Users/mb/anaconda3/envs/websitedev websitedev2 /Users/mb/anaconda3/envs/websitedev2 worklab * /Users/mb/anaconda3/envs/worklab Use a conda environment in a Jupyter notebook Note: to get a list of your environment, there is the command: conda env list In this step-by-step Python tutorial, you learn how to get started with The Jupyter Notebook, an open source web application that you can use to create and share documents that contain live code. To activate the environment called worklab. Since conda is installed in your system to create an environment (called for example hereafter worklab) use the following command: conda create -name worklab To install conda go to Anaconda Individual Edition. Use a conda environment in a Jupyter notebook.
0 Comments
Leave a Reply. |