Questions tagged as ['python3']

tapabrata@lappy : openshot-qt
Loaded modules from: /usr/lib/python3/dist-packages/openshot_qt
(python3:2102986): Gtk-WARNING **: 09:34:30.010: Theme parsing error: gtk.css:2515:35: '-2px' is not a valid color name
(python3:2102986): Gtk-WARNING **: 09:34:30.011: Theme parsing error: gtk.css:2521:35: '-3px' is not a valid color name
(python3:2102986): Gtk-WARNING **: 09:34:30.017: Theme parsing error: g ...
so i'm currently running ubuntu 20.04 on WSL2 (i'm also a newbie in linux) and i use python inside it, and recently i install python 3.9.4, is there's any way to remove python 3.8 and setting 3.9 as default ? i didn't try anything yet since idk much (yet) about linux especially ubuntu
Currently when I run python3 --version
the out put Python 3.9.1
. I have been told that I need python version 3.8 to do what I want (use ros noetic without issues). I have tried to follow a couple of guides online to use python version 3.8, however, nothing works. I have even deleted 3.9.1 files but I still get the same output when checking the version. Don't really get how makes sense.
How can I set ...
I did
conda update spyder
This does'nt seem to work.What else could I do?
I am currently facing a problem when executing :!python3 %
in vim.
:!python3 test_glove.py
Traceback (most recent call last):
File "test_glove.py", line 13, in <module>
for line in f.readlines():
File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 1387: ordi ...
I created a python 3.9.7 virtual environment using virtualenv. This is a different python version than my system python. When I try install jupyter via pip install jupyter
I get the following error:
Traceback (most recent call last):
File "/usr/bin/Python-3.9.7/Lib/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/bin/Python-3.9.7/Lib/runpy.py", li ...
I'm trying to install python3.8 on Ubuntu.
I tried a lot of command, but none of them works. I'm trying this:
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev \
libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev`
to install the prerequisites, and I get this error:
Reading package lists... Done
Building dependency tree... Done
Reading state information... ...

I am trying to build a software in Launchpad, but I get the error
ModuleNotFoundError: No module named 'glm'
I found https://pypi.org/project/PyGLM/ but I could not find any package titled python3-pyglm
in https://packages.ubuntu.com/.
Is this package available under some other name? Note that installing from pip is not an option while building in Launchpad.
I am truly stumped.
This command works perfectly fine if I enter it at a terminal prompt in Ubuntu 20.04:
python3 -c 'import hddcoin.util.bech32m as b; print(b.decode_puzzle_hash("awalletaddress"). hex())'
But if I do the same command in a bash script:
PUZZLEHASH=$(python3 -c 'import hddcoin.util.bech32m as b; print(b.decode_puzzle_hash("awalletaddress"). hex())')
I get "command not found". If I chang ...
I would like to try to learn Python, but Sublime text 4, as I try to run any test script by pressing CTRL + B gives me confirmation that it has been executed, but no output.
import sys
print(sys.platform)
The result:
[Finished in 19ms]
Any ideas what I'm doing wrong? is it a configuration error? If so, which one?
Does this error happen to everyone?
Install Ubuntu Focal Fossa.
Then install the python3-pip (At this stage, Python3 is installed automatically)
Python 3.8.10 (default, Jun 2 2021, 10:49:15) [GCC 9.4.0] on linux Type "help", "copyright", "credits" or "license" for more information.
After you have created the username and made the settings:
sudo python3 >>> help() help> modules
I set up a robot to take screenshots of movies in Telegram In front of hosts: I put localhost, when I run it with the command python3 - m bot and send a file to the robot, it sends me a message
file/342271090/241: No such file or directory
is sent. Where is the problem?
- Before that, I set up a git stream on a dedicated server, which I put in front of Host: localhost and in front of public_url: my d ...
I recently swapped over from Windows to Ubuntu.
In Windows when I did any sort of coding I used the anaconda prompt which was separate to the command prompt to run any commands relevant to python.
However when switching over to Ubuntu, there is only one terminal onto which I have downloaded Anaconda. It now shows the same format as anaconda prompt in windows i.e. beginning with (base)
.
I was wonderi ...
I am trying to install sqlite onto the raspberry pi I have been using. The following error code appears and any attempts to fix it have failed so far. I have tried reinstalling python3.6, purging the named modules, attempted changing the PYTHONHOME as well as many other commands seen on similar forums. Please let me know if there are any ideas for fixing this error.
Reading package lists... Done
Bu ...

So I install python 3.8:
justin@justin-Precision-5550:/usr/lib$ sudo aptitude install python3.8
[sudo] password for justin:
The following NEW packages will be installed:
libpython3.8-minimal{a} libpython3.8-stdlib{a} python3.8
python3.8-minimal{a}
0 packages upgraded, 4 newly installed, 0 to remove and 0 not to upgrade.
Need to get 0 B/4,550 kB of archives. After unpacking 18.5 MB will be us ...
import matplotlib.pyplot as plt
import numpy as np
plt.style.use('seaborn-white')
ax1 = plt.axes()
ax2 = plt.axes([0.65, 0.65, 0.2, 0.2])
plt.show()
I have installed matplotlib using 'sudo apt-get install python3-matplotlib'and I have also tried installing it using 'pip'and 'pip3' but yet, I get the response that matplotlib has already been installed with the latest version and if i run my code i ...
I end up asking for help on this forum since I tried multiple approaches to solve my problem but I could'nt find any solution... So apparently I have unmet dependencies and when following apt advise, running apt --fix-broken install
returns :
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages wil ...
When exit the application it doesn't close While closing the application I selected terminate the process but the application is on screen I can't close
I can use other applications but pycharm stuck/freez
I have to restart the laptop to close the application
What to do??
I created 60 crontab
jobs to run python
script every second and the python scripts it was just a test and it only contain the following:
import notify2
from datetime import datetime
notify2.init('')
n = notify2.Notification('test', datetime.now().strftime('%I:%M:%S'))
n.set_timeout(1000)
n.show()
and crontab job is:
* * * * * DISPLAY=':0' XAUTHORITY='/run/user/1000/gdm/Xauthority' python3 /path/t ...
I created a new python environment a few weeks back and installed some packages in there. But now when I activate the environment and install a package with pip, it installs the new package in the main system instead of installing in the environment.
I'm in Ubuntu 20.04. Using python3.8
I'm using Docker, and my dockerfile is:
######################################################
FROM ubuntu:20.04
WORKDIR /opt/test
# Apt installs
RUN apt update
######################################################
If I build and run the container, and then run the following, it asks to install python3-minimal, and Python dependencies:
$ docker run -it ubuntu-test
root@3a13a90d3e86:/opt/test# ...

I recently upgraded my default python version from 2.7 to 3.9. I updated and upgraded, everything working fine except the gnome-tweak is not working or not apprearing.
Any kind of information would be appreciated.
I have multiple versions of Python (2.7 - Default, 3.5, 3.7.0a1 ) installed on my server. And along with that pip also got installed. I want to remove all except 2.7. Please let me know how to do it.
I am new to MININET and Python. I have installed Ubuntu20.04 on my VM16 and installed Python3 and Mininet accordingly. To understand the topology and its behavior with SDN controller, I have run the test case i.e. https://github.com/mocast/OpenFlow_Loop_Solution
I have run this topology but facing problem in POX SDN Controller (custom-pox.py). In order to get successful host-host ping test, SDN controlle ...
I am running Ubuntu 20.04 on Windows 10 using WSL2.
I am trying to connect to bitcoin testnet server on my machine 127.0.0.1 through Python
The python scripts work fine on Pycharm, Command Prompt and Powershell, and up until very recently worked fine in Ubuntu when i was runnign it on WSL1
Having switched to WSL2 for Ubuntu I receive the following error despite at the same working in CMD, PS, and Pycha ...
I am trying to install anaconda. In my computer. I already had anaconda, but I uninstalled that, now again I am reinstalling it, but I am facing a weird error. that:
subprocess.CalledProcessError: Command 'lsb_release -a' returned non-zero exit status 1.
[15057] Failed to execute script entry_point
I am also not able to create a virtual python environment
here is my full error
PREFIX=/home/haseef/an ...

Using a Jupyter Notebook running with the python2 kernel, I tried to import emcee
and I got an error message:
File "/home/me/.local/lib/python2.7/site-packages/emcee/ensemble.py", line 84
parameter_names: Optional[Union[Dict[str, int], List[str]]] = None,
^
SyntaxError: invalid syntax
apparently because I am using the python2 kernel.
I then installed ipykernal using: pytho ...
I accidentally removed pycache folder in my computer running ubuntu 18.04 lts and when I try to restore it gives me the error message
Item in the trash may not be modified
How to fix this?
I need use torsocks for nicotine+ ...when I run "torsocks nicotine" I have this errors:
GtkDialog mapped without a transient parent. This is discouraged.
1626685826 WARNING torsocks[29580]: [syscall] Unsupported syscall number 217. Denying the call (in tsocks_syscall() at syscall.c:488)
1626685826 WARNING torsocks[29581]: [syscall] Unsupported syscall number 217. Denying the call (in tsocks_syscal ...
I actually have 3 different python interpreters:
- Python 2.7.8 (I know that 2.7.8 comes with Ubuntu)
- Python 3.8.10 (I use it for daily python projects)
- Python 3.9.6 (I don't use it any time)
so I want to get rid of Python 3.9.6
How can I only uninstall Python 3.9.6?