pyproj.database and pyproj.aoi import failed - python

I have installed the pyproj.2.6.1 version, and I am using the python3.8.8; I can't correctly import the module query_utm_crs_info from pyproj package.
Here below the code :
from pyproj import Proj, Transformer, CRS
from pyproj.database import query_utm_crs_info
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'pyproj.database'
Similar problem with AreaOfInterest
from pyproj.aoi import AreaOfInterest
and I received this message
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'pyproj.aoi'
However, if I change it in to
from pyproj.transformer import AreaOfInterest
Any suggestions ?

https://pyproj4.github.io/pyproj/stable/api/database.html#pyproj.database.query_crs_info
query_crs_info was added in pyproj 3.

Related

ImportError: No module named torch in python

I am trying to run my python file. I am running this command:
python3 run.py --input_folder test_images/old_w_scratch --output_folder output --GPU 0 --with_scratch
But I get this error:
Running Stage 1: Overall restoration
Traceback (most recent call last):
File "detection.py", line 12, in <module>
import torch
ImportError: No module named torch
Traceback (most recent call last):
File "test.py", line 6, in <module>
from torch.autograd import Variable
ImportError: No module named torch.autograd
Traceback (most recent call last):
when i install torch, it installs properly. But then when i run this, it doesn't work. Any chances someone could help me with it?

Pyculib ImportError: cannot import name config

when trying to import pyculib I get ImportError: cannot import name config
I have tried pip installing and conda installing various versions of the cudatoolkit but none seem to work.
import pyculib
I get this error the first time I try to import pyculib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/andillio/anaconda2/lib/python2.7/site-packages/pyculib/__init__.py", line 49, in <module>
from . import blas, sparse, fft, rand, sorting
File "/home/andillio/anaconda2/lib/python2.7/site-packages/pyculib/sorting/__init__.py", line 1, in <module>
from .radixsort import RadixSort
File "/home/andillio/anaconda2/lib/python2.7/site-packages/pyculib/sorting/radixsort.py", line 38, in <module>
lib = load_lib('radixsort')
File "/home/andillio/anaconda2/lib/python2.7/site-packages/pyculib/sorting/common.py", line 24, in load_lib
libpath = os.path.join(findlib.get_lib_dir(), fullname)
AttributeError: 'module' object has no attribute 'get_lib_dir'
and this error if I try a second time
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named config

ModuleNotFoundError: No module named 'tensorflow.contrib.framework'

When i import tflearn in Python, it says ModuleNotFoundError: No module named 'tensorflow.contrib.framework', does someone know how to deal with this issue? Thanks.
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\User\Anaconda3\lib\site-packages\tflearn_init_.py", line 4, in
from . import config
File "C:\Users\User\Anaconda3\lib\site-packages\tflearn\config.py", line 5, in
from .variables import variable
File "C:\Users\User\Anaconda3\lib\site-packages\tflearn\variables.py", line 7, in
from tensorflow.contrib.framework.python.ops import add_arg_scope as contrib_add_arg_scope
ModuleNotFoundError: No module named 'tensorflow.contrib.framework'
The error message suggests the module is not installed/found.
For example, I do not have tflearn installed, but I have tensorflow installed.
>>> from tensorflow.contrib.framework.python.ops import add_arg_scope
>>> import tflearn
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'tflearn'
Try importing the whole tensorflow module and see if you are getting the same error. If so, try reinstalling the tensorflow module.

test_ssl.py and test_urllib2.py tests are failing in python2.7

test_ssl.py
root#yasir:/home/yasir/PYTHON/python2.7-2.7.6/Lib/test# python python test_ssl.py
Traceback (most recent call last):
File "test_ssl.py", line 7, in <module>
from test.script_helper import assert_python_ok
ImportError: No module named script_helper
test_urllib2.py
root#yasir:/home/yasir/PYTHON/python2.7-2.7.6/Lib/test# python test_urllib2.py
Traceback (most recent call last):
File "test_urllib2.py", line 3, in <module>
from test import test_urllib
ImportError: cannot import name test_urllib
I'm not able to understand which module is missing so facing this error
tests failed due to missing python module libpython2.7-testsuite

Error import six

I'm getting an error message while running python script. Below is the error message. Appreciate help to resolve the issue.
When I import "six.moves.http_client import HTTPConnection" it works, issue is when I import HTTPSConnection
>>> from six.moves.http_client import HTTPSConnection
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'HTTPSConnection'
>>> from six.moves.http_client import HTTPSConnection
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'HTTPSConnection'

Categories

Resources