No module named 'pysvn._pysvn' - python-3.7

On ubuntu18.04,
I installed pysvn by using :
sudo apt-get install python3-svn
The module is present by running help("modules") in a venv with python3.7
But when I ran my script I had an error saying that:
/usr/lib/python3/dist-packages/pysvn/__init__.py": ModuleNotFoundError: No module named 'pysvn._pysvn'
How can I resolve this problem?

Related

I got an error while creating virtualenv. It thows cmd not defined error

└─$ python3 -m venv venv
Error: name 'cmd' is not defined
┌──()-[~/Documents/Software Development/DjangoAuth/simplejwt]
└─$ source venv/bin/activate
source: no such file or directory: venv/bin/activate
It used to work fine on my other laptop while I just freshly installed new OS here, it throwing an odd error.
This bug report (found by search) suggests you don't have python-venv package installed. Install it:
sudo apt-get install -y python3-venv
The error message is due to a conflict in the versions of Python installed on my system. The package python3.10-venv depends on version 3.10.8-3 of Python, but version 3.10.9-1 is to be installed.
To resolve this issue, I tried the following:
Check the version of Python I have installed by running the command python3 --version.
If I have a version of Python other than 3.10.8-3, I tried uninstalling it and installing version 3.10.8-3 instead.
Once I have installed the correct version of Python, I install the python3-venv package again using the sudo apt-get install -y python3-venv command and it worked.
Thanks all who helped!

Python3: can't find '__main__' module in 'uncompyle6'

I have archlinux with python 3.7.13 installed from aur when i run uncompyle6 i get the following error:
$ python3.7 uncompyle6
/usr/bin/python3.7: can't find '__main__' module in 'uncompyle6'

python 3.6 pip install fails for distutils installed projects on ubuntu 16.04

I am running ubuntu 16.04 and have some python code that uses features from python 3.6. I have been able to install some libraries (scipy) with python3.6 and pip3.6. However there have been a few libraries (pycurl) for which using pip install is not working :
$sudo python3.6 -m pip install pycurl
Requirement already satisfied: pycurl in /usr/lib/python3/dist-packages (7.43.0)
This does not allow me to import pycurl in my python3.6 environment.
And if I instead use upgrade I get an error about pycurl being a distutils installed package.
How can I get access to pycurl for my python3.6 install?
$ sudo python3.6 -m pip install --upgrade pycurl
The directory '/home/riaps/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/riaps/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pycurl
Downloading https://files.pythonhosted.org/packages/77/d9/d272b38e6e25d2686e22f6058820298dadead69340b1c57ff84c87ef81f0/pycurl-7.43.0.1.tar.gz (195kB)
100% |████████████████████████████████| 204kB 2.8MB/s
Installing collected packages: pycurl
Found existing installation: pycurl 7.43.0
Cannot uninstall 'pycurl'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
So the problem seems to have been that it was installed in /usr/lib/python3/dist-packages. By running sudo pip3 install --upgrade pycurl It was moved to : /usr/local/lib/python3.5/dist-packages and then sudo python3.6 -m pip install pycurl could install.
I don't know why this was a problem, but it resolved the issue.

unable to install jd-gui on ubuntu 16.04,64 bit machine

Getting following error:
error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
Already tried installing using below cmd:
sudo apt-get install ia32-libs-gtk
Getting error for this too:E: Unable to locate package ia32-libs-gtk
Seems you need to install x86 version:
sudo apt-get install libgtk2.0-0:i386

from pysnmp.hlapi import * ImportError: No module named hlapi

I install the package and it dependencies module in ubuntu 15.10 but still it show error of
from pysnmp.hlapi import *
ImportError: No module named hlapi
I try to install it
sudo setup.py install
and
pip install pysnmp
But still its not working
Please help me to get it complete
apt-get install python-pip
pip install -U pysnmp
I find the solution
Remove all .egg file related to plugin then install with pip it work for me