Questions tagged [python]

Python is an interpreted programming language that is often, but not solely, used as a scripting language. A version of Python is included by default on all Ubuntu distributions.

Filter by
Sorted by
Tagged with
1 vote
1 answer
6k views

Solving environment: failed

I want to install Tensorflow-GPU for Anaconda Python 3.6. How can I fix this? $ conda install -c anaconda tensorflow-gpu Solving environment: failed # >>>>>>>>>>>&...
Mona Jalal's user avatar
  • 4,545
1 vote
2 answers
3k views

terminal won't launch after installing python 3,7

I have the same problem as here. I'm running Ubuntu 18.04 LTS I did a bad job installing Python 3.7. I tried all that's proposed in the link, but terminal is still not working. I also removed and ...
jesus's user avatar
  • 41
0 votes
1 answer
2k views

Removing Electrum completely

I installed the Electrum wallet on Ubuntu 16.04 through sudo apt-get install python3-setuptools python3-pyqt5 python3-pip sudo python3 -m pip install https://download.electrum.org/3.2.3/Electrum-3.2....
user avatar
0 votes
0 answers
1k views

How to automatically re-run a process (python code) that keeps crashing using bash or terminal?

I have a Python code that keeps crashing while retrieving information from Twitter due to API limitations. How can I run the process again automatically every time it crashes? Traceback (most recent ...
Mona Jalal's user avatar
  • 4,545
2 votes
0 answers
932 views

New to Ubuntu 18.04, unable to install python3-dev

I am actually in the process of trying to install a GitHub project via PyPI. I'm having some difficulty getting it to install so someone recommended that I try sudo apt-get install python3-dev When I ...
thenewcoder's user avatar
1 vote
0 answers
349 views

sudo causes pip error during python mysql connector install?

Attempts to install the python mysql connect via pip fail when sudo is used. What is the cause and remedy? user@host:~$ sudo pip install mysql-connector [sudo] password for user: Sorry, try again. ...
gatorback's user avatar
  • 5,795
1 vote
0 answers
2k views

How do undo chmod 664 on a folder

I am trying to setup a webserver on an ubuntu server. I followed this guide to setup a my python app and it works great until I tried to add sqlite3 database. When running it on a apache, it couldnt ...
Deejpake's user avatar
  • 111
1 vote
1 answer
4k views

Cannot open Jupyter Notebook in Ubuntu 18.04 [closed]

I have installed Jupyter notebook using pip on my Ubuntu 18.04. It is apparently installed correctly, since when i type in terminal: which jupyter it returns /usr/local/bin/jupyter But when I ...
Sabbir Ahmed's user avatar
2 votes
2 answers
14k views

How to solve the error "Failed to launch Terminal" after upgrading python?

How to solve the error "failed to launch Terminal" failed to execute child process GNOME-Terminal ( No such file or directory ) ? Please HELP us to solve this error. Currently I have upgraded Python ...
Sakthivel A R's user avatar
1 vote
2 answers
810 views

On Ubuntu 16.04, pip is installing libraries to python 2.7

I'm new to Ubuntu and I'm trying to learn python. I use pyCharm IDE and python 3.5 but now when I'm trying to install libraries using the sudo pip command they are installing to python 2.7, so when I'...
sfdfdsfsd's user avatar
2 votes
0 answers
530 views

Creating a python "applet" for ubuntu (gnome) utility panel

I'm interested in creating an applet for the gnome "utility panel" in python. I really don't even need any interactivity. I just want to display some text and have it change occasionally based on ...
Mike Burr's user avatar
1 vote
0 answers
2k views

ImportError: cannot import name _remove_dead_weakref?

I tried docker to run program parliament2, facing import error issue ? docker run dnanexus/parliament2:hgsc -h Traceback (most recent call last): File "/home/dnanexus/parliament2.py", line 3, in ...
Keinv19's user avatar
  • 31
0 votes
0 answers
71 views

Launchpadlib how to get bug id from bug_link

I'm not sure if this is a python question or a launchpad question since I am new to both. I am getting a collection of bugs in a bug_task collection. I am running searchTasks. The API reference ...
Lewis M's user avatar
  • 755
0 votes
1 answer
1k views

how to call a cshell script with python [closed]

How can I call an external c shell script with python? The command line looks like this in Ubuntu: return_process 12345 123.zip "vv" 1 How can I modify it, if I am working with a stack, and the ...
Krsztr's user avatar
  • 457
0 votes
1 answer
126 views

Anaconda installation

Which anaconda version should i install for ubuntu18.04 for python3.6? Anaconda version for python3.7 is already available. Can it work for python 3.6? If not then which version is appropriate for ...
Doraemon's user avatar
-1 votes
1 answer
816 views

python get the correct path for a file

I want to write out the path of zipfiles, which are located in "zips" folder. Here is my code : import os, zipfile directory = 'zips' for filename in os.listdir(directory): if filename.endswith(...
Krsztr's user avatar
  • 457
0 votes
1 answer
6k views

No module named kivy.app

I am working on Python 2.7 in Anaconda in Spyder IDE. I am making a project using kivy and I am importing the following libraries and kivy packages: import numpy as np from random import random, ...
Utkarsh's user avatar
  • 671
0 votes
1 answer
1k views

Failing to import pandas in Anjuta "module functions cannot set METH_CLASS or METH_STATIC"

I have this boilerplate in a minimal Anjuta app that runs. I do not want to install pandas to the system python path so I am using Virtualenv. When I add import pandas as pd I get the following error ...
Diego's user avatar
  • 579
0 votes
0 answers
172 views

Grub disappeared after Python 3 removal

Grub has disappeared. A few days ago, I removed Python 3 and that screwed up the whole Ubuntu graphical interface. I fixed this by reinstalling Ubuntu-desktop. However, the Grub menu does not ...
glc78's user avatar
  • 481
1 vote
1 answer
255 views

Ubuntu 16.04 get stuck after Python 3 removal

My Ubuntu 16.04 LTS seems stuck and has lost its graphical interface after the removal of python3. I thought only python2 was crucial for the System. However: how to fix this mess? System does not ...
glc78's user avatar
  • 481
1 vote
0 answers
781 views

Unable to run "apt upgrade" on ubuntu 18.04 --systemd-shim error

I have recently upgraded to ubuntu 18.04 from ubuntu 14.04(via 16.04). This is the error I see whenever I run apt upgrade Reading package lists... Done Building dependency tree Reading state ...
waltwhitman's user avatar
3 votes
2 answers
2k views

What replaced Python's gnomekeyring module in Ubuntu 18.04/Bionic?

I have a large set of scripts which interact with Active Directory in a corporate/enterprise environment. Rather than have to type in my AD password on each run, I built a gnomekeyring store and ...
Scaine's user avatar
  • 11.1k
-1 votes
1 answer
1k views

re.search to get decimal number [closed]

I am trying to get a number from a text file. I need the full decimal number. The line looks like: corner_lat: 49.0425000 decimal degrees I'm trying this if "corner_lat" in line: ...
Krsztr's user avatar
  • 457
0 votes
2 answers
2k views

Not able to see the plug-in in GIMP after placing it in the plug-ins folder

I have installed GIMP2.10 in my Ubuntu 16.04. I have the following simple plug-in: #!/usr/bin/env python # Tutorial available at: https://www.youtube.com/watch?v=nmb-0KcgXzI # Feedback welcome: ...
Sum-Al's user avatar
  • 103
0 votes
0 answers
760 views

Cron job executing twice at one time

I have set my cron job to be executed every 15 minutes. my cron job is */15 * * * * /usr/bin/python3.6 /home/ubuntu/main.py >> /tmp/file Above job will execute every 15 minutes and send the ...
Sathiyakugan's user avatar
0 votes
1 answer
443 views

How can I install ebaysdk-python library? [duplicate]

I'm running Ubuntu 18.04.1 on a server and trying to install this library) but am having trouble as I'm quite new to Ubuntu and the instruction raise errors. The installation instructions from the ...
blountdj's user avatar
  • 101
5 votes
1 answer
2k views

Set virtualenv for file in Visual Studio Code python

I'm playing with Visual Studio Code on Ubuntu. One big problem is I can't figure out how to attach a virtualenv to a file. So, I open the file. On the lower left corner, I see the default path to the ...
user2413's user avatar
  • 14.3k
3 votes
1 answer
1k views

How to replace a Python 3 installation with Python 2.7

I already have Python 3 installed on the server machine, and I want to replace that with Python 2.7 as the code I have to deploy is complaint with Python 2.7. What command should I run so Python ...
SID's user avatar
  • 33
1 vote
1 answer
335 views

Custom notification from udev rule

My goal is to trigger a notification with custom actions when a specific storage device is mounted. Notifications are made in python with pynotify I run lsusb to get device's idVendor and idProduct ...
gaia's user avatar
  • 11
0 votes
1 answer
267 views

Launch Kazam with `python app.py`?

I'd like to test kazam (the screencast program) so I try to launch it from the source code. In the kazam directory, I've done: python app.py` but except some warning about gtk, nothing happens. Is ...
ThePhi's user avatar
  • 295
1 vote
0 answers
4k views

how to make python modules accessible by root

I am running an /etc/init.d script that which contains a line to run a python file like so python /home/my_user/some/file.py Since my /etc/init.d is being ran with sudo, I have noticed that certain ...
UCProgrammer's user avatar
0 votes
1 answer
662 views

How to append stderr to log_failure_msg in init.d script

To my understanding, in /lib/lsb/init.functions, log_failure_msg is the proper way to output a failure message to some log file. I was wondering if it were possible to do this. python some/script/...
UCProgrammer's user avatar
3 votes
0 answers
4k views

Unable to install python3-dev and python3's pyyaml package on ubuntu 18.04

Every single time I run the command sudo apt-get install python3-dev I get the following error: Reading package lists... Done Building dependency tree Reading state information... Done Some ...
mayank soni's user avatar
3 votes
1 answer
1k views

Which Python is running? [duplicate]

I've just now installed Python 3.7 and I'd like to understand why I get the following output from bash: g-luca@hp-notebook:~$ python3.7 -V Python 3.7.0 g-luca@hp-notebook:~$ python3 -V Python 3.5.2 g-...
glc78's user avatar
  • 481
5 votes
1 answer
12k views

Is it safe to remove python2 in ubuntu 18.04 LTS

I had Ubuntu 16.04 LTS for a long time because I was thinking to use Kail Linux, but I never got to installing it so I just got Ubuntu 18.04 LTS. Now I want to know if its safe to remove python2 ...
okistuff's user avatar
3 votes
1 answer
396 views

Is it possible to avoid setting path manually for python package executables?

I installed python 3 and pip3 into in Windows System for Linux shell that uses Ubuntu, but it appears I have to find and specify site-packages or $HOME/.local/bin directory manually if I want to run ...
Evgeny's user avatar
  • 141
0 votes
1 answer
1k views

Password from keyring: python get_password returns before keyring password is entered

(EDIT) This seems to be related to https://github.com/maebert/jrnl/issues/478, I get the same error. Sorry for not noticing it earlier, the keyring was already unlocked when I was testing it in a ...
Luc VdV's user avatar
  • 163
4 votes
1 answer
8k views

Virtualenv Permission denied when trying python setup.py install

I want to use virtualenv with Python 3 on Ubuntu 18.04. Specifically, I'm using Python 3.6.6 and virtualenv 16.0.0. I installed virtualenv with sudo as suggested in the answers here: sudo pip3 ...
stefanbschneider's user avatar
7 votes
3 answers
2k views

Disable python versions for certain users without uninstalling python

There are lots of different python versions in my ubuntu machine: /home$ ls /usr/bin/ | grep python dh_python2 dh_python3 python python2 python2.7 python3 python3.5 python3.5m python3m /home$ which ...
Caner's user avatar
  • 141
1 vote
1 answer
4k views

How to change the default version of python in ubuntu permanently [duplicate]

The default version of python in my Ubuntu 18.04 is 2.7. I've already used the command: alias python=python3 but it changes the python version temporarily, as soon as I close the terminal and re-...
Ashish Siwal's user avatar
0 votes
1 answer
1k views

pyarrow problem: No rule to make target '/usr/lib/x86_64-linux-gnu/libarrow_python.so'

I'm trying to install pyarrow using pip on Ubuntu 18. I'm using python 3.7 It fails with this message: -- Configuring done -- Generating done -- Build files have been written to: /tmp/...
Wessi's user avatar
  • 101
0 votes
0 answers
432 views

Does my init.d script look correct and do I need to reboot for it to work?

I've never made an init.d script before or any other sort of bash file so I'm uncertain if this is correct. If someone could let me know how the script looks then I'd appreciate it. For now, I would ...
UCProgrammer's user avatar
1 vote
2 answers
1k views

how can I use one specific version of python for everything in ubuntu 18.04?

I am having problems installing/uninstalling things with apt. I think this is because I have unistalled python and apt is trying to use it. I have miniconda, but when I use apt it is not accessing ...
neiltheory's user avatar
0 votes
1 answer
2k views

File extensions are hidden in ubuntu 18.04 Bionic

When typing in this command: touch ./__init__.py This is what the file looks like in nautilus > right click __init__.py: as you can see, its a text file instead of a py file. I am using ubuntu 18....
Tristan Berry's user avatar
0 votes
1 answer
126 views

How might an Ubuntu 18.04 system that has somehow had Python 2 removed be recovered?

A friend tried to help another friend on his Ubuntu 18.04 installation and that somehow involved (as far as I can figure) removing Python 2. This seems to have resulted in poor apt, apt-get and dpkg -...
BlandCorporation's user avatar
2 votes
1 answer
555 views

Accessing Python interpreter in Windows Subsytem for Linux, error in sshd_config?

I'm running into an issue with following a tutorial on How to configure a remote interpreter through WSL for PyCharm. My specific issue comes during the prerequisite part of this tutorial. I get up ...
Tyberius's user avatar
  • 130
0 votes
1 answer
1k views

Uninstalling Ubuntu 14.04, and installing Ubuntu 18.04 in its' place [duplicate]

How do I go about uninstalling Ubuntu 14.04 (such that all of my Python and path issues will be removed), and then install the newest version (Ubuntu 18.04) ... without using the typical upgrade ...
Canada709's user avatar
2 votes
1 answer
387 views

Cannot use Python, Ubuntu 14.04, issues with other packages

I've somehow broken my Ubuntu 14.04 install. A project I'm working on required me to install Jupyter notebook, which created some path issues (apparently I should have installed with anaconda rather ...
Canada709's user avatar
2 votes
1 answer
15k views

Unable to correctly install pip3 using apt-get

I am using Ubuntu 16.04, and was experiencing issues with my pip3. Specifically, when I attempted to uninstall a package via sudo pip3 uninstall I encountered Traceback (most recent call last): ...
ubrspug's user avatar
  • 111
2 votes
4 answers
2k views

How to correctly upgrade all python modules to newest stable versions with pip or pip3?

Let us consider that we have installed python-pip and python-pip3 packages to get pip and pip3 on our system. As far I can understand pips are package managers for pypi.org. I expect that they have ...
N0rbert's user avatar
  • 99.9k

1
37 38
39
40 41
104