Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

-3
votes
0answers
30 views

Why my program get closed in Linux? [on hold]

I am using a Linux based device and I am trying to run three python scripts in this device to upload data to server. But after running few hours (about 12 to 30 hours) one of the three code get ...
2
votes
0answers
27 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 ...
0
votes
0answers
11 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. ...
1
vote
0answers
31 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 ...
0
votes
1answer
28 views

Cannot open Jupyter Notebook in Ubuntu 18.04

I have installed Jupyter notebook using pip on my Ubuntu 18.04. It is installed correctly since when i type in terminal: which jupyter returns /usr/local/bin/jupyter But when i run this jupyter ...
-2
votes
0answers
15 views

Choose execution script, tor or vpn [on hold]

I've created a python script to do some scraping. To avoid being recognized as a bot I do it by tor and periodically change my public IP address. I noticed, however, that my public ip always come from ...
1
vote
1answer
46 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 ...
0
votes
0answers
22 views

pip issue after Ubuntu upgrade from 16 to 18

Recently I upgraded my Ubuntu from 16 to 18. I faced a problem with pip command which I have been struggling for a few last days. The problem is that after the upgrade my pip3 used python2, i.e. I had:...
-1
votes
0answers
18 views

How to write the script in shell or python to fatche the data in json by smbiosDump [on hold]

Location: "P1_DIMMVf" Manufacturer: "Samsung" Serial: "1343EC23" Part Number: "M393B2G70QH0-" Size: 16 GB Location: "P1_DIMM23" Manufacturer: "Samsung" Serial: "1343EC2B" ...
0
votes
0answers
11 views

Kubuntu Tensorflow-GPU CUDA 9 and cuDNN 7.0/7.1 installed

I would like to receive some help over here in a weird situation. So I've tried multiple combinations of CUDA with cuDNN but I didn't succeed in any of them. Currently, I'm using: OS: Kubuntu 18.04 ...
1
vote
2answers
37 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'...
1
vote
0answers
21 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 ...
0
votes
0answers
45 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 ...
0
votes
0answers
7 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 ...
0
votes
0answers
32 views

unable to package .py and .sh files in binary format

My requirement is i need to package the below items authenticate.py script.sh trained.dat Once it is installed in the client place the source code should not be visible and the client can access ...
0
votes
0answers
17 views

How can I start an application on start up without the user seeing the login screen or the desktop?

I'm using Ubuntu on an up-squared board. The goal is to start a Python application on start up. The application needs to be immediately loaded without the user seeing the log in screen or any Ubuntu ...
0
votes
0answers
20 views

What else can I do to fix a ImportError: liblapack.so.3gf error?

Ive got the following error when trying to run a python script in my VirtualBox Vm (its on Ubuntu 16.04) which I am using to run QIIME sequence analysis: ImportError: liblapack.so.3gf: cannot open ...
0
votes
1answer
42 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 ...
1
vote
0answers
121 views

debian server error [closed]

Hello I have this error: apt-get: relocation error: /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0: symbol _ZN3URIcvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEB5cxx11Ev version APTPKG_5.0 ...
0
votes
0answers
7 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 ...
-2
votes
0answers
26 views

How to get item value in python variable? [closed]

this python d variable. d = {'dist': '44', 'ner': 'Seattle'} I want get only 'Seattle' value without using loop.
-2
votes
0answers
28 views

How to get special attribute value in python [duplicate]

d = {'dist': '44', 'ner': 'Seattle'} I wish get only 'Seattle' value
-1
votes
1answer
33 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(...
0
votes
1answer
46 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, ...
0
votes
0answers
23 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 ...
0
votes
0answers
37 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 ...
1
vote
1answer
31 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 ...
1
vote
0answers
47 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 ...
0
votes
0answers
9 views

How to combine two data frames in python with different number of rows conditionally?

I have two CSV files with the same number and type of columns but with a different number of rows. Below is a sample data in each file: df1: N x y z 20 0.62 6.21 1.24 30 0.92 ...
1
vote
0answers
17 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 ...
-1
votes
1answer
61 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: ...
0
votes
2answers
21 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: ...
0
votes
0answers
38 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 ...
0
votes
0answers
14 views

Error in Dockerfile while building postgresql10, What base image should I use?

ENV PG_MAJOR 10 ENV PG_VERSION 10.1-1.pgdg80+1 RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list RUN apt-get update \ &...
0
votes
1answer
34 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 ...
0
votes
0answers
28 views

How the read the data inside the file without opening it

I have mounted my SD card into my Linux System and would like to get it's CID no. On opening /sys/block/sdb/device/cid gives me the CID no of the SD card. How would I store it in my python ...
0
votes
0answers
15 views

Ubuntu GNOME desktop development [duplicate]

Can we use GTK and Glade in Ubuntu 16.04 which are meant to be used for GNOME environment. I have to develop a python GUI in Ubuntu 16.04. Is it possible ?
4
votes
0answers
85 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 ...
3
votes
1answer
252 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 ...
0
votes
0answers
31 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 ...
0
votes
1answer
14 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 ...
0
votes
0answers
26 views

Can't run Basemap

I installed Basemap using conda install basemap and also I run conda install basemap-data-hires But I'm still getting the same error ModuleNotFoundError: No module named 'mpl_toolkits.basemap' I ...
0
votes
0answers
19 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 ...
0
votes
0answers
32 views

compile python to android apk - buildozer

If I run buildozer android debug on ubuntu 18.04 I get the following error. # Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=firstgame --bootstrap=sdl2 --...
0
votes
1answer
22 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/...
0
votes
0answers
42 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 ...
3
votes
1answer
73 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-...
0
votes
0answers
62 views

Can't install anything, problem with python 2.7 but can not re-install python

@user535733 I re-installed the original file i had a problem with, and that error stopped. Now however i have another error that is to do with python: Setting up python2.7 (2.7.15~rc1-1) ... Sorry:...
0
votes
1answer
59 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 ...
2
votes
1answer
29 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 ...