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

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

Related

can't install mysql==0.0.2 in python==3.8.1 environment

I can't install mysql==0.0.2. I am able to install mysql==0.0.3. The error looks like.
Seems to me setuptools error.
(venv) C:\Users\xyz\Envs\>pip install mysql==0.0.2
Collecting mysql==0.0.2
Using cached mysql-0.0.2.tar.gz (1.9 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\xyz\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\xyz\\AppData\\Local\\Temp\\pip-install-rygxsfpt\\mysql\\setup.py'"'"'; __file__='"'"'C:\\Users\\xyz\\AppData\\Local\\Temp\\pip-install-rygxsfpt\\mysql\\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\xyz\AppData\Local\Temp\pip-install-rygxsfpt\mysql\pip-egg-info'
cwd: C:\Users\xyz\AppData\Local\Temp\pip-install-rygxsfpt\mysql\
Complete output (32 lines):
WARNING: `mysql` is a virtual package. Please use `%s` as a dependency directly.
running egg_info
creating C:\Users\xyzAppData\Local\Temp\pip-install-rygxsfpt\mysql\pip-egg-info\mysql.egg-info
writing C:\Users\xyzAppData\Local\Temp\pip-install-rygxsfpt\mysql\pip-egg-info\mysql.egg-info\PKG-INFO
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\xyz\AppData\Local\Temp\pip-install-rygxsfpt\mysql\setup.py", line 33, in <module>
setup(
File "c:\users\xyz\lib\site-packages\setuptools\__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "c:\users\xyz\lib\site-packages\setuptools\_distutils\core.py", line 148, in setup
.....
.....
.....
lines = header.split('\n')
AttributeError: 'list' object has no attribute 'split'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
You shouldn't install mysql at all.
This package is a ‘virtual package’, which requires MySQL-python (Python 2) or mysqlclient (Python 3) to install. In effect, this means ‘pip install mysql’ will actually install MySQL-python.
Instead of depending on this package, please depend on the relevant package directly.
In a Python 3 world, use either
pip install mysqlclient (for MySQLdb), or
pip install mysql-connector-python (for mysql.connector).

Module Not Getting Installed: pip3 install morphy

I want to install the python module morphy on Ubuntu 20.04.2, but I am getting an error.
I tried this:
pip3 install morphy
I got this output:
Collecting morphy
Using cached morphy-0.2.tar.gz (9.3 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uygwfbh3/morphy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uygwfbh3/morphy/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-uygwfbh3/morphy/pip-egg-info
cwd: /tmp/pip-install-uygwfbh3/morphy/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-uygwfbh3/morphy/setup.py", line 3, in <module>
with open('README.md', 'r') as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'README.md'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
It worked on Windows 10 though. My pip3 version is:
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
I tried this too:
pip install morphy
I got this output:
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
Collecting morphy
Using cached morphy-0.2.tar.gz (9.3 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ICmImS/morphy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ICmImS/morphy/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-lPhE0U
cwd: /tmp/pip-install-ICmImS/morphy/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-ICmImS/morphy/setup.py", line 3, in <module>
with open('README.md', 'r') as fp:
IOError: [Errno 2] No such file or directory: 'README.md'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
It is clear from the output that the README.md file is missing from the package. What should I do?
Looks like the Linux version of the package might be broken and it doesn't seem to be maintained anymore.
You can use the following workaround:
try installing again but tell pip not to clean up the temporary files: pip install morphy --no-clean
enter the temporary directory with the package contents - find its name in the output from the pip install command
create the files setup.py needs
execute python setup.py install manually
if you know what this package's requirements are, install them manually
$ pip install morphy --no-clean
Collecting morphy
Using cached morphy-0.2.tar.gz (9.3 kB)
ERROR: Command errored out with exit status 1:
command: /home/user/env/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vluz3ja_/morphy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vluz3ja_/morphy/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-vluz3ja_/morphy/pip-egg-info
cwd: /tmp/pip-install-vluz3ja_/morphy/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-vluz3ja_/morphy/setup.py", line 3, in <module>
with open('README.md', 'r') as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'README.md'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
$ cd /tmp/pip-install-vluz3ja_/morphy
$ touch README.md
$ touch requirements.txt
$ python setup.py install
...
Installed /home/user/env/lib/python3.8/site-packages/morphy-0.2-py3.8.egg
Processing dependencies for morphy==0.2
Finished processing dependencies for morphy==0.2

Problems with installing plotly on Windows 10 with Python 3.8.5

I am having problems installing plotly on Windows 10 with Python 3.8.5. The command line prompt is in admin mode.
The package manager pip3 here seems to be installing the package retrying-1.3.3 which is running into an error:
ModuleNotFoundError: No module named '_distutils_hack'
Anybody has a solution for this? Greatly appreciate your time. Thanks
C:\ProgramData\Python38\Scripts>pip3 install plotly
Collecting plotly
Using cached plotly-4.14.1-py2.py3-none-any.whl (13.2 MB)
Requirement already satisfied: six in c:\programdata\python38\lib\site-packages (from plotly) (1.15.0)
Collecting retrying>=1.3.3
Using cached retrying-1.3.3.tar.gz (10 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\programdata\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\student\\AppData\\Local\\Temp\\pip-install-2qndeluw\\retrying_de785ef56b9d4150b577dd9f4437e271\\setup.py'"'"'; __file__='"'"'C:\\Users\\student\\AppData\\Local\\Temp\\pip-install-2qndeluw\\retrying_de785ef56b9d4150b577dd9f4437e271\\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\student\AppData\Local\Temp\pip-pip-egg-info-3tjoj6d_'
cwd: C:\Users\student\AppData\Local\Temp\pip-install-2qndeluw\retrying_de785ef56b9d4150b577dd9f4437e271\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\programdata\python38\lib\site-packages\setuptools\__init__.py", line 8, in <module>
import _distutils_hack.override # noqa: F401
ModuleNotFoundError: No module named '_distutils_hack'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
The problem may be that the version of the 'setuptools' package is too old. I just updated it when I encountered this problem before.
pip install --upgrade setuptools

How to install Vizdoom python

I am new to programming, I am trying to install vizdoom on windows 10, python. Using the command:
pip install vizdoom
and keep getting this error, I have tried searching around, have spent hours but am not able to fix it.
Collecting vizdoom Using cached vizdoom-1.1.7.tar.gz (4.9 MB)
ERROR: Command errored out with exit status 1:
command: 'C:\Users\USER\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe'
-c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pip-install-sqhbgmz4\\vizdoom\\setup.py'"'"';
__file__='"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pip-install-sqhbgmz4\\vizdoom\\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\USER\AppData\Local\Temp\pip-pip-egg-info-m7e2idad'
cwd: C:\Users\USER\AppData\Local\Temp\pip-install-sqhbgmz4\vizdoom\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\USER\AppData\Local\Temp\pip-install-sqhbgmz4\vizdoom\setup.py", line 14, in <module>
raise RuntimeError("Building pip package on Windows is not currently available ...")
RuntimeError: Building pip package on Windows is not currently available ...
---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
as a last resort, I hope to get some help from here.
Never mind, I switched to ubuntu.

Issue installing bpy package python

I'm trying to install the bpy package and I’m getting this error:
sara#studentacbook94 ~ % pip install bpy
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. 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
Defaulting to user installation because normal site-packages is not writeable
Collecting bpy
Using cached bpy-1.2.2.tar.gz (20 kB)
ERROR: Command errored out with exit status 1:
command: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/setup.py'"'"'; __file__='"'"'/private/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/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/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/pip-egg-info
cwd: /private/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/setup.py", line 179
def build_cmake(self, extension: Extension):
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
How can I deal with it?
This error appeared because you're using Python 2.7, and desired package has Type Hints, which were added only in 3.5 (documentaion).
Upgrade your version of Python

Categories