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
Related
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
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.
This question already has answers here:
Importing installed package from script with the same name raises "AttributeError: module has no attribute" or an ImportError or NameError
(2 answers)
Closed 4 years ago.
I'm on Windows 10 and used pip to install spacy but am now getting an error when running
import spacy
in python shell.
My error message is:
Traceback (most recent call last):
File "C:\Users\Administrator\errbot-root\plugins\utility\model_training_test.py", line 17, in <module>
import spacy
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\spacy\__init__.py", line 4, in <module>
from .cli.info import info as cli_info
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\spacy\cli\__init__.py", line 1, in <module>
from .download import download
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\spacy\cli\download.py", line 5, in <module>
import requests
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\__init__.py", line 43, in <module>
import urllib3
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\__init__.py", line 8, in <module>
from .connectionpool import (
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 11, in <module>
from .exceptions import (
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\exceptions.py", line 2, in <module>
from .packages.six.moves.http_client import (
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\packages\six.py", line 203, in load_module
mod = mod._resolve()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\packages\six.py", line 115, in _resolve
return _import_module(self.mod)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\packages\six.py", line 82, in _import_module
__import__(name)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 71, in <module>
import email.parser
File "C:\Users\Administrator\errbot-root\plugins\utility\email.py", line 1, in <module>
from errbot import BotPlugin, botcmd, arg_botcmd, webhook
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\errbot\__init__.py", line 12, in <module>
from .core_plugins.wsview import bottle_app, WebView
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\errbot\core_plugins\wsview.py", line 5, in <module>
from bottle import Bottle, request
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\bottle.py", line 38, in <module>
import base64, cgi, email.utils, functools, hmac, imp, itertools, mimetypes,\
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\cgi.py", line 39, in <module>
from email.parser import FeedParser
ModuleNotFoundError: No module named 'email.parser'; 'email' is not a package
Edit: When trying to pip install email, i get the following error:
Collecting email
Using cached https://files.pythonhosted.org/packages/71/e7/816030d3b0426c130040bd068be62b9213357ed02896f5d9badcf46d1b5
f/email-4.0.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\administrator\appdata\local\programs\python\python36\lib\site-packages\setuptools\__init__.py", lin
e 12, in <module>
import setuptools.version
File "c:\users\administrator\appdata\local\programs\python\python36\lib\site-packages\setuptools\version.py", line
1, in <module>
import pkg_resources
File
"c:\users\administrator\appdata\local\programs\python\python36\lib\site-packages\pkg_resources\__init__.py",
line 36, in <module>
import email.parser
File "C:\Users\ADMINI~1\AppData\Local\Temp\2\pip-install-
p378w8he\email\email\parser.py", line 10, in <module>
from cStringIO import StringIO
ModuleNotFoundError: No module named 'cStringIO'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\ADMINI~1\AppData\Local\Temp\2\pip-install-p378w8
he\email\
SpaCy had been installed properly, there was simply another file named email.py that was interfering with the standard library email. Don't name your files after standard libraries.
After installing prospector by using pip install prospector, I execute this command.
prospector --version
I got this error
Traceback (most recent call last):
File "/home/ec2-user/ingestion/acadenv/bin/prospector", line 7, in <module>
from prospector.run import main
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/prospector/run.py", line 8, in <module>
from prospector import blender, postfilter, tools
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/prospector/tools/__init__.py", line 7, in <module>
from prospector.tools.pylint import PylintTool
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/prospector/tools/pylint/__init__.py", line 6, in <module>
from pylint.config import find_pylintrc
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/pylint/config.py", line 48, in <module>
from pylint import utils
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/pylint/utils.py", line 39, in <module>
from astroid import nodes, Module
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/astroid/__init__.py", line 54, in <module>
from astroid.nodes import *
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/astroid/nodes.py", line 39, in <module>
from astroid.node_classes import (
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/astroid/node_classes.py", line 24, in <module>
import lazy_object_proxy
ImportError: No module named lazy_object_proxy
Moreover I have executed pip install lazy_object_proxy but this does not solve the problem also.
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.