Installing Pygame on a MacBook Air M1 [duplicate] - python

This question already has answers here:
pygame installation issue in mac os
(5 answers)
Problems getting pygame to show anything but a blank screen on Macos
(10 answers)
Closed 1 year ago.
I need Pygame 2 for my project.
I have recently been on a Mac with an M1 processor, but I cannot install Pygame.
I installed Python 3.9 with Homebrew, then SDL and others as recommended.
During installation, version 2.01 of Pygame does not install nor version 2.0.0 but only version 1.9.6.
But this version doesn't work with my project, if I run it it tells me that the pigame.mixer module was not found, moreover the project developer is using Pygame 2 methods.
Here is the result of the installation:
Collecting pygame
Using cached pygame-2.0.1.tar.gz (5.5 MB)
ERROR: Command errored out with exit status 1:
command: /opt/homebrew/opt/python#3.9/bin/python3.9 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/w8/n1kdqpdn6_q0893qnv348s580000gn/T/pip-install-6mir4cqu/pygame_142bfabb2faa435da22f87624750f4cd/setup.py'"'"'; __file__='"'"'/private/var/folders/w8/n1kdqpdn6_q0893qnv348s580000gn/T/pip-install-6mir4cqu/pygame_142bfabb2faa435da22f87624750f4cd/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/w8/n1kdqpdn6_q0893qnv348s580000gn/T/pip-pip-egg-info-u1qrzt0i
cwd: /private/var/folders/w8/n1kdqpdn6_q0893qnv348s580000gn/T/pip-install-6mir4cqu/pygame_142bfabb2faa435da22f87624750f4cd/
Complete output (27 lines):
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using Darwin configuration...
/bin/sh: sdl2-config: command not found
/bin/sh: sdl2-config: command not found
/bin/sh: sdl2-config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/w8/n1kdqpdn6_q0893qnv348s580000gn/T/pip-install-6mir4cqu/pygame_142bfabb2faa435da22f87624750f4cd/setup.py", line 318, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "/private/var/folders/w8/n1kdqpdn6_q0893qnv348s580000gn/T/pip-install-6mir4cqu/pygame_142bfabb2faa435da22f87624750f4cd/buildconfig/config.py", line 221, in main
deps = CFG.main(**kwds)
File "/private/var/folders/w8/n1kdqpdn6_q0893qnv348s580000gn/T/pip-install-6mir4cqu/pygame_142bfabb2faa435da22f87624750f4cd/buildconfig/config_darwin.py", line 131, in main
[DependencyProg('SDL', 'SDL_CONFIG', 'sdl2-config', '2.0', ['sdl'])],
File "/private/var/folders/w8/n1kdqpdn6_q0893qnv348s580000gn/T/pip-install-6mir4cqu/pygame_142bfabb2faa435da22f87624750f4cd/buildconfig/config_unix.py", line 39, in __init__
self.ver = config[0].strip()
IndexError: list index out of range
---
For help with compilation see:
https://www.pygame.org/wiki/MacCompile
To contribute to pygame development see:
https://www.pygame.org/contribute.html
---
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/c7/b8/06e02c7cca7aec915839927a9aa19f749ac17a3d2bb2610b945d2de0aa96/pygame-2.0.1.tar.gz#sha256=8b1e7b63f47aafcdd8849933b206778747ef1802bd3d526aca45ed77141e4001 (from https://pypi.org/simple/pygame/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached pygame-2.0.0.tar.gz (5.5 MB)
ERROR: Command errored out with exit status 1:
command: /opt/homebrew/opt/python#3.9/bin/python3.9 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/w8/n1kdqpdn6_q0893qnv348s580000gn/T/pip-install-6mir4cqu/pygame_b8f2e42671424b84b18377944477dc5e/setup.py'"'"'; __file__='"'"'/private/var/folders/w8/n1kdqpdn6_q0893qnv348s580000gn/T/pip-install-6mir4cqu/pygame_b8f2e42671424b84b18377944477dc5e/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/w8/n1kdqpdn6_q0893qnv348s580000gn/T/pip-pip-egg-info-x9rp8x3u
cwd: /private/var/folders/w8/n1kdqpdn6_q0893qnv348s580000gn/T/pip-install-6mir4cqu/pygame_b8f2e42671424b84b18377944477dc5e/
Complete output (27 lines):
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using Darwin configuration...
/bin/sh: sdl2-config: command not found
/bin/sh: sdl2-config: command not found
/bin/sh: sdl2-config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/w8/n1kdqpdn6_q0893qnv348s580000gn/T/pip-install-6mir4cqu/pygame_b8f2e42671424b84b18377944477dc5e/setup.py", line 318, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "/private/var/folders/w8/n1kdqpdn6_q0893qnv348s580000gn/T/pip-install-6mir4cqu/pygame_b8f2e42671424b84b18377944477dc5e/buildconfig/config.py", line 221, in main
deps = CFG.main(**kwds)
File "/private/var/folders/w8/n1kdqpdn6_q0893qnv348s580000gn/T/pip-install-6mir4cqu/pygame_b8f2e42671424b84b18377944477dc5e/buildconfig/config_darwin.py", line 131, in main
[DependencyProg('SDL', 'SDL_CONFIG', 'sdl2-config', '2.0', ['sdl'])],
File "/private/var/folders/w8/n1kdqpdn6_q0893qnv348s580000gn/T/pip-install-6mir4cqu/pygame_b8f2e42671424b84b18377944477dc5e/buildconfig/config_unix.py", line 39, in __init__
self.ver = config[0].strip()
IndexError: list index out of range
---
For help with compilation see:
https://www.pygame.org/wiki/MacCompile
To contribute to pygame development see:
https://www.pygame.org/contribute.html
---
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/bc/0c/d164411381bada8feae57359aa9296defbed3035f4b55bef6a271cb0573c/pygame-2.0.0.tar.gz#sha256=63b038da116a643046181b02173fd894d87d2f85ecfd6aa7d5ece73c6ef501e9 (from https://pypi.org/simple/pygame/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached pygame-1.9.6-cp39-cp39-macosx_11_0_arm64.whl
Installing collected packages: pygame
Successfully installed pygame-1.9.6
Thank you for your help !

Related

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output - while using pip to install from git

Trying to install -
pip install git+https://github.com/pennmem/ptsa_new
get this error:
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Nofar\anaconda3\envs\py3_env\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Nofar\\AppData\\Local\\Temp\\pip-req-build-39er9e6i\\setup.py'"'"'; __file__='"'"'C:\\Users\\Nofar\\AppData\\Local\\Temp\\pip-req-build-39er9e6i\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Nofar\AppData\Local\Temp\pip-pip-egg-info-3zy5mp_2'
cwd: C:\Users\Nofar\AppData\Local\Temp\pip-req-build-39er9e6i\
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Nofar\AppData\Local\Temp\pip-req-build-39er9e6i\setup.py", line 34, in <module>
os.environ["VS90COMNTOOLS"] = os.environ["VS140COMNTOOLS"]
File "C:\Users\Nofar\anaconda3\envs\py3_env\lib\os.py", line 669, in __getitem__
raise KeyError(key) from None
KeyError: 'VS140COMNTOOLS'
----------------------------------------
WARNING: Discarding git+https://github.com/pennmem/ptsa_new.git. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
help please?
From the setup.py, when you are installing from source , its clearly written that you need Visual Studio C++ Redistributable to be installed in your system.
Relevant section in setup.py
# for windows install see http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat
# for visual studio compilation you need to SET VS90COMNTOOLS=%VS140COMNTOOLS%
if sys.platform.startswith("win"):
os.environ["VS90COMNTOOLS"] = os.environ["VS140COMNTOOLS"]
This answer explains the installation procedure for the required VSC version https://stackoverflow.com/a/18045219/995052.

Python error when I try to install cloudgenix_config

I installed Python3.9.1 and I am trying to run :
pip install cloudgenix_config or pip3 install cloudgenix_config
I keep getting the attached error:
WARNING: Discarding https://files.pythonhosted.org/packages/49/b2/7c7a103c72c049ba6816f8bb29274b3ba5c0e4952c3e779f363940cad499/clo udgenix_config-1.0.0b2.tar.gz#sha256=5fe3101ab46cd7ca3128f914b9bee4afd0da4954f6db7b7da9de2b01380e4967 (from https://pypi.org/simpl e/cloudgenix-config/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached cloudgenix_config-1.0.0b1.tar.gz (57 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-z34o7ve8/cloudgenix -config_6817b103e5384c87b5004a215f801528/setup.py'"'"'; __file__='"'"'/tmp/pip-install-z34o7ve8/cloudgenix-config_6817b103e5384c87 b5004a215f801528/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO( '"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code , __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-_ajoxfg8
cwd: /tmp/pip-install-z34o7ve8/cloudgenix-config_6817b103e5384c87b5004a215f801528/
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 23, in <module>
from setuptools.dist import Distribution
File "/usr/lib/python3.9/site-packages/setuptools/dist.py", line 34, in <module>
from setuptools import windows_support
File "/usr/lib/python3.9/site-packages/setuptools/windows_support.py", line 2, in <module>
import ctypes
File "/usr/lib/python3.9/ctypes/__init__.py", line 8, in <module>
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/e2/63/bfcf3223c5b7159779d9515dfe60381199b91cb630705b05d80be4f2d4a5/clo udgenix_config-1.0.0b1.tar.gz#sha256=07439d49951b8f5b9254f6098afa2bcb390109d0b30cd2fd2cfab4505b41091b (from https://pypi.org/simpl e/cloudgenix-config/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement cloudgenix_config (from versions: 1.0.0b1, 1.0.0b2, 1.0.0b3, 1.0.0b 4, 1.0.0b5, 1.0.0b6, 1.1.0b1, 1.2.0b1, 1.2.0b2, 1.2.0b4, 1.3.0b1, 1.3.0b2, 1.3.0b3, 1.4.0b1, 1.4.0b2, 1.4.0b4, 1.4.0b5, 1.5.0b1)
ERROR: No matching distribution found for cloudgenix_config```
From the PyPI page, it looks like this package only supports Python 3.6 through 3.8. That is the most likely reason you're getting this kind of error. If you really need to use it, I suggest installing 3.8 if you don't already have it on your system.

I can't install mysqlclient using `pip install mysqlclient` command

Here is the console log after ran pip install mysqlclient command.
`(venv) Yu:sagemaker-modeltraining lee$ pip install mysqlclient
Collecting mysqlclient
Using cached mysqlclient-2.0.3.tar.gz (88 kB)
ERROR: Command errored out with exit status 1:
command: '/Volumes/Work Series/bloc-x/sagemaker/sagemaker-modeltraining/venv/bin/python' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_bfe6faaff6334a44b5df618fa8de82f2/setup.py'"'"'; file='"'"'/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_bfe6faaff6334a44b5df618fa8de82f2/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-pip-egg-info-lnpozcvn
cwd: /private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_bfe6faaff6334a44b5df618fa8de82f2/
Complete output (15 lines):
/bin/sh: mysql_config: command not found
/bin/sh: mariadb_config: command not found
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_bfe6faaff6334a44b5df618fa8de82f2/setup.py", line 15, in
metadata, options = get_config()
File "/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_bfe6faaff6334a44b5df618fa8de82f2/setup_posix.py", line 70, in get_config
libs = mysql_config("libs")
File "/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_bfe6faaff6334a44b5df618fa8de82f2/setup_posix.py", line 31, in mysql_config
raise OSError("{} not found".format(_mysql_config_path))
OSError: mysql_config not found
mysql_config --version
mariadb_config --version
mysql_config --libs
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/3c/df/59cd2fa5e48d0804d213bdcb1acb4d08c403b61c7ff7ed4dd4a6a2deb3f7/mysqlclient-2.0.3.tar.gz#sha256=f6ebea7c008f155baeefe16c56cd3ee6239f7a5a9ae42396c2f1860f08a7c432 (from https://pypi.org/simple/mysqlclient/) (requires-python:>=3.5). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached mysqlclient-2.0.2.tar.gz (88 kB)
ERROR: Command errored out with exit status 1:
command: '/Volumes/Work Series/bloc-x/sagemaker/sagemaker-modeltraining/venv/bin/python' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_850f20e68f9b4a9c8db506f4494ef12b/setup.py'"'"'; file='"'"'/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_850f20e68f9b4a9c8db506f4494ef12b/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-pip-egg-info-cl3w1t3z
cwd: /private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_850f20e68f9b4a9c8db506f4494ef12b/
Complete output (12 lines):
/bin/sh: mysql_config: command not found
/bin/sh: mariadb_config: command not found
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_850f20e68f9b4a9c8db506f4494ef12b/setup.py", line 15, in
metadata, options = get_config()
File "/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_850f20e68f9b4a9c8db506f4494ef12b/setup_posix.py", line 65, in get_config
libs = mysql_config("libs")
File "/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_850f20e68f9b4a9c8db506f4494ef12b/setup_posix.py", line 31, in mysql_config
raise OSError("{} not found".format(_mysql_config_path))
OSError: mysql_config not found
----------------------------------------
enter code here
..........
..........
WARNING: Discarding https://files.pythonhosted.org/packages/6b/ba/4729d99e85a0a35bb46d55500570de05b4af10431cef174b6da9f58a0e50/mysqlclient-1.3.1.tar.gz#sha256=3549e8a61f10c8cd8eac6581d3f44d0594f535fb7b29e6090db3a0bc547b25ad (from https://pypi.org/simple/mysqlclient/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached mysqlclient-1.3.0.tar.gz (76 kB)
ERROR: Command errored out with exit status 1:
command: '/Volumes/Work Series/bloc-x/sagemaker/sagemaker-modeltraining/venv/bin/python' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_c4c84c03c6d84e2ba49d8978d8464e37/setup.py'"'"'; file='"'"'/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_c4c84c03c6d84e2ba49d8978d8464e37/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-pip-egg-info-x9o75gw4
cwd: /private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_c4c84c03c6d84e2ba49d8978d8464e37/
Complete output (10 lines):
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_c4c84c03c6d84e2ba49d8978d8464e37/setup.py", line 17, in
metadata, options = get_config()
File "/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_c4c84c03c6d84e2ba49d8978d8464e37/setup_posix.py", line 47, in get_config
libs = mysql_config("libs_r")
File "/private/var/folders/84/_mv3wv4d54ddl73qj3g3p_nw0000gn/T/pip-install-l1iepknb/mysqlclient_c4c84c03c6d84e2ba49d8978d8464e37/setup_posix.py", line 29, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
OSError: mysql_config not found
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/6a/91/bdfe808fb5dc99a5f65833b370818161b77ef6d1e19b488e4c146ab615aa/mysqlclient-1.3.0.tar.gz#sha256=06eb5664e3738b283ea2262ee60ed83192e898f019cc7ff251f4d05a564ab3b7 (from https://pypi.org/simple/mysqlclient/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement mysqlclient (from versions: 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.8, 1.3.9, 1.3.10, 1.3.11rc1, 1.3.11, 1.3.12, 1.3.13, 1.3.14, 1.4.0rc1, 1.4.0rc2, 1.4.0rc3, 1.4.0, 1.4.1, 1.4.2, 1.4.2.post1, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 2.0.0, 2.0.1, 2.0.2, 2.0.3)
ERROR: No matching distribution found for mysqlclient
`
my python version is 3.9.
I was going to use mysql database for my django backend.
here is the setting
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'messagebird',
'USER': 'root',
'PASSWORD': 'messagebird',
'HOST': '127.0.0.1',
'PORT': '3306',
}
}
I am not sure why this issue happens.
screenshot enter image description here
enter image description here
https://www.lfd.uci.edu/~gohlke/pythonlibs/ you can simply go in here and use Ctrl+F to find mysqlclient and download it for your machine now use pip install wheel the wheel once installed is available to run from the command line python -m wheel install path_to_the_downloaded_wheel_file now most probably the module will be installed
Pls try using following command lines
pip install path_to_the_downloaded_wheel_file
or
python -m pip install path_to_the_downloaded_wheel_file

Can't install python-weka-wrapper

I'm installing package python-weka-wrapper. But i have a problem with that about Java Development Kit.
This is for python 3.7.4 on windows 10.
C:\Users\dell>pip install python-weka-wrapper3
Collecting python-weka-wrapper3
Using cached https://files.pythonhosted.org/packages/48/3a/0f345b19774b5b6c53e9456c2985d79ff09b610bbf29d95403004734a45b/python-weka-wrapper3-0.1.7.tar.gz
Collecting javabridge>=1.0.14
Using cached https://files.pythonhosted.org/packages/a6/a0/c59bccabed99b1d4ac68166c59c679b375bfca75b78688b52c541b711578/javabridge-1.0.18.tar.gz
ERROR: Command errored out with exit status 1:
command: 'c:\users\dell\appdata\local\programs\python\python37-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\dell\\AppData\\Local\\Temp\\pip-install-4r0otofz\\javabridge\\setup.py'"'"'; __file__='"'"'C:\\Users\\dell\\AppData\\Local\\Temp\\pip-install-4r0otofz\\javabridge\\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\dell\AppData\Local\Temp\pip-install-4r0otofz\javabridge\pip-egg-info'
cwd: C:\Users\dell\AppData\Local\Temp\pip-install-4r0otofz\javabridge\
Complete output (9 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\dell\AppData\Local\Temp\pip-install-4r0otofz\javabridge\setup.py", line 402, in <module>
ext_modules=ext_modules(),
File "C:\Users\dell\AppData\Local\Temp\pip-install-4r0otofz\javabridge\setup.py", line 96, in ext_modules
jdk_home = find_jdk()
File "C:\Users\dell\AppData\Local\Temp\pip-install-4r0otofz\javabridge\javabridge\locate.py", line 203, in find_jdk
"Failed to find the Java Development Kit. "
RuntimeError: Failed to find the Java Development Kit. Please download and install the Oracle JDK 1.6 or later
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Althought I've installed JDK1.8.0_231
So how to fix the error? Thank you!
You have checked and found the Java runtime Environment (JRE), not the Java development Kit, which is a seperate installation.
You can find it on the oracle website. Download and install and then your problem should be solved

Problem installation of mysql instance of python

In mac OSX I have already installed mariadb 10.1.20 now while i Try to install mysql-python using pip install mysql-python system showing following error:
Collecting mysql-python
Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip
ERROR: Command errored out with exit status 1:
command: /Users/eskimi/Development/ErpNext/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/1r/0z4_dp3j0237vqx1jvc0sn3c0000gp/T/pip-install-s0tXN_/mysql-python/setup.py'"'"'; __file__='"'"'/private/var/folders/1r/0z4_dp3j0237vqx1jvc0sn3c0000gp/T/pip-install-s0tXN_/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 /private/var/folders/1r/0z4_dp3j0237vqx1jvc0sn3c0000gp/T/pip-install-s0tXN_/mysql-python/pip-egg-info
cwd: /private/var/folders/1r/0z4_dp3j0237vqx1jvc0sn3c0000gp/T/pip-install-s0tXN_/mysql-python/
Complete output (10 lines):
sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/1r/0z4_dp3j0237vqx1jvc0sn3c0000gp/T/pip-install-s0tXN_/mysql-python/setup.py", line 17, in <module>
metadata, options = get_config()
File "setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "setup_posix.py", line 25, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
How can resolve this issue?
N.B I am using python 2.7

Categories

Resources