Installing Python Dependencies
Recenlty when using conda to create an environment, I used a script that was written about three months ago. At that time, I ran the code to install the python dependencies and it worked fine on my Kaggle notbook. But when I tried to run it again yesterday, it reported error after searching a specific package ( in this case it’s Cython version mismatch when installing a version of murmurhash).
I copied the code to run on my computer it still reported the error under my linux operation system. So it is obvious that some python packages may change dependencies relations, even when the packages are associated with certain earlier python version (python3.6 for example). Same scripts that successfully created and built an environment long time targeting a python version also long time ago may not always work in the long run. So the best practice may be creating an an environment and never recreating it after successfully installing the necessary dependencies. So Never transplanting or gliding the lily.
Anaconda proxy setting
This is what recently has been searched several times. For future reference, it could be noted here.
conda config --set proxy_servers.http http://localhost:XXXXX
conda ocnfig --set proxy_servers.https http://localhost:XXXXX
other basic conda commands
# creating new environment
conda create -n new_envrionment_name python=3.XX --yes
# list environments
conda env list
# delete an environment
conda remove -n environment_name --all
# activate an environment
conda activate new_envrionment_name
# or using path to create and activate new environments
conda create -p path/to/new/environment
conda activate path/to/new/environment
Running Jupyter Notebook by Docker
reference:
Prerequisites
- Having doocker or Docker Desktop installed according to your operating system.
Running
docker run --rm -p 8889:8888 quay.io/jupyter/base-notebook start-notebook.py --NotebookApp.token='my-token'
-p 8889:8888host port mapping to container portstart-notebook.py --NotebookApp.token='my-token'customizing your token.- The
start-notebook.pyscript configures the internal container and then runsjupyter labcommand (see here). - We can use the
crtl + ccommand to stop the terminal process.
Letting the container reading host folder, run: