Questions tagged [python3]

387 questions
5
votes
0 answers

Change the Python default version in Ubuntu

I have installed python 3.10 on my Ubuntu. Now I have there two versions: 3.8 and 3.10. I would like to set Python 3.10 as a default. I followed the advice here: Change the Python3 default version in Ubuntu ls /usr/bin/python* /usr/bin/python3 …
vojtam
  • 151
1
vote
1 answer

Deploying flask app with apache2

I'm trying to deploy a simple hello world flask app on a linux server (Ubuntu 18.04.3). I'm logged into the linux box as bobtheuser. However, when I access the , I only see the contents "Index of/" listing the contents of /var/www/html/, i.e. the…
AndreyIto
  • 349
1
vote
1 answer

Getting error installing virtualenvwrapper and distutils

I am trying to install virtualenv but getting the below error on ubuntu bionic rock64@rockpro64:~$ pip3 install virtualenv virtualenvwrapper Traceback (most recent call last): File "/usr/bin/pip3", line 9, in from pip import main …
1
vote
2 answers

python module not found error

testuser at ~]-pip3 install Request Requirement already satisfied: Request in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (2019.3.22) Requirement already satisfied: post in…
Biks
  • 11
1
vote
1 answer

python3 points to python2.7.6

I think I jacked up my python install by trying to mess around with virtual environments when I wasn't paying enough attention. python3 --version Python 2.7.6 But I'm not sure how this is the case when I check the bin: ls -lah…
0
votes
1 answer

Problem with logic in python script

#!/usr/bin/env python3 # tarchiver.py # Purpose: Creates a tar archive of a directory # # USAGE: ./tarchiver.py # # Author: # Date January 15th 2023 import os correct_answer = 'yes' correct_answer2 = 'no' compression1 = 'gzip' compression2 =…
0
votes
3 answers

can't install mu-editor

The os and python version: uname -a Linux yyyy 4.19.0-0.bpo.9-amd64 #1 SMP Debian 4.19.118-2+deb10u1~bpo9+1 (2020-06-09) x86_64 GNU/Linux python3 -V Python 3.5.3 My microbit version: Interface Version: 0255 Bootloader Version: 0255 Install…
scrapy
  • 333
0
votes
1 answer

how can we capture exit code of bash script while running the bash script in python

I am executing a bash script using subprocess module. subprocess.call(['temp.sh']) As per python if the temp.sh file is present it calls the script and it doesn't worry about the success or failure of temp.sh. I want to capture the exit code of…
0
votes
0 answers

Can a python3 subprocess feed directly into another?

Linux Mint 18.3, python 3.5.2. Is something similar to this program possible? #!/usr/bin/env python3 import subprocess wlist = subprocess.run(['wc', '-w'], stdin=subprocess.run(['ls'],stdout=subprocess.PIPE, universal_newlines=True), …
0
votes
1 answer

Controlling the Keyboard and Mouse with GUI Automation - install

What is the problem here please? I try to install https://automatetheboringstuff.com/chapter18/ sudo pip3 install --user python3-xlib Traceback (most recent call last): File "/usr/bin/pip3", line 9, in from pip import…
Archie
  • 45
0
votes
1 answer

Installing and uninstalling Python 3.x (versions 3.5 / 3.4.3)

I just installed Python 3.5 (and its 2908 library files) using synaptic on top of my existing functional Python 3.4 install in Ubuntu 14.04. Looking at the result, after install: $ cd /usr/bin $ ls -lsAFi python* 393463 0 lrwxrwxrwx 1 root root 18…
Cbhihe
  • 2,701
-5
votes
1 answer

Cannot import Python module in terminal

I am using Kali Linux, and trying to run some Python3 code. But it always gives me such an error log. However, latter I get out of that directory and navigate to my home directory, it works again. I am thinking that maybe it has something to do…