ModuleNotFoundError: No module named 'winreg' - python

I have been trying to use photoshop-python-api but I keep getting this error.
Traceback (most recent call last):
File "/Users/yash.sinha/PycharmProjects/PhotoshopPythonAPI/api.py", line 2, in <module>
import photoshop.api as ps
File "/Users/yash.sinha/PycharmProjects/PhotoshopPythonAPI/venv/lib/python3.8/site-packages/photoshop/__init__.py", line 1, in <module>
from photoshop.session import Session
File "/Users/yash.sinha/PycharmProjects/PhotoshopPythonAPI/venv/lib/python3.8/site-packages/photoshop/session.py", line 31, in <module>
from photoshop.api import (
File "/Users/yash.sinha/PycharmProjects/PhotoshopPythonAPI/venv/lib/python3.8/site-packages/photoshop/api/__init__.py", line 4, in <module>
from .action_descriptor import ActionDescriptor
File "/Users/yash.sinha/PycharmProjects/PhotoshopPythonAPI/venv/lib/python3.8/site-packages/photoshop/api/action_descriptor.py", line 12, in <module>
from ._core import Photoshop
File "/Users/yash.sinha/PycharmProjects/PhotoshopPythonAPI/venv/lib/python3.8/site-packages/photoshop/api/_core.py", line 6, in <module>
import winreg
ModuleNotFoundError: No module named 'winreg'
I did my research on winreg and I found out that it is a Windows Register. Am I getting this error because I am using a Mac? I have python 3.8.2 on my system.
Help.

Related

ModuleNotFoundError: No module named 'greenlet._greenlet'

I'm trying to use the TikTokPy but there is an error occurring in Greenlet module:
$ python quickstart.py
Traceback (most recent call last):
File "C:\Users\mngoc\tiktokpy\quickstart.py", line 2, in <module>
from tiktokpy import TikTokPy
File "C:/Users\mngoc\tiktokpy/tiktokpy/__init__.py", line 1, in <module>
from .bot import TikTokPy
File "C:/Users\mngoc\tiktokpy/tiktokpy/bot/__init__.py", line 15, in <module>
from tiktokpy.client import Client
File "C:/Users\mngoc\tiktokpy/tiktokpy/client/__init__.py", line 8, in <module>
from playwright.async_api import Browser, Page, Playwright, PlaywrightContextManager, Response
File "C:/Users\mngoc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages/playwright/async_api/__init__.py", line 25, in <module>
import playwright.async_api._generated
File "C:/Users\mngoc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages/playwright/async_api/_generated.py", line 25, in <module>
from playwright._impl._accessibility import Accessibility as AccessibilityImpl
File "C:/Users\mngoc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages/playwright/_impl/_accessibility.py", line 17, in <module>
from playwright._impl._connection import Channel
File "C:/Users\mngoc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages/playwright/_impl/_connection.py", line 23, in <module>
from greenlet import greenlet
File "C:/Users\mngoc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages/greenlet/__init__.py", line 29, in <module>
from ._greenlet import _C_API # pylint:disable=no-name-in-module
ModuleNotFoundError: No module named 'greenlet._greenlet'
I've already installed Greenlet module, but I have no idea about ._greenlet, there isn't any answer for related question so I'm stuck.
You should install the module:
pip3 install greenlet

library importing issues in pycharm

I'm doing a project on opencv python which is based on downloaded source code from the internet. When I run the code, this error occurs
C:\Users\Udara\AppData\Local\Programs\Python\Python38-32\python.exe C:/Users/Udara/Desktop/7777/people-counting-opencv/people_counter.py
Traceback (most recent call last):
File "C:/Users/Udara/Desktop/7777/people-counting-opencv/people_counter.py", line 13, in <module>
from pyimagesearch.centroidtracker import CentroidTracker
File "C:\Users\Udara\Desktop\7777\people-counting-opencv\pyimagesearch\centroidtracker.py", line 5, in <module>
import ordereddict
File "C:\Users\Udara\AppData\Local\Programs\Python\Python38-32\lib\site-packages\ordereddict.py", line 23, in <module>
from UserDict import DictMixin
ModuleNotFoundError: No module named 'UserDict'

AttributeError: module 'h5py.tests.old' has no attribute 'MODULES'

I was trying to run a python tool called "read_fast5_basecaller.py". It throws an error which is "AttributeError: module 'h5py.tests.old' has no attribute 'MODULES'"
read_fast5_basecaller.py
Traceback (most recent call last):
File "/home/kokep/bin/bin/read_fast5_basecaller.py", line 73, in <module>
from albacore.fast5_fastq_data_handler import Fast5FastQDataHandler
File "/home/kokep/bin/lib/python3.6/site-packages/albacore/fast5_fastq_data_handler.py", line 14, in <module>
from albacore.fast5_data_handler import Fast5DataHandler
File "/home/kokep/bin/lib/python3.6/site-packages/albacore/fast5_data_handler.py", line 15, in <module>
from albacore.read_metadata import ReadMetadata
File "/home/kokep/bin/lib/python3.6/site-packages/albacore/read_metadata.py", line 5, in <module>
from ont_fast5_api.fast5_file import Fast5File
File "/home/kokep/bin/lib/python3.6/site-packages/ont_fast5_api/fast5_file.py", line 5, in <module>
import h5py
File "/home/kokep/bin/lib/python3.6/site-packages/h5py/__init__.py", line 62, in <module>
from .tests import run_tests
File "/home/kokep/bin/lib/python3.6/site-packages/h5py/tests/__init__.py", line 17, in <module>
MODULES = old.MODULES + hl.MODULES
AttributeError: module 'h5py.tests.old' has no attribute 'MODULES'
I was wondering if old module of h5py is needed. Should I install the older version of the h5py module? Thank you.

virtualenv ImportError: No module named _struct

I am trying to run virtualenv on fedora. I get the following output.
in the same session I did PYTHONHOME=/usr/bin/python2.7 and PYTHONPATH=/lib/python2.7
Traceback (most recent call last):
File "/usr/bin/virtualenv", line 7, in <module>
from virtualenv import main
File "/usr/lib/python2.7/site-packages/virtualenv.py", line 16, in <module>
import base64
File "/usr/lib64/python2.7/base64.py", line 9, in <module>
import struct
File "/usr/lib64/python2.7/struct.py", line 1, in <module>
from _struct import *
ImportError: No module named _struct

from OpenGLContext import testingcontext i cant import testingcontext

When i do this:
import OpenGLContext
its importing, there is no problem. But when i write
from OpenGLContext import testingcontext
its giving an error:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
from OpenGLContext import testingcontext
File "C:\Python34\lib\site-packages\OpenGLContext\testingcontext.py", line 10, in <module>
from OpenGLContext import plugins, context, contextdefinition
File "C:\Python34\lib\site-packages\OpenGLContext\context.py", line 33, in <module>
from OpenGLContext import texturecache,plugins
File "C:\Python34\lib\site-packages\OpenGLContext\texturecache.py", line 3, in <module>
from OpenGLContext import atlas
File "C:\Python34\lib\site-packages\OpenGLContext\atlas.py", line 4, in <module>
from OpenGLContext.arrays import zeros, array, dot, ArrayType
File "C:\Python34\lib\site-packages\OpenGLContext\arrays.py", line 2, in <module>
from vrml.arrays import *
ImportError: No module named 'vrml'
Whats wrong?
The vrml phython module is missing. So the first step would be installing that.

Categories

Resources