Ubuntu 16.04 Python3.6 installation - python-3.6

I started using a computer at work that has Ubuntu 16.04 installed. Initially, Python3.6.8 was set as the version that was used if I entered the command 'python3' at the terminal. I updated Ubuntu using 'sudo apt-get update', installed miniconda and used the 'sudo apt-get autoremove' command. I followed the mini-tutorial on the anaconda website and one of the commands resulted in a warning about the pip version being old so I upgraded it inside a conda environment.
I noticed at some point that this error was occurring whenever I entered 'python3' at the commandline:
But as you can see, the default 3.5.2 version is there, but for some reason the 3.6.8 version doesn't seem to be there. These are the symlinks in /usr/bin and /etc/alternatives:
Is it safe for me to simply install Python3.6 using 'sudo apt-get install python3.6' and then the symlink will work correctly?
Thanks, any help appreciated.

Related

Creating a qt GUI in Noetic and issues with catkin_create_qt_pkg

I would like to create a QT GUI package in Noetic. Previously in kinetic/melodic, this could be done using the command 'catkin_create_qt_pkg ' but it's not working in Ubuntu 20.04 as I get
catkin_create_qt_pkg: command not found
Unfortunately, noetic appears to have removed the support for the qt-create and qt-build. Thus, I get 'Unable to locate package' when I try to install them using
sudo apt-get install ros-noetic-qt-build
sudo apt-get install ros-noetic-qt-create
how to create a qt-gui in ubuntu-20.04 with noetic?
System info
Ubuntu 20.04.2 LTS Kernel
5.10.0-1050-oem

Cannot install R - Unable to correct problems, you have held broken packages

We followed instructions here - https://rtask.thinkr.fr/installation-of-r-4-0-on-ubuntu-20-04-lts-and-tips-for-spatial-packages/ - to uninstall R:
sudo apt-get purge r-base* r-recommended r-cran-*
sudo apt autoremove
sudo apt update
...seems to have worked because when we run R in command line we get -bash: /usr/bin/R: No such file or directory. However, when we try to install R using:
apt install --no-install-recommends r-base
...version 3.6.3 is installed, not version 4.0 or 4.1. Here is our machine type.
What can we do to get R version 4.1.0 (preferred) installed on our machine? I am worried that, perhaps it is not possible as if it were, v4 would be the default rather than v3... might it be the case that 16.04 is too old for R v4?
Edit: followed the instructions in the comment below, but ran into the following issue:

I've installed python-3.9.1 and pip but while running the command python3 -V got the result as python 3.6.9 how do I get python version 3.9

sudo apt-get install python3.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3.7 is already the newest version (3.7.10-1+bionic2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
N: Ignoring file 'security' in directory '/etc/apt/sources.list.d/' as it has no filename extension
root#ubuntu:~# python3 -V
Python 3.6.9
I presume you are a Linux user. I faced a similar issue when I was trying to install Python
3.9 but when I ran python -V in the terminal, it would tell me I had version 2.
I can't guarantee
this will work but it worked for me. If you are using Ubuntu 20.04 a Linux distro, by default you have Python 3.9. In Ubuntu 18 and 16 there is also a Python version pre-installed. In your case, you need to first uninstall Python 3.
Using this command in the terminal.
sudo apt-get remove --purge python3
After uninstalling, reinstall as Python 3.9 version using this command:
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.9
python3.9 --version
Again if you're using an editor like Pycharm your base interpreter will be messed up! So please be careful when uninstalling.
And this code works on Ubuntu which I presume is what you are working on.
Another thing you need to install a repository to get Py 3.9. it's called deadsnakes I've mentioned the code above on how you could install it.
I hope you faced no issues. Remember it worked for me but I'm not sure it will work for you. Enjoy with Python 3.9 if the installation is successful :)

Are packages deleted when upgrading R on Linux?

Are packages deleted when upgrading R on Linux? I would prefer to just use the default package installation directory, instead of setting up a custom directory.
I'm aware I can setup a custom directory in the following manner:
cat >> ~/.Renviron
R_LIBS=/data/Rpackages/
I just wonder what happens if I don't issue the command above? Will packages be wiped every time I issue the command
sudo apt-get update && sudo apt-get upgrade
, and as a consequence R gets updated to the latest version?
#Jason, when you are doing sudo apt-get update && sudo apt-get upgrade, it just upgrade packages that have a new version in your list of repositories. There is no reason it will modify R packages already installed.
I'm also running Linux and R and the only time I have to re-install R packages is when I re-install my system. My R packages are installed by default in /usr/local/lib/R/site-library

error installing qt-sdk on linux

i have ubuntu-10.10 desktop version i installed following packages using apt-get install
libglib2.0-dev
libSM-dev
libxrender-dev
libfontconfig1-dev
libxext-dev
libgl1-mesa-dev
libglu-meas-dev
i downloaded qt-sdk-linux-x86-opensource-2010.05.1.bin
changed permission of bin file
chmod u+x qt-sdk-linux-x86-opensource-2010.05.1.bin
./qt-sdk-linux-x86-opensource-2010.05.1.bin
it gives me an error like not able to create symbolic link to libQtCore-4.7.0 and installation aborts.
can any one suggest me what is going wrong and how can i over come this issue
You can just install qt-sdk package from Ubuntu repositories, if you must install by hand, try running it with sudo;
sudo ./qt-sdk-linux-x86-opensource-2010.05.1.bin

Resources