unable to import from bitcoinrpc.authproxy import AuthServiceProxy - python

Am getting a module not found error - from bitcoinrpc.authproxy import AuthServiceProxy. the log below you can see that import bitcoinrpc is ok. am I missing something or did authproxy move or ?? thx
PS C:\python38> cd c:\python39
PS C:\python39> python
Python 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', 'C:\\Python39\\python39.zip', 'C:\\Python39\\DLLs', 'C:\\Python39\\lib', 'C:\\Python39', 'C:\\Python39\\lib\\site-packages']
>>> from bitcoinrpc.authproxy import AuthServiceProxy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'bitcoinrpc.authproxy'
>>> import bitcoinrpc
>>>

Related

numpy module is not found although installed but import numpy works

I want to run the python script which imports numpy module.
When I am trying to run, it gives me error as numpy Module not found
C:\BSW_development\bp_plarp\Tools\PicoScope>test_pwm.py
Traceback (most recent call last):
File "C:\BSW_development\bp_plarp\Tools\PicoScope\test_pwm.py", line 24, in <module>
from lib_pico2000a import ScopeCapture
File "C:\BSW_development\bp_plarp\Tools\PicoScope\lib_pico2000a.py", line 20, in <module>
import numpy as np # linspace
ModuleNotFoundError: No module named 'numpy'
although its being installed
C:\BSW_development\bp_plarp\Tools\PicoScope>python
Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.version.version
'1.19.5'
>>> exit()`

ImportError: No module named parse even after installing dataset and parse

I get the following error. I also installed PIP Parse and dataset using PIP install
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import dataset
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27amd64\lib\site-packages\dataset\__init__.py", line 3, in <module>
from dataset.database import Database
File "C:\Python27amd64\lib\site-packages\dataset\database.py", line 3, in <module>
from urllib.parse import parse_qs, urlparse
ImportError: No module named parse

Unable to import python module in custom environment

I am trying to import PyQt5 module in a custom python environment but it fails.
I have tested it with the system python and works fine
juan#juansphd:~/blender-2.82a-linux64/2.82/python/bin$ python3
Python 3.6.9 (default, Apr 18 2020, 01:56:04)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt5.QtCore
>>>
but when I run python3 of my custom environment, it fails to load it
juan#juansphd:~/blender-2.82a-linux64/2.82/python/bin$ ./python3.7m
Python 3.7.4 (default, Oct 8 2019, 15:23:02)
[GCC 6.3.1 20170216 (Red Hat 6.3.1-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt5.QtCore
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'PyQt5'
>>>
I have tried adding /usr/lib/python3/dist-packages, where PyQt5 is installed, into the sys.path but doesnt work neither
>>> sys.path.append("/usr/lib/python3/dist-packages")
>>> import PyQt5.QtCore
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'PyQt5.QtCore'
>>>
How should I import the module?

ModuleNotFoundError: No module named '' . in the same folder

I have two python files(qq.py and ww.py) are in the same folder.
code in qq.py is:
print('123x')
code in ww.py is:
import qq
when I execute ww.py in CMD, the error was appered:
Traceback (most recent call last):
File "ww.py", line 1, in <module>
import qq ModuleNotFoundError: No module named 'qq'
I don't know if there are some configuration errors.
It would be great If someone can help me work through this issue.
This is my python version.
Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
enter image description here
I have changed the code in ww.py
import os
import sys
sys.path.append(os.getcwd())
import qq
now, ww.py can run well

Python Import Error when importing tests from django-social-auth

I'm trying to subclass some classes from the django-social-auth package to create custom test.
The source https://github.com/omab/django-social-auth
The problem is that i cannot import the "tests" part:
C:\Users\Alle>python
Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import social_auth.tests.base
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named tests.base
>>> import social_auth.tests
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named tests
>>> import social_auth.db
>>> social_auth.db
<module 'social_auth.db' from 'C:\Python26\lib\site-packages\social_auth\db\__init__.pyc'>
>>>
why i get this behaviour?
Tests aren't installed by default
from social_auth setup.py
packages=['social_auth',
'social_auth.management',
'social_auth.management.commands',
'social_auth.backends',
'social_auth.backends.contrib',
'social_auth.backends.pipeline',
'social_auth.migrations',
'social_auth.db'],

Categories