If your raspberry pi is somehow stuck in read-only mode after restart, it can often be released with the following commands:
sudo su
mount -o remount, rw /
exit
| # List all currently running processes: | |
| ps -a | |
| # Look for one that says "python" or "python3" in the output, like this: | |
| PID TTY TIME CMD | |
| 1218 tty1 00:00:00 bash | |
| 1169 pts/0 00:00:00 python | |
| 8960 pts/1 00:00:00 ps | |
| # Use the command "kill -KILL [PID#]" to stop the python process. For this example, the command was |
| # Create virtual environment | |
| mkvirtualenv -p python3 PROJECTNAME | |
| # From inside the environment install ipykernel | |
| pip install ipykernel | |
| # Install a new kernel | |
| ipython kernel install --user --name=PROJECTNAME | |
| # Start Jupyter lab |
If your raspberry pi is somehow stuck in read-only mode after restart, it can often be released with the following commands:
sudo su
mount -o remount, rw /
exit
| sudo apt-get update -y && sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev -y && wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz && tar xf Python-3.7.0.tar.xz && cd Python-3.7.0 && ./configure && make -j 4 && sudo make altinstall && cd .. && sudo rm -r Python-3.7.0 && rm Python-3.7.0.tar.xz && sudo apt-get --purge remove build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev -y && sudo apt-get autoremove -y && sudo apt-get clean |
| ### Forked from Rizkyario, implemented improvements based on | |
| ### Pyimagesearch https://bit.ly/2PJsK1Y, and adapted to: | |
| ### - install OpenCV 4.0 | |
| ### - install with both 2.7 and 3.x versions of python | |
| ### - work with virtual environments | |
| # 1. Install Xcode | |
| # Before we can even think about compiling OpenCV, we first need to install Xcode, | |
| # which can be downloaded in the app store |