Upgrade Laptop: Difference between revisions
No edit summary |
|||
Line 60: | Line 60: | ||
Using https://realpython.com/effective-python-environment/ as reference | Using https://realpython.com/effective-python-environment/ as reference | ||
Globally: | |||
* install [https://github.com/pyenv/pyenv pyenv] <ref>https://brain2life.hashnode.dev/how-to-install-pyenv-python-version-manager-on-ubuntu-2004</ref> | * install [https://github.com/pyenv/pyenv pyenv] <ref>https://brain2life.hashnode.dev/how-to-install-pyenv-python-version-manager-on-ubuntu-2004</ref> | ||
* install [https://github.com/pyenv/pyenv-virtualenv pyenv-virtualenv] | * install [https://github.com/pyenv/pyenv-virtualenv pyenv-virtualenv]: a pyenv plugin that provides features to manage virtualenvs | ||
** first check if it is already installed: <code>ls $(pyenv root)/plugins/pyenv-virtualenv</code> | |||
** if so let it be, if not: follow the [https://github.com/pyenv/pyenv-virtualenv installation instructions] | |||
* search for python remote versions available <code>pyenv install -l | grep -Po "^\s\s3\.9.*"</code> using python 3.9 | * search for python remote versions available <code>pyenv install -l | grep -Po "^\s\s3\.9.*"</code> using python 3.9 | ||
* install python version: <code>pyenv install 3.9.14</code> | * install python version: <code>pyenv install 3.9.14</code> | ||
Line 68: | Line 71: | ||
** restart shell: <code>exec $SHELL</code> | ** restart shell: <code>exec $SHELL</code> | ||
** what python version: <code>python -V</code> <code>>Python 3.9.14</code> | ** what python version: <code>python -V</code> <code>>Python 3.9.14</code> | ||
** which python <code>which python</code> <code>>/home/andre/.pyenv/shims/python</code> | ** which python: <code>which python</code> <code>>/home/andre/.pyenv/shims/python</code> | ||
* upgrade pip: <code>$ python -m pip install --upgrade pip</code> | |||
* install packages which you want to use globally: <code>pip install jupyter pandas pytest</code> | |||
Locally (project based) | |||
* create: python virtual environment: <code>pyenv virtualenv 3.9.14 hdf5</code> | |||
* activate it: <code>pyenv activate hdf5 </code> | |||
* ... work work work ... | |||
* deactivate it: <code>pyenv deactivate</code> | |||
===on VScode=== | |||
* install extensions: Python(Microsoft), Jupyter (Microsoft) | |||
* after opening a project, select python interpreter: Ctl+Shift+P Python:Select interpreter | |||
=References= | =References= |
Revision as of 10:46, 22 September 2022
backup
backup list
/home/andre/bin /home/andre/CalibreLibrary* /home/andre/Documents /home/andre/Pictures /home/andre/.bashrc /home/andre/.icedove /home/andre/.mozilla /home/andre/.profile /home/andre/.Xauthority /home/andre/.xinitrc /home/andre/.ssh /home/andre/zotero.sqlite /etc/apt /etc/wpa_supplicant /usr/local/etc /var/www/html/wiki
Install software
apt
alsa-utils aptitude calibre curl evince feh ffmpeg gimp git gzip hdf5-tools i3 i3lock imagemagick inkscape libreoffice make mariadb-server mpv pandoc passwd pavucontrol pdftk pulseaudio-utils pulseaudio rdiff-backup sane-utils snap sudo terminator thunar thunderbird tmux unzip usbutils vim wireless-tools wpasupplicant xorg xsane zip
snap
1password
code
firefox
zoom-client
chromium sublime
compiled
tinc
own apt sources
vagrant
ansible
docker
virtualbox
Debian
non-free software
Once logged in into the installed system, it is possible to automate the detection of missing firmware, and to perform the required steps to enable them following this procedure: [1]
- Install the isenkram-cli package.
- Run the isenkram-autoinstall-firmware command as the “root” user.
- reboot: make sure all kernel modules are properly initialized
Setup Python version and virtualenvs with pyenv
Using https://realpython.com/effective-python-environment/ as reference
Globally:
- install pyenv [2]
- install pyenv-virtualenv: a pyenv plugin that provides features to manage virtualenvs
- first check if it is already installed:
ls $(pyenv root)/plugins/pyenv-virtualenv
- if so let it be, if not: follow the installation instructions
- first check if it is already installed:
- search for python remote versions available
pyenv install -l | grep -Po "^\s\s3\.9.*"
using python 3.9 - install python version:
pyenv install 3.9.14
- set global python version
pyenv global 3.9.14
- check global python version:
- restart shell:
exec $SHELL
- what python version:
python -V
>Python 3.9.14
- which python:
which python
>/home/andre/.pyenv/shims/python
- restart shell:
- upgrade pip:
$ python -m pip install --upgrade pip
- install packages which you want to use globally:
pip install jupyter pandas pytest
Locally (project based)
- create: python virtual environment:
pyenv virtualenv 3.9.14 hdf5
- activate it:
pyenv activate hdf5
- ... work work work ...
- deactivate it:
pyenv deactivate
on VScode
- install extensions: Python(Microsoft), Jupyter (Microsoft)
- after opening a project, select python interpreter: Ctl+Shift+P Python:Select interpreter