ubuntu-16.04

How to completely uninstall python 2.7.13 on Ubuntu 16.04

How to completely uninstall python 2.7.13 on Ubuntu 16.04 Question: I installed Python 2.7.13 on Ubuntu 16.04 according to this guide, and it became the default version as an alternative to the version 2.7.12. But, I wanted to completely remove Python 2.7.13 and return back to the version 2.7.12 as the default version since the …

Total answers: 6

Why can't I install python3.6-dev on Ubuntu16.04

Why can't I install python3.6-dev on Ubuntu 16.04? Question: I am trying to install it with this command: sudo apt-get install python3.6-dev But I’m getting this error: E: Unable to locate package python3.6-dev E: Couldn’t find any package by glob ‘python3.6-dev’ E: Couldn’t find any package by regex ‘python3.6-dev’ Why am I getting this error …

Total answers: 6

How to restore after accidentally apt-get remove python

How to restore after accidentally apt-get remove python Question: Yeah. I’ve done this. It was stupid. I did not know it’s going to take its dependencies with itself, only wanted to install python 2 and 3 from scratch (because of this problem: https://askubuntu.com/questions/897355/how-to-change-default-idle-for-python). Now, I can still use my terminal, checked these answers: https://askubuntu.com/questions/741265/apt-get-remove-python-150mb-apt-get-install-python-687kb https://askubuntu.com/questions/437644/i-accidentaly-did-sudo-apt-get-remove-python …

Total answers: 7

Getting an "invalid syntax" when trying to perform string interpolation

Why am I getting "invalid syntax" from an f-string? Question: I cannot get f-strings to work in Python 3. I tried this at the REPL: In [1]: state = "Washington" In [2]: state Out[2]: ‘Washington’ In [3]: my_message = f"I live in {state}" File "<ipython-input-3-d004dd9e0255>", line 1 my_message = f"I live in {state}" ^ SyntaxError: …

Total answers: 3

Unable to set default python version to python3 in ubuntu

Unable to set default python version to python3 in ubuntu Question: I was trying to set default python version to python3 in Ubuntu 16.04. By default it is python2 (2.7). I followed below steps : update-alternatives –remove python /usr/bin/python2 update-alternatives –install /usr/bin/python python /usr/bin/python3 but I’m getting the following error for the second statement, rejeesh@rejeesh-Vostro-1015:~$ …

Total answers: 24

command 'x86_64-linux-gnu-gcc' failed with exit status 1

command 'x86_64-linux-gnu-gcc' failed with exit status 1 Question: I tried to install “scholarly” package, but I keep receiving this error: x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o build/temp.linux-x86_64-2.7/_openssl.c:434:30: fatal error: openssl/opensslv.h: No such file or directory compilation terminated. error: command ‘x86_64-linux-gnu-gcc’ …

Total answers: 4

What is "pkg-resources==0.0.0" in output of pip freeze command

What is "pkg-resources==0.0.0" in output of pip freeze command Question: When I run pip freeze I see (among other expected packages) pkg-resources==0.0.0. I have seen a few posts mentioning this package (including this one), but none explaining what it is, or why it is included in the output of pip freeze. The main reason I …

Total answers: 3

Why does pip freeze list "pkg-resources==0.0.0"?

Why does pip freeze list "pkg-resources==0.0.0"? Question: On Ubuntu 16.04 with virtualenv 15.0.1 and Python 3.5.2 (both installed with apt) when I create and activate new Python virtual environment with virtualenv .virtualenvs/wtf -p $(which python3) –no-site-packages source .virtualenvs/wtf/bin/activate I get the following output: Already using interpreter /usr/bin/python3 Using base prefix ‘/usr’ New python executable in …

Total answers: 2

Can not start elasticsearch as a service in ubuntu 16.04

Can not start elasticsearch as a service in ubuntu 16.04 Question: I have recently upgraded my machine from Ubuntu 14.04 to 16.04. I am facing problem of using the elasticsearch as a service. I installed elasticsearch using: sudo apt-get install elasticsearch Now sudo service elasticsearch status command shows me this result: elasticsearch.service – LSB: Starts …

Total answers: 6

Upgraded to Ubuntu 16.04 now MySQL-python dependencies are broken

Upgraded to Ubuntu 16.04 now MySQL-python dependencies are broken Question: I just upgraded my Ubuntu install to 16.04 and this seems to have broken my mysql dependencies in the MySQL-python package. Here is my error message: File “/opt/monitorenv/local/lib/python2.7/site-packages/sqlalchemy/engine/__init__.py”, line 386, in create_engine return strategy.create(*args, **kwargs) File “/opt/monitorenv/local/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py”, line 75, in create dbapi = dialect_cls.dbapi(**dbapi_args) File …

Total answers: 8