suguby / simple_draw Goto Github PK
View Code? Open in Web Editor NEWБиблиотека на основе pygame для рисования граф примитивов и обучения Python
License: Other
Библиотека на основе pygame для рисования граф примитивов и обучения Python
License: Other
try install package 'pip3 install simple-draw'
Got error:
python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [28 lines of output]
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 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/6h/chqgvbqj0qj7j_ct_jdxl92h0000gn/T/pip-install-_9b5v6pi/pygame_cde65a92d6294bebb7370b14bc756e33/setup.py", line 318, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "/private/var/folders/6h/chqgvbqj0qj7j_ct_jdxl92h0000gn/T/pip-install-_9b5v6pi/pygame_cde65a92d6294bebb7370b14bc756e33/buildconfig/config.py", line 221, in main
deps = CFG.main(**kwds)
File "/private/var/folders/6h/chqgvbqj0qj7j_ct_jdxl92h0000gn/T/pip-install-_9b5v6pi/pygame_cde65a92d6294bebb7370b14bc756e33/buildconfig/config_darwin.py", line 131, in main
[DependencyProg('SDL', 'SDL_CONFIG', 'sdl2-config', '2.0', ['sdl'])],
File "/private/var/folders/6h/chqgvbqj0qj7j_ct_jdxl92h0000gn/T/pip-install-_9b5v6pi/pygame_cde65a92d6294bebb7370b14bc756e33/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
---
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
vitalikye@Vitaliks-MacBook-Pro ~ % pip3 install simple-draw
Collecting simple-draw
Using cached simple_draw-2.7.0.tar.gz (7.5 kB)
Preparing metadata (setup.py) ... done
Collecting pygame==2.0.0
Using cached pygame-2.0.0.tar.gz (5.5 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [28 lines of output]
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 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/6h/chqgvbqj0qj7j_ct_jdxl92h0000gn/T/pip-install-tg711lga/pygame_fda9e02f9f7e49f9b77969dde8f95702/setup.py", line 318, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "/private/var/folders/6h/chqgvbqj0qj7j_ct_jdxl92h0000gn/T/pip-install-tg711lga/pygame_fda9e02f9f7e49f9b77969dde8f95702/buildconfig/config.py", line 221, in main
deps = CFG.main(**kwds)
File "/private/var/folders/6h/chqgvbqj0qj7j_ct_jdxl92h0000gn/T/pip-install-tg711lga/pygame_fda9e02f9f7e49f9b77969dde8f95702/buildconfig/config_darwin.py", line 131, in main
[DependencyProg('SDL', 'SDL_CONFIG', 'sdl2-config', '2.0', ['sdl'])],
File "/private/var/folders/6h/chqgvbqj0qj7j_ct_jdxl92h0000gn/T/pip-install-tg711lga/pygame_fda9e02f9f7e49f9b77969dde8f95702/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
---
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
vitalikye@Vitaliks-MacBook-Pro ~ % pip3 install pygame
Collecting pygame
Using cached pygame-2.1.2-cp310-cp310-macosx_11_0_arm64.whl (8.4 MB)
Installing collected packages: pygame
Successfully installed pygame-2.1.2
Например есть круг:
import simple_draw as sd
point = sd.random_point()
sd.circle(center_position=point, radius=sd.randint(15, 50), width=0)
можно ли сделать так чтобы например мы к переменной circle присваиваем круг и можем через эту переменную обращаться к его параметрам...
point = sd.random_point()
circle = sd.circle(center_position=point, radius=sd.randint(15, 50), width=0)
print(circle.center_position)
print(circle.radius)
...?
Новый параметр для "def snowflake()", который будет отвечать за кол-во лучей у снежинки.
Просто
Место ответвления лучиков - есть,
Дина лучиков - есть,
Угол отклонения лучиков - есть,
а кол-во лучиков - нету.
В функции снежинки, где идет проверка через assert параметров лучиков, два раза идет проверка factor_a. Должно, видимо, быть factor_b
http://joxi.ru/12M3vXqIMyop7r
Вот еше, нужно добавить инициализацию экрана для sd.get_mouse_state()
а то если ее использовать и нечего не нарисовать вылазиет ошибка.
mouse_pos_x, mouse_pos_y = pygame.mouse.get_pos()
pygame.error: video system not initialized
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.