Memoru

System Engineering and Programming and IT

1808-wsl-git-configuration-and-conda-configuration

1808-wsl-git-configuration-and-conda-configuration

environment variables

sakai@eX:~$ env | grep HOME
HOME=/mnt/g/wsl_home/sakai
PROJECT_HOME=/mnt/g/workspace/py

git config

sakai@eX:/mnt/g/workspace/py/importjson$ git config --global user.name 'xxxxxxxxxxxxxxx'
sakai@eX:/mnt/g/workspace/py/importjson$ git config --global user.email 'xxxxxxxxxxxxxxx@google.com'
sakai@eX:/mnt/g/workspace/py/importjson$ git config --global core.autocrlf false
sakai@eX:/mnt/g/workspace/py/importjson$ git config --global core.editor vim
sakai@eX:/mnt/g/workspace/py/importjson$ git config --global diff.tool vimdiff
sakai@eX:/mnt/g/workspace/py/importjson$ git config --global difftool.prompt false
sakai@eX:/mnt/g/workspace/py/importjson$ git config --global merge.tool vimdiff
sakai@eX:/mnt/g/workspace/py/importjson$ git config --global mergetool.prompt false
sakai@eX:/mnt/g/workspace/py/importjson$ git config --global --list

user.name=xxxxxxxxxxxxx
user.email=xxxxxxxxxxxxx@google.com
core.editor=vim
core.autocrlf=false
diff.tool=vimdiff
difftool.prompt=false
merge.tool=vimdiff
mergetool.prompt=false

conda

  • ~/.bashrc
# added by Miniconda3 installer
export PATH="/mnt/g/wsl_home/sakai/miniconda3/bin:$PATH"
# added by hand
. /mnt/g/wsl_home/sakai/miniconda3/etc/profile.d/conda.sh
  • create environment
sakai@eX:~$ pwd
/mnt/g/wsl_home/sakai
sakai@eX:~$ conda --version
conda 4.5.4
sakai@eX:~$ python --version
Python 3.6.5 :: Anaconda, Inc.
sakai@eX:~$ virtualenv --version
16.0.0

sakai@eX:~$ conda info -e
# conda environments:
#
base                  *  /mnt/g/wsl_home/sakai/miniconda3
pyconle                  /mnt/g/wsl_home/sakai/miniconda3/envs/pyconle

sakai@eX:~$ conda create -n sandbox
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.5.4
  latest version: 4.5.9

Please update conda by running

    $ conda update -n base conda



## Package Plan ##

  environment location: /mnt/g/wsl_home/sakai/miniconda3/envs/sandbox


Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate sandbox
#
# To deactivate an active environment, use
#
#     $ conda deactivate

sakai@eX:~$ conda info -e
# conda environments:
#
base                  *  /mnt/g/wsl_home/sakai/miniconda3
pyconle                  /mnt/g/wsl_home/sakai/miniconda3/envs/pyconle
sandbox                  /mnt/g/wsl_home/sakai/miniconda3/envs/sandbox

sakai@eX:~$ conda activate sandbox
(sandbox) sakai@eX:~$ cd $PROJECT_HOME
(sandbox) sakai@eX:/mnt/g/workspace/py$ ls
djanbox  djfirst  djfourth  djsecond  djthird  dplate  importjson  janome  sandbox
(sandbox) sakai@eX:/mnt/g/workspace/py$ cd sandbox
(sandbox) sakai@eX:/mnt/g/workspace/py/sandbox$ pip freeze
appdirs==1.4.3
arrow==0.12.1
asn1crypto==0.24.0
Cerberus==1.2
certifi==2018.4.16
cffi==1.11.5
chardet==3.0.4
conda==4.5.4
cryptography==2.2.2
docopt==0.6.2
elasticsearch==6.3.0
etmtk==3.2.36
googler==1.0.1
idna==2.6
Jinja2==2.10
MarkupSafe==1.0
Pillow==5.2.0
pocket==0.3.6
pycosat==0.6.3
pycparser==2.18
pycrypto==2.6.1
pyfiglet==0.7.5
pyOpenSSL==18.0.0
PySocks==1.6.8
python-dateutil==2.7.3
PyYAML==3.13
rainbowstream==1.3.7
requests==2.5.3
ruamel-yaml==0.15.37
six==1.11.0
slack-cli==2.0.3
slacker==0.9.65
twitter==1.18.0
urllib3==1.23
websocket-client==0.39.0
(sandbox) sakai@eX:/mnt/g/workspace/py/sandbox$ pip install -r requirements.txt
(sandbox) sakai@eX:/mnt/g/workspace/py/sandbox$ pip freeze
appdirs==1.4.3
arrow==0.12.1
asn1crypto==0.24.0
Cerberus==1.2
certifi==2018.4.16
cffi==1.11.5
chardet==3.0.4
conda==4.5.4
cryptography==2.2.2
docopt==0.6.2
elasticsearch==6.3.0
etmtk==3.2.36
googler==1.0.1
idna==2.6
Jinja2==2.10
MarkupSafe==1.0
Pillow==5.2.0
pocket==0.3.6
pycosat==0.6.3
pycparser==2.18
pycrypto==2.6.1
pyfiglet==0.7.5
pyOpenSSL==18.0.0
PySocks==1.6.8
python-dateutil==2.7.3
PyYAML==3.13
rainbowstream==1.3.7
requests==2.5.3
ruamel-yaml==0.15.37
six==1.11.0
slack-cli==2.0.3
slacker==0.9.65
twitter==1.18.0
urllib3==1.23
websocket-client==0.39.0
(sandbox) sakai@eX:/mnt/g/workspace/py/sandbox$ explorer.exe .
(sandbox) sakai@eX:/mnt/g/workspace/py/sandbox$ git init
Initialized empty Git repository in /mnt/g/workspace/py/sandbox/.git/

(sandbox) sakai@eX:/mnt/g/workspace/py/sandbox$ git status
On branch master

No commits yet

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        .gitignore
        README.md
        batch_sample/
        configbase.py
        configs/
        docopt_sample/
        inspect_sample.py
        logging.conf
        logging_sample.py
        onme.ps1
        requirements.txt
        standards/
        watchdog_sample/

(sandbox) sakai@eX:/mnt/g/workspace/py/sandbox$ git status
On branch master

No commits yet

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)

        new file:   .gitignore
        new file:   README.md
        new file:   batch_sample/.gitignore
        new file:   batch_sample/README.md
        new file:   batch_sample/batch_sample.py
        new file:   batch_sample/configbase.py
        new file:   batch_sample/configs/config.py
        new file:   batch_sample/configs/default.py
        new file:   batch_sample/logging.conf
        new file:   batch_sample/utils.py
        new file:   configbase.py
        new file:   configs/config.py
        new file:   configs/default.py
        new file:   docopt_sample
        new file:   inspect_sample.py
        new file:   logging.conf
        new file:   logging_sample.py
        new file:   onme.ps1
        new file:   requirements.txt
        new file:   standards/.gitignore
        new file:   standards/add_sample.py
        new file:   standards/calc.py
        new file:   standards/csv_sample.py
        new file:   standards/json_sample.py
        new file:   standards/logging.conf
        new file:   standards/logging_debug.conf
        new file:   standards/unittest_sample.py
        new file:   watchdog_sample/app.py
        new file:   watchdog_sample/configbase.py
        new file:   watchdog_sample/configs/config.py
        new file:   watchdog_sample/configs/config_debug.py
        new file:   watchdog_sample/configs/default.py
        new file:   watchdog_sample/logging_debug.conf
        new file:   watchdog_sample/plugins/a.py
        new file:   watchdog_sample/plugins/b.py
        new file:   watchdog_sample/plugins/c.py
        new file:   watchdog_sample/watchdog_sample.py