I'm getting an error when installing pyejabberd with pip [duplicate] - python

This question already has answers here:
Why Python 3.6.1 throws AttributeError: module 'enum' has no attribute 'IntFlag'?
(22 answers)
Closed 2 years ago.
I'm trying to install pyejabberd (https://pypi.org/project/pyejabberd/) but am receiving an error when using py -3 -m pip install pyejabberd.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Full error below:
Collecting pyejabberd
Using cached https://files.pythonhosted.org/packages/15/f4/658ade66dbaf4db6484ba81f6c1015b6ff653debcee3310c52e3d0a17641/pyejabberd-0.2.11-py2.py3-none-any.whl
Collecting enum34==1.1.2 (from pyejabberd)
Using cached https://files.pythonhosted.org/packages/6f/e9/08fd439384b7e3d613e75a6c8236b8e64d90c47d23413493b38d4229a9a5/enum34-1.1.2.tar.gz
ERROR: Command errored out with exit status 1:
command: 'C:\Users\USER\AppData\Local\Programs\Python\Python37-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pip-install-_217wclq\\enum34\\setup.py'"'"'; __file__='"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pip-install-_217wclq\\enum34\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: C:\Users\USER\AppData\Local\Temp\pip-install-_217wclq\enum34\
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\USER\AppData\Local\Programs\Python\Python37-32\lib\site-packages\setuptools\__init__.py", line 6, in <module>
import distutils.core
File "C:\Users\USER\AppData\Local\Programs\Python\Python37-32\lib\distutils\core.py", line 16, in <module>
from distutils.dist import Distribution
File "C:\Users\USER\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py", line 9, in <module>
import re
File "C:\Users\USER\AppData\Local\Programs\Python\Python37-32\lib\re.py", line 143, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

First make sure your currently installed version of Python using python -V. You must check "pyejabberd" documentation, its compatible with python 2.6, 2.7, 3.3, 3.4 versions.

Related

installing pygame ERROR: Command errored out with exit status 1 [duplicate]

This question already has answers here:
When I try to install pygame using python 3.9 I get an error windows
(2 answers)
Closed 2 years ago.
hello guys I have been trying to install pygame but whenever I do I get this error message and I have tried many solutions from YouTube unfortunately none of them worked, in fact I have tried installing sql and many other libraries but had the same error please help.
C:\Users\pCd>pip install pygame
Collecting pygame
Using cached pygame-1.9.6.tar.gz (3.2 MB)
ERROR: Command errored out with exit status 1: command: 'c:\python\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\pCd\\AppData\\Local\\Temp\\pip-install-i9uohpid\\pygame\\setup.py'"'"'; __file__='"'"'C:\\Users\\pCd\\AppData\\Local\\Temp\\pip-install-i9uohpid\\pygame\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\pCd\AppData\Local\Temp\pip-pip-egg-info-n48e7goc'
cwd: C:\Users\pCd\AppData\Local\Temp\pip-install-i9uohpid\pygame\Complete output (17 lines):
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using WINDOWS configuration...
Download prebuilts to "prebuilt_downloads" and copy to "./prebuilt-x64"? [Y/n]Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\pCd\AppData\Local\Temp\pip-install-i9uohpid\pygame\setup.py", line 194, in <module> buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\pCd\AppData\Local\Temp\pip-install-i9uohpid\pygame\buildconfig\config.py", line 210, in main deps = CFG.main(**kwds)
File "C:\Users\pCd\AppData\Local\Temp\pip-install-i9uohpid\pygame\buildconfig\config_win.py", line 576, in main and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\pCd\AppData\Local\Temp\pip-install-i9uohpid\pygame\buildconfig\download_win_prebuilt.py", line 302, in ask reply = raw_input(
EOFError: EOF when reading a line
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I finally got a way how to fix this issue. basically you all just to uninstall python completely and re-install it but with version 3.6
you all can download it using this URL: https://www.python.org/ftp/python/3.6.8/python-3.6.8-amd64.exe

benchmark installation error, ModuleNotFoundError: No module named 'main'

Why this error? I can't install the benchmark anymore. I need to import 'get_data' which contains inside the benchmark. Whats wrong?
pip install benchmark
Collecting benchmark
Using cached benchmark-0.1.5.tar.gz (7.1 kB)
ERROR: Command errored out with exit status 1:
command: /opt/anaconda3/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/cf/gs10w86j2n1bf2_x86gmqscw0000gn/T/pip-install-qq5kp9hk/benchmark/setup.py'"'"'; __file__='"'"'/private/var/folders/cf/gs10w86j2n1bf2_x86gmqscw0000gn/T/pip-install-qq5kp9hk/benchmark/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/cf/gs10w86j2n1bf2_x86gmqscw0000gn/T/pip-pip-egg-info-_7t1tj64
cwd: /private/var/folders/cf/gs10w86j2n1bf2_x86gmqscw0000gn/T/pip-install-qq5kp9hk/benchmark/
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/cf/gs10w86j2n1bf2_x86gmqscw0000gn/T/pip-install-qq5kp9hk/benchmark/setup.py", line 3, in <module>
from benchmark import __VERSION__
File "/private/var/folders/cf/gs10w86j2n1bf2_x86gmqscw0000gn/T/pip-install-qq5kp9hk/benchmark/benchmark/__init__.py", line 10, in <module>
from main import BenchmarkProgram, main
ModuleNotFoundError: No module named 'main'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
benchmark is not compatible with python versions >= 3.
You need python 2.
In a virtual environment with python 3
~/workspace/so via 🐍 v3.8.5 via C python3
❯ pip install benchmark
Collecting benchmark
Downloading benchmark-0.1.5.tar.gz (7.1 kB)
ERROR: Command errored out with exit status 1:
command: /home/louis/miniconda3/envs/python3/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wyj1c1sn/benchmark/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wyj1c1sn/benchmark/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-0qo4nmp7
cwd: /tmp/pip-install-wyj1c1sn/benchmark/
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-wyj1c1sn/benchmark/setup.py", line 3, in <module>
from benchmark import __VERSION__
File "/tmp/pip-install-wyj1c1sn/benchmark/benchmark/__init__.py", line 10, in <module>
from main import BenchmarkProgram, main
ModuleNotFoundError: No module named 'main'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
With python 2 :
~/workspace/so via 🐍 v2.7.18 :: Anaconda, Inc. via C python2
❯ pip install benchmark
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting benchmark
Using cached https://files.pythonhosted.org/packages/e9/af/e0390a38d8d8920a189775102d69fa19107c0b67f75c7934bc166e05d504/benchmark-0.1.5.tar.gz
Building wheels for collected packages: benchmark
Building wheel for benchmark (setup.py) ... done
Created wheel for benchmark: filename=benchmark-0.1.5-cp27-none-any.whl size=6336 sha256=e4878032c29d27e51067deb70363bf7b7108fa93f9458befabfbbcce3b3d4598
Stored in directory: /home/louis/snap/codium/common/.cache/pip/wheels/a4/3f/24/d0ed8ae3351441f06a4a17a6ea3f5c500527144a9aebfbb05c
Successfully built benchmark
Installing collected packages: benchmark
Successfully installed benchmark-0.1.5

Unable to install mysql-python library in Ubuntu 20.04 [duplicate]

This question already has answers here:
Python 3 ImportError: No module named 'ConfigParser'
(21 answers)
Closed 2 years ago.
I tried installing mysql-python in ubuntu but I remained unsuccessful, I was using Win10 before and never encountered this problem.
I used pip3 install MySql-python
I have encountered following error:
Using cached MySQL-python-1.2.5.zip (108 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-j3febudn/mysql-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-j3febudn/mysql-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-j3febudn/mysql-python/pip-egg-info
cwd: /tmp/pip-install-j3febudn/mysql-python/
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-j3febudn/mysql-python/setup.py", line 13, in <module>
from setup_posix import get_config
File "/tmp/pip-install-j3febudn/mysql-python/setup_posix.py", line 2, in <module>
from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
This seems to be related to: Python 3 ImportError: No module named 'ConfigParser'
In short, your module is not python3 compatible, use another module, or use python2, but this is not recommended, since python2 is going deprecated.

Rasbian Lite: email Python Package install (No module named 'cStringIO')

Sorry for possible duplicate. I am using Rasbian Lite OS. When I try to install package email:
pi#raspberrypi:~ $ sudo pip3 install email
I get error message:
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting email
Using cached email-4.0.2.tar.gz (1.2 MB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-298bk50t/email/setup.py'"'"'; __file__='"'"'/tmp/pip-install-298bk50t/email/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-298bk50t/email/pip-egg-info
cwd: /tmp/pip-install-298bk50t/email/
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.7/dist-packages/setuptools/__init__.py", line 17, in <module>
import setuptools.version
File "/usr/local/lib/python3.7/dist-packages/setuptools/version.py", line 1, in <module>
import pkg_resources
File "/usr/local/lib/python3.7/dist-packages/pkg_resources/__init__.py", line 36, in <module>
import email.parser
File "/tmp/pip-install-298bk50t/email/email/parser.py", line 10, in <module>
from cStringIO import StringIO
ModuleNotFoundError: No module named 'cStringIO'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
However, when I run:
sudo pip install cStringIO
I get an error:
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
ERROR: Could not find a version that satisfies the requirement cStringIO (from versions: none)
ERROR: No matching distribution found for cStringIO
So it seems I am stuck because I can't install cStringIO?
Any ideas/suggestions/solutions would be greatly appreciated.
Thanks!
Solved: was using wrong python version inside terminal

Openpyxl Pip Install Error: Command Errored Out

I continue to receive the following error when trying to install openpyxl:
pip install openpyxl
Collecting openpyxl
Using cached openpyxl-3.0.3.tar.gz (172 kB)
ERROR: Command errored out with exit status 1:
command: /home/bigdata/scripts/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-eztesmv9/openpyxl/setup.py'"'"'; __file__='"'"'/tmp/pip-install-eztesmv9/openpyxl/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-eztesmv9/openpyxl/pip-egg-info
cwd: /tmp/pip-install-eztesmv9/openpyxl/
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/bigdata/scripts/lib/python3.8/site-packages/setuptools/__init__.py", line 20, in <module>
from setuptools.dist import Distribution, Feature
File "/home/bigdata/scripts/lib/python3.8/site-packages/setuptools/dist.py", line 36, in <module>
from setuptools import windows_support
File "/home/bigdata/scripts/lib/python3.8/site-packages/setuptools/windows_support.py", line 2, in <module>
import ctypes
File "/home/bigdata/lib/python3.8/ctypes/__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Based on other posts, I have already tried the following commands:
python3 -m ensurepip --upgrade
pip install --upgrade setuptools
pip install -U pip
With each of them returning:
Requirement already up-to-date: setuptools in /home/bigdata/scripts/lib/python3.8/site-packages (45.1.0)
Am I missing something? We just migrated our account over to an A2 Hosting VPS server and I am unfamiliar with most of the setup. Any help is much appreciated.
I was able to fix this issue by reinstalling python, following the clue from phd that I may have a broken install.

Categories