'Programming/python(파이썬)'에 해당되는 글 82건

  1. 2019.05.15 python pdb를 이용한 디버깅
  2. 2019.05.15 anaconda(python)
  3. 2019.05.14 파이썬 vscode 디버깅 하기
  4. 2019.05.09 python3 import cv2
  5. 2019.05.09 python pylint @ vscode
  6. 2019.05.08 python wxpython
  7. 2019.05.02 PyOpenGL + ubuntu 18.04
  8. 2019.05.01 python 3.7 + MS build tool 2015 + pyGL 또 실패 ㅠㅠ
  9. 2019.04.30 python + openGL
  10. 2019.04.30 python + openCV 공부 시작

함수 같은녀석들 어떻게 처리하나 궁금했는데

인터랙티브 하게 디버깅 간으한 자체 모듈이 있는 듯

 

2.x 대에도 있고 3.x대에도 있으니 걱정없고

아래처럼 인터프리터에서 pdb를 불러와 pdb.run()을 통해 해당 모듈을 테스트 할 수 있고

>>> import pdb
>>> import mymodule
>>> pdb.run('mymodule.test()')
> (0)?()
(Pdb) continue
> (1)?()
(Pdb) continue
NameError: 'spam'
> (1)?()
(Pdb)

 

아니면 -m pdb로 모듈을 불러 특정 스크립트를 실행하는 것도 방법인듯

python3 -m pdb myscript.py

[링크 : https://docs.python.org/3.7/library/pdb.html]

[링크 : https://www.digitalocean.com/community/tutorials/how-to-use-the-python-debugger]

'Programming > python(파이썬)' 카테고리의 다른 글

ubuntu에서 python으로 postgres 접속하기  (0) 2019.06.24
python pip 특정 버전 설치하기  (0) 2019.06.18
anaconda(python)  (0) 2019.05.15
파이썬 vscode 디버깅 하기  (0) 2019.05.14
python3 import cv2  (0) 2019.05.09
Posted by 구차니

 

[링크 : https://www.anaconda.com/distribution/]

 

[링크 : https://wikidocs.net/22896]

[링크 : https://snowdeer.github.io/python/2017/11/07/python-vs-anaconda/]

[링크 : https://dojang.io/mod/page/view.php?id=2456]

 

jupyter

[링크 : https://dojang.io/mod/page/view.php?id=2457]

'Programming > python(파이썬)' 카테고리의 다른 글

python pip 특정 버전 설치하기  (0) 2019.06.18
python pdb를 이용한 디버깅  (0) 2019.05.15
파이썬 vscode 디버깅 하기  (0) 2019.05.14
python3 import cv2  (0) 2019.05.09
python pylint @ vscode  (0) 2019.05.09
Posted by 구차니

인터프리터니까 한줄씩 하면 되긴 하지만

그래도 함수 쓰면 영 안되서 디버거를 쓸수 있는게 아무래도 유리하니까...

 

[링크 : https://docs.microsoft.com/ko-kr/visualstudio/python/debugging-python-in-visual-studio?view=vs-2019]

[링크 : http://egloos.zum.com/mcchae/v/11262544]

[링크 : http://pythonstudy.xyz/python/article/505-Python-디버깅-PDB]

'Programming > python(파이썬)' 카테고리의 다른 글

python pdb를 이용한 디버깅  (0) 2019.05.15
anaconda(python)  (0) 2019.05.15
python3 import cv2  (0) 2019.05.09
python pylint @ vscode  (0) 2019.05.09
python wxpython  (0) 2019.05.08
Posted by 구차니

우분투에서 python2와 3이 모두 깔려있는데

그러다 보니 pip로 설치한게 python3 에서는 공유가 안된다.

그런 이유로 별도로 또 깔아줘야 하는데 일단 모듈 명은 동일하니 다행이네

 

$ pip3 opencv-python

[링크 : https://askubuntu.com/questions/783956/how-to-install-opencv-3-1-for-python-3-5-on-ubuntu-16-04-lts]

'Programming > python(파이썬)' 카테고리의 다른 글

anaconda(python)  (0) 2019.05.15
파이썬 vscode 디버깅 하기  (0) 2019.05.14
python pylint @ vscode  (0) 2019.05.09
python wxpython  (0) 2019.05.08
PyOpenGL + ubuntu 18.04  (0) 2019.05.02
Posted by 구차니

찾아보면 정적분석 툴이라는데

그런 이유로 vscode에서 설치하도록 하는건가?

 

[링크 : https://thrillfighter.tistory.com/395]

'Programming > python(파이썬)' 카테고리의 다른 글

파이썬 vscode 디버깅 하기  (0) 2019.05.14
python3 import cv2  (0) 2019.05.09
python wxpython  (0) 2019.05.08
PyOpenGL + ubuntu 18.04  (0) 2019.05.02
python 3.7 + MS build tool 2015 + pyGL 또 실패 ㅠㅠ  (0) 2019.05.01
Posted by 구차니

 

$ pip install -U wxPython
Collecting wxPython
  Using cached https://files.pythonhosted.org/packages/17/74/7c3ced03c3c76b9f98e4a0edae1801755a7599ebf481c04d9f77dfff17e3/wxPython-4.0.4.tar.gz
Collecting Pillow (from wxPython)
  Using cached https://files.pythonhosted.org/packages/b6/4b/5adc1109908266554fb978154c797c7d71aba43dd15508d8c1565648f6bc/Pillow-6.0.0-cp27-cp27mu-manylinux1_x86_64.whl
Collecting six (from wxPython)
  Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Building wheels for collected packages: wxPython
  Running setup.py bdist_wheel for wxPython ... done
  Stored in directory: /home/minimonk/.cache/pip/wheels/27/2b/9e/f4fdf5e1ec688ceb37f946a5ba8344b401a2906ca024a0075d
Successfully built wxPython
Installing collected packages: Pillow, six, wxPython
Successfully installed Pillow-6.0.0 six-1.12.0 wxPython-4.0.4$ pip install -U wxPython
Collecting wxPython
  Using cached https://files.pythonhosted.org/packages/17/74/7c3ced03c3c76b9f98e4a0edae1801755a7599ebf481c04d9f77dfff17e3/wxPython-4.0.4.tar.gz
Collecting Pillow (from wxPython)
  Using cached https://files.pythonhosted.org/packages/b6/4b/5adc1109908266554fb978154c797c7d71aba43dd15508d8c1565648f6bc/Pillow-6.0.0-cp27-cp27mu-manylinux1_x86_64.whl
Collecting six (from wxPython)
  Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Building wheels for collected packages: wxPython
  Running setup.py bdist_wheel for wxPython ... done
  Stored in directory: /home/minimonk/.cache/pip/wheels/27/2b/9e/f4fdf5e1ec688ceb37f946a5ba8344b401a2906ca024a0075d
Successfully built wxPython
Installing collected packages: Pillow, six, wxPython
Successfully installed Pillow-6.0.0 six-1.12.0 wxPython-4.0.4

 

import wx 에서 에러가 나서 wxpython을 설치하려고 하니

어마어마 한 길이의 메시지 이후에 에러가 나서 찾아보는데 은근히 설치할게 넘쳐나네...

 

$ sudo apt install make gcc libgtk-3-dev libwebkitgtk-dev libwebkitgtk-3.0-dev libgstreamer-gl1.0-0 freeglut3 freeglut3-dev python-gst-1.0 python3-gst-1.0 libglib2.0-dev ubuntu-restricted-extras libgstreamer-plugins-base1.0-dev

[링크 : https://askubuntu.com/questions/1073145/how-to-install-wxpython-4-ubuntu-18-04]

 

$ pip install -U wxPython
Collecting wxPython
  Using cached https://files.pythonhosted.org/packages/17/74/7c3ced03c3c76b9f98e4a0edae1801755a7599ebf481c04d9f77dfff17e3/wxPython-4.0.4.tar.gz
Collecting Pillow (from wxPython)
  Using cached https://files.pythonhosted.org/packages/b6/4b/5adc1109908266554fb978154c797c7d71aba43dd15508d8c1565648f6bc/Pillow-6.0.0-cp27-cp27mu-manylinux1_x86_64.whl
Collecting six (from wxPython)
  Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Building wheels for collected packages: wxPython
  Running setup.py bdist_wheel for wxPython ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-BySuYJ/wxPython/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpbF_z6Cpip-wheel- --python-tag cp27:
  running bdist_wheel
  running build
  WARNING: Building this way assumes that all generated files have been
  generated already.  If that is not the case then use build.py directly
  to generate the source and perform the build stage.  You can use
  --skip-build with the bdist_* or install commands to avoid this
  message and the wxWidgets and Phoenix build steps in the future.
  
  "/usr/bin/python" -u build.py build
  Will build using: "/usr/bin/python"
  2.7.15rc1 (default, Nov 12 2018, 14:31:15)
  [GCC 7.3.0]
  Python's architecture is 64bit
  cfg.VERSION: 4.0.4
  
  Running command: build
  Running command: build_wx
  wxWidgets build options: ['--wxpython', '--unicode', '--gtk3']
  Configure options: ['--enable-unicode', '--with-gtk=3', '--with-opengl', '--enable-sound', '--enable-graphics_ctx', '--enable-mediactrl', '--enable-display', '--enable-geometry', '--enable-debug_flag', '--enable-optimise', '--disable-debugreport', '--enable-uiactionsim', '--enable-autoidman', '--with-sdl']
  /tmp/pip-build-BySuYJ/wxPython/ext/wxWidgets/configure --enable-unicode --with-gtk=3 --with-opengl --enable-sound --enable-graphics_ctx --enable-mediactrl --enable-display --enable-geometry --enable-debug_flag --enable-optimise --disable-debugreport --enable-uiactionsim --enable-autoidman --with-sdl
  checking build system type... x86_64-pc-linux-gnu
  checking host system type... x86_64-pc-linux-gnu
  checking for --disable-gui... no
  checking for --enable-monolithic... no
  checking for --enable-plugins... no
  checking for --without-subdirs... no
  checking for --enable-official_build... no
  checking for --disable-all-features... no
  checking for --enable-universal... no
  checking for --enable-nanox... no
  checking for --enable-gpe... no
  checking for toolkit... gtk
  checking for --with-libpng... yes
  checking for --with-libjpeg... yes
  checking for --with-libtiff... yes
  checking for --without-libjbig... no
  checking for --without-liblzma... no
  checking for --with-libxpm... yes
  checking for --with-libiconv... yes
  checking for --with-libmspack... no
  checking for --without-gtkprint... no
  checking for --with-gnomevfs... no
  checking for --with-libnotify... yes
  checking for --with-hildon... no
  checking for --with-opengl... yes
  checking for --with-dmalloc... no
  checking for --with-sdl... yes
  checking for --with-regex... yes
  checking for --with-zlib... yes
  checking for --with-expat... yes
  checking for --with-macosx-sdk...
  checking for --with-macosx-version-min...
  checking for --enable-debug... default
  checking for --disable-debug_flag... no
  checking for --enable-debug_info... no
  checking for --enable-debug_gdb... no
  checking for --enable-debug_cntxt... no
  checking for --enable-mem_tracing... no
  checking for --disable-shared... no
  checking for --enable-stl... no
  checking for --enable-std_containers... no
  checking for --enable-std_iostreams... yes
  checking for --enable-std_string... yes
  checking for --enable-std_string_conv_in_wxstring... no
  checking for --disable-unicode... no
  checking for --enable-mslu... no
  checking for --enable-utf8... no
  checking for --enable-utf8only... no
  checking for --enable-extended_rtti... no
  checking for --disable-optimise... no
  checking for --enable-profile... no
  checking for --enable-no_rtti... no
  checking for --enable-no_exceptions... no
  checking for --enable-permissive... no
  checking for --enable-no_deps... no
  checking for --disable-vararg_macros... no
  checking for --enable-universal_binary... no
  checking for --enable-macosx_arch... no
  checking for --enable-compat26... no
  checking for --disable-compat28... no
  checking for --disable-rpath... no
  checking for --enable-objc_uniquifying... no
  checking for --disable-visibility... no
  checking for --disable-tls... no
  checking for --enable-intl... yes
  checking for --enable-xlocale... yes
  checking for --enable-config... yes
  checking for --enable-protocols... yes
  checking for --enable-ftp... yes
  checking for --enable-http... yes
  checking for --enable-fileproto... yes
  checking for --enable-sockets... yes
  checking for --enable-ipv6... no
  checking for --enable-ole... yes
  checking for --enable-dataobj... yes
  checking for --enable-ipc... yes
  checking for --enable-baseevtloop... yes
  checking for --enable-epollloop... yes
  checking for --enable-selectloop... yes
  checking for --enable-any... yes
  checking for --enable-apple_ieee... yes
  checking for --enable-arcstream... yes
  checking for --enable-base64... yes
  checking for --enable-backtrace... yes
  checking for --enable-catch_segvs... yes
  checking for --enable-cmdline... yes
  checking for --enable-datetime... yes
  checking for --enable-debugreport... no
  checking for --enable-dialupman... yes
  checking for --enable-dynlib... yes
  checking for --enable-dynamicloader... yes
  checking for --enable-exceptions... yes
  checking for --enable-ffile... yes
  checking for --enable-file... yes
  checking for --enable-filehistory... yes
  checking for --enable-filesystem... yes
  checking for --enable-fontenum... yes
  checking for --enable-fontmap... yes
  checking for --enable-fs_archive... yes
  checking for --enable-fs_inet... yes
  checking for --enable-fs_zip... yes
  checking for --enable-fsvolume... yes
  checking for --enable-fswatcher... yes
  checking for --enable-geometry... yes
  checking for --enable-log... yes
  checking for --enable-longlong... yes
  checking for --enable-mimetype... yes
  checking for --enable-printfposparam... yes
  checking for --enable-snglinst... yes
  checking for --enable-sound... yes
  checking for --enable-stdpaths... yes
  checking for --enable-stopwatch... yes
  checking for --enable-streams... yes
  checking for --enable-sysoptions... yes
  checking for --enable-tarstream... yes
  checking for --enable-textbuf... yes
  checking for --enable-textfile... yes
  checking for --enable-timer... yes
  checking for --enable-variant... yes
  checking for --enable-zipstream... yes
  checking for --enable-url... yes
  checking for --enable-protocol... yes
  checking for --enable-protocol_http... yes
  checking for --enable-protocol_ftp... yes
  checking for --enable-protocol_file... yes
  checking for --enable-threads... yes
  checking for --enable-iniconf... no
  checking for --enable-regkey... yes
  checking for --enable-docview... yes
  checking for --enable-help... yes
  checking for --enable-mshtmlhelp... yes
  checking for --enable-html... yes
  checking for --enable-htmlhelp... yes
  checking for --enable-xrc... yes
  checking for --enable-aui... yes
  checking for --enable-propgrid... yes
  checking for --enable-ribbon... yes
  checking for --enable-stc... yes
  checking for --enable-constraints... yes
  checking for --enable-loggui... yes
  checking for --enable-logwin... yes
  checking for --enable-logdialog... yes
  checking for --enable-mdi... yes
  checking for --enable-mdidoc... yes
  checking for --enable-mediactrl... yes
  checking for --enable-gstreamer8... no
  checking for --enable-richtext... yes
  checking for --enable-postscript... yes
  checking for --enable-printarch... yes
  checking for --enable-svg... yes
  checking for --enable-webkit... yes
  checking for --enable-webview... yes
  checking for --enable-graphics_ctx... yes
  checking for --enable-clipboard... yes
  checking for --enable-dnd... yes
  checking for --disable-controls... no
  checking for --enable-markup... yes
  checking for --enable-accel... yes
  checking for --enable-animatectrl... yes
  checking for --enable-bannerwindow... yes
  checking for --enable-artstd... yes
  checking for --enable-arttango... auto
  checking for --enable-bmpbutton... yes
  checking for --enable-bmpcombobox... yes
  checking for --enable-button... yes
  checking for --enable-calendar... yes
  checking for --enable-caret... yes
  checking for --enable-checkbox... yes
  checking for --enable-checklst... yes
  checking for --enable-choice... yes
  checking for --enable-choicebook... yes
  checking for --enable-collpane... yes
  checking for --enable-colourpicker... yes
  checking for --enable-combobox... yes
  checking for --enable-comboctrl... yes
  checking for --enable-commandlinkbutton... yes
  checking for --enable-dataviewctrl... yes
  checking for --enable-datepick... yes
  checking for --enable-detect_sm... yes
  checking for --enable-dirpicker... yes
  checking for --enable-display... yes
  checking for --enable-editablebox... yes
  checking for --enable-filectrl... yes
  checking for --enable-filepicker... yes
  checking for --enable-fontpicker... yes
  checking for --enable-gauge... yes
  checking for --enable-grid... yes
  checking for --enable-headerctrl... yes
  checking for --enable-hyperlink... yes
  checking for --enable-imaglist... yes
  checking for --enable-infobar... yes
  checking for --enable-listbook... yes
  checking for --enable-listbox... yes
  checking for --enable-listctrl... yes
  checking for --enable-notebook... yes
  checking for --enable-notifmsg... yes
  checking for --enable-odcombobox... yes
  checking for --enable-popupwin... yes
  checking for --enable-prefseditor... yes
  checking for --enable-radiobox... yes
  checking for --enable-radiobtn... yes
  checking for --enable-richmsgdlg... yes
  checking for --enable-richtooltip... yes
  checking for --enable-rearrangectrl... yes
  checking for --enable-sash... yes
  checking for --enable-scrollbar... yes
  checking for --enable-searchctrl... yes
  checking for --enable-slider... yes
  checking for --enable-spinbtn... yes
  checking for --enable-spinctrl... yes
  checking for --enable-splitter... yes
  checking for --enable-statbmp... yes
  checking for --enable-statbox... yes
  checking for --enable-statline... yes
  checking for --enable-stattext... yes
  checking for --enable-statusbar... yes
  checking for --enable-taskbaricon... yes
  checking for --enable-tbarnative... yes
  checking for --enable-textctrl... yes
  checking for --enable-timepick... yes
  checking for --enable-tipwindow... yes
  checking for --enable-togglebtn... yes
  checking for --enable-toolbar... yes
  checking for --enable-toolbook... yes
  checking for --enable-treebook... yes
  checking for --enable-treectrl... yes
  checking for --enable-treelist... yes
  checking for --enable-commondlg... yes
  checking for --enable-aboutdlg... yes
  checking for --enable-choicedlg... yes
  checking for --enable-coldlg... yes
  checking for --enable-filedlg... yes
  checking for --enable-finddlg... yes
  checking for --enable-fontdlg... yes
  checking for --enable-dirdlg... yes
  checking for --enable-msgdlg... yes
  checking for --enable-numberdlg... yes
  checking for --enable-splash... yes
  checking for --enable-textdlg... yes
  checking for --enable-tipdlg... yes
  checking for --enable-progressdlg... yes
  checking for --enable-wizarddlg... yes
  checking for --enable-menus... yes
  checking for --enable-miniframe... yes
  checking for --enable-tooltips... yes
  checking for --enable-splines... yes
  checking for --enable-mousewheel... yes
  checking for --enable-validators... yes
  checking for --enable-busyinfo... yes
  checking for --enable-hotkey... auto
  checking for --enable-joystick... yes
  checking for --enable-metafile... auto
  checking for --enable-dragimage... yes
  checking for --enable-accessibility... no
  checking for --enable-uiactionsim... yes
  checking for --enable-dctransform... yes
  checking for --enable-webviewwebkit... yes
  checking for --enable-palette... yes
  checking for --enable-image... yes
  checking for --enable-gif... yes
  checking for --enable-pcx... yes
  checking for --enable-tga... yes
  checking for --enable-iff... yes
  checking for --enable-pnm... yes
  checking for --enable-xpm... yes
  checking for --enable-ico_cur... yes
  checking for --enable-dccache... yes
  checking for --enable-ps-in-msw... yes
  checking for --enable-ownerdrawn... yes
  checking for --enable-uxtheme... yes
  checking for --enable-wxdib... yes
  checking for --enable-webviewie... yes
  checking for --enable-autoidman... yes
  checking for gcc... gcc
  checking whether the C compiler works... yes
  checking for C compiler default output file name... a.out
  checking for suffix of executables...
  checking whether we are cross compiling... no
  checking for suffix of object files... o
  checking whether we are using the GNU C compiler... yes
  checking whether gcc accepts -g... yes
  checking for gcc option to accept ISO C89... none needed
  checking whether we are using the Intel C compiler... no
  checking how to run the C preprocessor... gcc -E
  checking for grep that handles long lines and -e... /bin/grep
  checking for egrep... /bin/grep -E
  checking whether gcc needs -traditional... no
  checking for g++... g++
  checking whether we are using the GNU C++ compiler... yes
  checking whether g++ accepts -g... yes
  checking whether we are using the Intel C++ compiler... no
  checking whether we are using the Sun C++ compiler... no
  checking for ar... ar
  checking for ANSI C header files... yes
  checking for sys/types.h... yes
  checking for sys/stat.h... yes
  checking for stdlib.h... yes
  checking for string.h... yes
  checking for memory.h... yes
  checking for strings.h... yes
  checking for inttypes.h... yes
  checking for stdint.h... yes
  checking for unistd.h... yes
  checking for langinfo.h... yes
  checking for wchar.h... yes
  checking for sys/select.h... yes
  checking for cxxabi.h... yes
  checking for an ANSI C-conforming const... yes
  checking for inline... inline
  checking size of short... 2
  checking size of void *... 8
  checking size of int... 4
  checking size of long... 8
  checking size of size_t... 8
  checking size of long long... 8
  checking size of wchar_t... 4
  checking for va_copy... yes
  checking whether the compiler supports variadic macros... yes
  checking for _FILE_OFFSET_BITS value needed for large files... 64
  checking if large file support is available... yes
  checking for _LARGEFILE_SOURCE value needed for large files... no
  checking whether byte ordering is bigendian... no
  checking for iostream... yes
  checking if C++ compiler supports the explicit keyword... yes
  checking for std::wstring in ... yes
  checking for std::istream... yes
  checking for std::ostream... yes
  checking how to run the C++ preprocessor... g++ -E
  checking type_traits usability... yes
  checking type_traits presence... yes
  checking for type_traits... yes
  checking for __sync_fetch_and_add and __sync_sub_and_fetch builtins... yes
  checking for libraries directories... /usr/lib/x86_64-linux-gnu /usr/lib
  checking for cos... no
  checking for floor... no
  checking if floating point functions link without -lm... no
  checking for sin... yes
  checking for ceil... yes
  checking if floating point functions link with -lm... yes
  checking for strtoull... yes
  checking for pkg-config... no
  configure: WARNING: Defaulting to the builtin regex library for Unicode build.
  checking for zlib.h >= 1.1.4... no
  checking for zlib.h... (cached) no
  configure: WARNING: zlib library not found or too old, will use built-in instead
  checking for png.h > 0.90... no
  checking for png.h... (cached) no
  configure: WARNING: system png library not found or too old, will use built-in instead
  checking for jpeglib.h... no
  configure: WARNING: system jpeg library not found, will use built-in instead
  checking for tiffio.h... no
  configure: WARNING: system tiff library not found, will use built-in instead
  checking for lzma_code in -llzma... no
  checking for jbg_dec_init in -ljbig... no
  checking for expat.h... yes
  checking if expat.h is valid C++ header... yes
  checking for XML_ParserCreate in -lexpat... yes
  checking for GTK+ version...
  checking for pkg-config... no
  checking for GTK+ - version >= 3.0.0... no
  *** A new enough version of pkg-config was not found.
  *** See http://pkgconfig.sourceforge.net
  configure: error:
  The development files for GTK+ were not found. For GTK+ 2, please
  ensure that pkg-config is in the path and that gtk+-2.0.pc is
  installed. For GTK+ 1.2 please check that gtk-config is in the path,
  and that the version is 1.2.3 or above. Also check that the
  libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
  --libs' are in the LD_LIBRARY_PATH or equivalent.
  
  Error running configure
  ERROR: failed building wxWidgets
  Traceback (most recent call last):
    File "build.py", line 1321, in cmd_build_wx
      wxbuild.main(wxDir(), build_options)
    File "/tmp/pip-build-BySuYJ/wxPython/buildtools/build_wxwidgets.py", line 375, in main
      "Error running configure")
    File "/tmp/pip-build-BySuYJ/wxPython/buildtools/build_wxwidgets.py", line 85, in exitIfError
      raise builder.BuildError(msg)
  BuildError
  Finished command: build_wx (7.120s)
  Finished command: build (7.121s)
  Command '"/usr/bin/python" -u build.py build' failed with exit code 1.
  
  ----------------------------------------
  Failed building wheel for wxPython
  Running setup.py clean for wxPython
Failed to build wxPython
Installing collected packages: Pillow, six, wxPython
  Running setup.py install for wxPython ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-BySuYJ/wxPython/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-K_mQMh-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    running install
    running build
    WARNING: Building this way assumes that all generated files have been
    generated already.  If that is not the case then use build.py directly
    to generate the source and perform the build stage.  You can use
    --skip-build with the bdist_* or install commands to avoid this
    message and the wxWidgets and Phoenix build steps in the future.
    
    "/usr/bin/python" -u build.py build
    Will build using: "/usr/bin/python"
    2.7.15rc1 (default, Nov 12 2018, 14:31:15)
    [GCC 7.3.0]
    Python's architecture is 64bit
    cfg.VERSION: 4.0.4
    
    Running command: build
    Running command: build_wx
    wxWidgets build options: ['--wxpython', '--unicode', '--gtk3']
    Configure options: ['--enable-unicode', '--with-gtk=3', '--with-opengl', '--enable-sound', '--enable-graphics_ctx', '--enable-mediactrl', '--enable-display', '--enable-geometry', '--enable-debug_flag', '--enable-optimise', '--disable-debugreport', '--enable-uiactionsim', '--enable-autoidman', '--with-sdl']
    /tmp/pip-build-BySuYJ/wxPython/ext/wxWidgets/configure --enable-unicode --with-gtk=3 --with-opengl --enable-sound --enable-graphics_ctx --enable-mediactrl --enable-display --enable-geometry --enable-debug_flag --enable-optimise --disable-debugreport --enable-uiactionsim --enable-autoidman --with-sdl
    checking build system type... x86_64-pc-linux-gnu
    checking host system type... x86_64-pc-linux-gnu
    checking for --disable-gui... no
    checking for --enable-monolithic... no
    checking for --enable-plugins... no
    checking for --without-subdirs... no
    checking for --enable-official_build... no
    checking for --disable-all-features... no
    checking for --enable-universal... no
    checking for --enable-nanox... no
    checking for --enable-gpe... no
    checking for toolkit... gtk
    checking for --with-libpng... yes
    checking for --with-libjpeg... yes
    checking for --with-libtiff... yes
    checking for --without-libjbig... no
    checking for --without-liblzma... no
    checking for --with-libxpm... yes
    checking for --with-libiconv... yes
    checking for --with-libmspack... no
    checking for --without-gtkprint... no
    checking for --with-gnomevfs... no
    checking for --with-libnotify... yes
    checking for --with-hildon... no
    checking for --with-opengl... yes
    checking for --with-dmalloc... no
    checking for --with-sdl... yes
    checking for --with-regex... yes
    checking for --with-zlib... yes
    checking for --with-expat... yes
    checking for --with-macosx-sdk...
    checking for --with-macosx-version-min...
    checking for --enable-debug... default
    checking for --disable-debug_flag... no
    checking for --enable-debug_info... no
    checking for --enable-debug_gdb... no
    checking for --enable-debug_cntxt... no
    checking for --enable-mem_tracing... no
    checking for --disable-shared... no
    checking for --enable-stl... no
    checking for --enable-std_containers... no
    checking for --enable-std_iostreams... yes
    checking for --enable-std_string... yes
    checking for --enable-std_string_conv_in_wxstring... no
    checking for --disable-unicode... no
    checking for --enable-mslu... no
    checking for --enable-utf8... no
    checking for --enable-utf8only... no
    checking for --enable-extended_rtti... no
    checking for --disable-optimise... no
    checking for --enable-profile... no
    checking for --enable-no_rtti... no
    checking for --enable-no_exceptions... no
    checking for --enable-permissive... no
    checking for --enable-no_deps... no
    checking for --disable-vararg_macros... no
    checking for --enable-universal_binary... no
    checking for --enable-macosx_arch... no
    checking for --enable-compat26... no
    checking for --disable-compat28... no
    checking for --disable-rpath... no
    checking for --enable-objc_uniquifying... no
    checking for --disable-visibility... no
    checking for --disable-tls... no
    checking for --enable-intl... yes
    checking for --enable-xlocale... yes
    checking for --enable-config... yes
    checking for --enable-protocols... yes
    checking for --enable-ftp... yes
    checking for --enable-http... yes
    checking for --enable-fileproto... yes
    checking for --enable-sockets... yes
    checking for --enable-ipv6... no
    checking for --enable-ole... yes
    checking for --enable-dataobj... yes
    checking for --enable-ipc... yes
    checking for --enable-baseevtloop... yes
    checking for --enable-epollloop... yes
    checking for --enable-selectloop... yes
    checking for --enable-any... yes
    checking for --enable-apple_ieee... yes
    checking for --enable-arcstream... yes
    checking for --enable-base64... yes
    checking for --enable-backtrace... yes
    checking for --enable-catch_segvs... yes
    checking for --enable-cmdline... yes
    checking for --enable-datetime... yes
    checking for --enable-debugreport... no
    checking for --enable-dialupman... yes
    checking for --enable-dynlib... yes
    checking for --enable-dynamicloader... yes
    checking for --enable-exceptions... yes
    checking for --enable-ffile... yes
    checking for --enable-file... yes
    checking for --enable-filehistory... yes
    checking for --enable-filesystem... yes
    checking for --enable-fontenum... yes
    checking for --enable-fontmap... yes
    checking for --enable-fs_archive... yes
    checking for --enable-fs_inet... yes
    checking for --enable-fs_zip... yes
    checking for --enable-fsvolume... yes
    checking for --enable-fswatcher... yes
    checking for --enable-geometry... yes
    checking for --enable-log... yes
    checking for --enable-longlong... yes
    checking for --enable-mimetype... yes
    checking for --enable-printfposparam... yes
    checking for --enable-snglinst... yes
    checking for --enable-sound... yes
    checking for --enable-stdpaths... yes
    checking for --enable-stopwatch... yes
    checking for --enable-streams... yes
    checking for --enable-sysoptions... yes
    checking for --enable-tarstream... yes
    checking for --enable-textbuf... yes
    checking for --enable-textfile... yes
    checking for --enable-timer... yes
    checking for --enable-variant... yes
    checking for --enable-zipstream... yes
    checking for --enable-url... yes
    checking for --enable-protocol... yes
    checking for --enable-protocol_http... yes
    checking for --enable-protocol_ftp... yes
    checking for --enable-protocol_file... yes
    checking for --enable-threads... yes
    checking for --enable-iniconf... no
    checking for --enable-regkey... yes
    checking for --enable-docview... yes
    checking for --enable-help... yes
    checking for --enable-mshtmlhelp... yes
    checking for --enable-html... yes
    checking for --enable-htmlhelp... yes
    checking for --enable-xrc... yes
    checking for --enable-aui... yes
    checking for --enable-propgrid... yes
    checking for --enable-ribbon... yes
    checking for --enable-stc... yes
    checking for --enable-constraints... yes
    checking for --enable-loggui... yes
    checking for --enable-logwin... yes
    checking for --enable-logdialog... yes
    checking for --enable-mdi... yes
    checking for --enable-mdidoc... yes
    checking for --enable-mediactrl... yes
    checking for --enable-gstreamer8... no
    checking for --enable-richtext... yes
    checking for --enable-postscript... yes
    checking for --enable-printarch... yes
    checking for --enable-svg... yes
    checking for --enable-webkit... yes
    checking for --enable-webview... yes
    checking for --enable-graphics_ctx... yes
    checking for --enable-clipboard... yes
    checking for --enable-dnd... yes
    checking for --disable-controls... no
    checking for --enable-markup... yes
    checking for --enable-accel... yes
    checking for --enable-animatectrl... yes
    checking for --enable-bannerwindow... yes
    checking for --enable-artstd... yes
    checking for --enable-arttango... auto
    checking for --enable-bmpbutton... yes
    checking for --enable-bmpcombobox... yes
    checking for --enable-button... yes
    checking for --enable-calendar... yes
    checking for --enable-caret... yes
    checking for --enable-checkbox... yes
    checking for --enable-checklst... yes
    checking for --enable-choice... yes
    checking for --enable-choicebook... yes
    checking for --enable-collpane... yes
    checking for --enable-colourpicker... yes
    checking for --enable-combobox... yes
    checking for --enable-comboctrl... yes
    checking for --enable-commandlinkbutton... yes
    checking for --enable-dataviewctrl... yes
    checking for --enable-datepick... yes
    checking for --enable-detect_sm... yes
    checking for --enable-dirpicker... yes
    checking for --enable-display... yes
    checking for --enable-editablebox... yes
    checking for --enable-filectrl... yes
    checking for --enable-filepicker... yes
    checking for --enable-fontpicker... yes
    checking for --enable-gauge... yes
    checking for --enable-grid... yes
    checking for --enable-headerctrl... yes
    checking for --enable-hyperlink... yes
    checking for --enable-imaglist... yes
    checking for --enable-infobar... yes
    checking for --enable-listbook... yes
    checking for --enable-listbox... yes
    checking for --enable-listctrl... yes
    checking for --enable-notebook... yes
    checking for --enable-notifmsg... yes
    checking for --enable-odcombobox... yes
    checking for --enable-popupwin... yes
    checking for --enable-prefseditor... yes
    checking for --enable-radiobox... yes
    checking for --enable-radiobtn... yes
    checking for --enable-richmsgdlg... yes
    checking for --enable-richtooltip... yes
    checking for --enable-rearrangectrl... yes
    checking for --enable-sash... yes
    checking for --enable-scrollbar... yes
    checking for --enable-searchctrl... yes
    checking for --enable-slider... yes
    checking for --enable-spinbtn... yes
    checking for --enable-spinctrl... yes
    checking for --enable-splitter... yes
    checking for --enable-statbmp... yes
    checking for --enable-statbox... yes
    checking for --enable-statline... yes
    checking for --enable-stattext... yes
    checking for --enable-statusbar... yes
    checking for --enable-taskbaricon... yes
    checking for --enable-tbarnative... yes
    checking for --enable-textctrl... yes
    checking for --enable-timepick... yes
    checking for --enable-tipwindow... yes
    checking for --enable-togglebtn... yes
    checking for --enable-toolbar... yes
    checking for --enable-toolbook... yes
    checking for --enable-treebook... yes
    checking for --enable-treectrl... yes
    checking for --enable-treelist... yes
    checking for --enable-commondlg... yes
    checking for --enable-aboutdlg... yes
    checking for --enable-choicedlg... yes
    checking for --enable-coldlg... yes
    checking for --enable-filedlg... yes
    checking for --enable-finddlg... yes
    checking for --enable-fontdlg... yes
    checking for --enable-dirdlg... yes
    checking for --enable-msgdlg... yes
    checking for --enable-numberdlg... yes
    checking for --enable-splash... yes
    checking for --enable-textdlg... yes
    checking for --enable-tipdlg... yes
    checking for --enable-progressdlg... yes
    checking for --enable-wizarddlg... yes
    checking for --enable-menus... yes
    checking for --enable-miniframe... yes
    checking for --enable-tooltips... yes
    checking for --enable-splines... yes
    checking for --enable-mousewheel... yes
    checking for --enable-validators... yes
    checking for --enable-busyinfo... yes
    checking for --enable-hotkey... auto
    checking for --enable-joystick... yes
    checking for --enable-metafile... auto
    checking for --enable-dragimage... yes
    checking for --enable-accessibility... no
    checking for --enable-uiactionsim... yes
    checking for --enable-dctransform... yes
    checking for --enable-webviewwebkit... yes
    checking for --enable-palette... yes
    checking for --enable-image... yes
    checking for --enable-gif... yes
    checking for --enable-pcx... yes
    checking for --enable-tga... yes
    checking for --enable-iff... yes
    checking for --enable-pnm... yes
    checking for --enable-xpm... yes
    checking for --enable-ico_cur... yes
    checking for --enable-dccache... yes
    checking for --enable-ps-in-msw... yes
    checking for --enable-ownerdrawn... yes
    checking for --enable-uxtheme... yes
    checking for --enable-wxdib... yes
    checking for --enable-webviewie... yes
    checking for --enable-autoidman... yes
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking whether we are using the Intel C compiler... no
    checking how to run the C preprocessor... gcc -E
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking whether gcc needs -traditional... no
    checking for g++... g++
    checking whether we are using the GNU C++ compiler... yes
    checking whether g++ accepts -g... yes
    checking whether we are using the Intel C++ compiler... no
    checking whether we are using the Sun C++ compiler... no
    checking for ar... ar
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for langinfo.h... yes
    checking for wchar.h... yes
    checking for sys/select.h... yes
    checking for cxxabi.h... yes
    checking for an ANSI C-conforming const... yes
    checking for inline... inline
    checking size of short... 2
    checking size of void *... 8
    checking size of int... 4
    checking size of long... 8
    checking size of size_t... 8
    checking size of long long... 8
    checking size of wchar_t... 4
    checking for va_copy... yes
    checking whether the compiler supports variadic macros... yes
    checking for _FILE_OFFSET_BITS value needed for large files... 64
    checking if large file support is available... yes
    checking for _LARGEFILE_SOURCE value needed for large files... no
    checking whether byte ordering is bigendian... no
    checking for iostream... yes
    checking if C++ compiler supports the explicit keyword... yes
    checking for std::wstring in ... yes
    checking for std::istream... yes
    checking for std::ostream... yes
    checking how to run the C++ preprocessor... g++ -E
    checking type_traits usability... yes
    checking type_traits presence... yes
    checking for type_traits... yes
    checking for __sync_fetch_and_add and __sync_sub_and_fetch builtins... yes
    checking for libraries directories... /usr/lib/x86_64-linux-gnu /usr/lib
    checking for cos... no
    checking for floor... no
    checking if floating point functions link without -lm... no
    checking for sin... yes
    checking for ceil... yes
    checking if floating point functions link with -lm... yes
    checking for strtoull... yes
    checking for pkg-config... no
    configure: WARNING: Defaulting to the builtin regex library for Unicode build.
    checking for zlib.h >= 1.1.4... no
    checking for zlib.h... (cached) no
    configure: WARNING: zlib library not found or too old, will use built-in instead
    checking for png.h > 0.90... no
    checking for png.h... (cached) no
    configure: WARNING: system png library not found or too old, will use built-in instead
    checking for jpeglib.h... no
    configure: WARNING: system jpeg library not found, will use built-in instead
    checking for tiffio.h... no
    configure: WARNING: system tiff library not found, will use built-in instead
    checking for lzma_code in -llzma... no
    checking for jbg_dec_init in -ljbig... no
    checking for expat.h... yes
    checking if expat.h is valid C++ header... yes
    checking for XML_ParserCreate in -lexpat... yes
    checking for GTK+ version...
    checking for pkg-config... no
    checking for GTK+ - version >= 3.0.0... no
    *** A new enough version of pkg-config was not found.
    *** See http://pkgconfig.sourceforge.net
    configure: error:
    The development files for GTK+ were not found. For GTK+ 2, please
    ensure that pkg-config is in the path and that gtk+-2.0.pc is
    installed. For GTK+ 1.2 please check that gtk-config is in the path,
    and that the version is 1.2.3 or above. Also check that the
    libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
    --libs' are in the LD_LIBRARY_PATH or equivalent.
    
    Error running configure
    ERROR: failed building wxWidgets
    Traceback (most recent call last):
      File "build.py", line 1321, in cmd_build_wx
        wxbuild.main(wxDir(), build_options)
      File "/tmp/pip-build-BySuYJ/wxPython/buildtools/build_wxwidgets.py", line 375, in main
        "Error running configure")
      File "/tmp/pip-build-BySuYJ/wxPython/buildtools/build_wxwidgets.py", line 85, in exitIfError
        raise builder.BuildError(msg)
    BuildError
    Finished command: build_wx (6.929s)
    Finished command: build (6.929s)
    Command '"/usr/bin/python" -u build.py build' failed with exit code 1.
    
    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-BySuYJ/wxPython/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-K_mQMh-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-BySuYJ/wxPython/

 

'Programming > python(파이썬)' 카테고리의 다른 글

python3 import cv2  (0) 2019.05.09
python pylint @ vscode  (0) 2019.05.09
PyOpenGL + ubuntu 18.04  (0) 2019.05.02
python 3.7 + MS build tool 2015 + pyGL 또 실패 ㅠㅠ  (0) 2019.05.01
python + openGL  (0) 2019.04.30
Posted by 구차니

아니.. 너무 쉽자나.. (실행되는건 별개로)

 

$ pip install PyOpenGL PyOpenGL_accelerate
Collecting PyOpenGL
  Downloading https://files.pythonhosted.org/packages/9c/1d/4544708aaa89f26c97cc09450bb333a23724a320923e74d73e028b3560f9/PyOpenGL-3.1.0.tar.gz (1.2MB)
    100% |████████████████████████████████| 1.2MB 1.3MB/s
Collecting PyOpenGL_accelerate
  Downloading https://files.pythonhosted.org/packages/d9/74/293aa8794f2f236186d19e61c5548160bfe159c996ba01ed9144c89ee8ee/PyOpenGL-accelerate-3.1.0.tar.gz (323kB)
    100% |████████████████████████████████| 327kB 5.0MB/s
Building wheels for collected packages: PyOpenGL, PyOpenGL-accelerate
  Running setup.py bdist_wheel for PyOpenGL ... done
  Stored in directory: /home/minimonk/.cache/pip/wheels/6c/00/7f/1dd736f380848720ad79a1a1de5272e0d3f79c15a42968fb58
  Running setup.py bdist_wheel for PyOpenGL-accelerate ... done
  Stored in directory: /home/minimonk/.cache/pip/wheels/4e/8e/aa/ae3f1309ede1048b7f6a11c92d3d7d50fd6a7ab4507e6c7aca
Successfully built PyOpenGL PyOpenGL-accelerate
Installing collected packages: PyOpenGL, PyOpenGL-accelerate
Successfully installed PyOpenGL-3.1.0 PyOpenGL-accelerate-3.1.0

 

$ pip install pyopengl numpy glfw
Collecting pyopengl
Collecting numpy
  Downloading https://files.pythonhosted.org/packages/e1/72/179a78b565ecf01fe98dab6417581d30acac15c2d93c49f93169ebea99b1/numpy-1.16.3-cp27-cp27mu-manylinux1_x86_64.whl (17.0MB)
    100% |████████████████████████████████| 17.0MB 79kB/s
Collecting glfw
  Downloading https://files.pythonhosted.org/packages/5d/65/c6275744a01425195f1f446e022e5dfa6497aa68479a3952e434e04b2fa0/glfw-1.7.1.tar.gz
Building wheels for collected packages: glfw
  Running setup.py bdist_wheel for glfw ... done
  Stored in directory: /home/minimonk/.cache/pip/wheels/c5/53/f9/fd31798dce7e10aa49f8354e4111b9c9cad10c894184658663
Successfully built glfw
Installing collected packages: pyopengl, numpy, glfw
Successfully installed glfw-1.7.1 numpy-1.16.3 pyopengl-3.1.0

 

위에서 깔고깔고 하는데 라이브러리 없대서 또 깔고

ImportError: Failed to load GLFW3 shared library.

$ sudo apt-get install libglfw3
$ sudo apt-get install libglfw3-dev

[링크 : https://stackoverflow.com/.../importerror-failed-to-load-glfw3-shared-library-without-root-access-on-linux]

 

근데 실행안되네 -_ㅠ

얘는 아마도.. 원격지에서 X11 forwarding 하려고 해서 그런거 같고

$ python pygl_test.py
Traceback (most recent call last):
  File "pygl_test.py", line 92, in 
    main()
  File "pygl_test.py", line 10, in main
    if not glfw.init():
  File "/home/minimonk/.local/lib/python2.7/site-packages/glfw/__init__.py", line 607, in init
    res = _glfw.glfwInit()
  File "/home/minimonk/.local/lib/python2.7/site-packages/glfw/__init__.py", line 516, in errcheck
    _reraise(exc[1], exc[2])
  File "/home/minimonk/.local/lib/python2.7/site-packages/glfw/__init__.py", line 50, in _reraise
    exec("raise exception, None, traceback")
  File "/home/minimonk/.local/lib/python2.7/site-packages/glfw/__init__.py", line 495, in callback_wrapper
    return func(*args, **kwargs)
  File "/home/minimonk/.local/lib/python2.7/site-packages/glfw/__init__.py", line 669, in _raise_glfw_errors_as_exceptions
    raise GLFWError(message)
glfw.GLFWError: (65544) X11: RandR gamma ramp support seems broken

 

흐음.. python2.7 이라서 3.7을 깔고 했는데 pip 설치 경로에 따라 다른건가? 3.7에서는 해당 모듈을 불러오질 못한다.

$ python3.7 pygl_test.py
Traceback (most recent call last):
  File "pygl_test.py", line 1, in 
    import glfw
ModuleNotFoundError: No module named 'glfw'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in 
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in 
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in 
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in 
    import apt
  File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in 
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
  File "pygl_test.py", line 1, in 
    import glfw
ModuleNotFoundError: No module named 'glfw'

[링크 : https://github.com/totex/PyOpenGL_tutorials/blob/master/video_06_quad.py]

 

+

2019.05.04

ubuntu 깔고 native로 했는데 안된다.. ㅠㅠ GLSL3.30을 지원하지 않아서 라니 ㅠㅠ

$ python pygl.py 
No handlers could be found for logger "OpenGL.arrays.numpymodule"
Traceback (most recent call last):
  File "pygl.py", line 92, in 
    main()
  File "pygl.py", line 56, in main
    shader = OpenGL.GL.shaders.compileProgram(OpenGL.GL.shaders.compileShader(vertex_shader, GL_VERTEX_SHADER),
  File "/home/minimonk/.local/lib/python2.7/site-packages/OpenGL/GL/shaders.py", line 226, in compileShader
    shaderType,
RuntimeError: ('Shader compile failure (0): 0:2(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES\n', ['\n    #version 330\n    in vec3 position;\n    in vec3 color;\n\n    out vec3 newColor;\n    void main()\n    {\n        gl_Position = vec4(position, 1.0f);\n        newColor = color;\n    }\n    '], GL_VERTEX_SHADER)

 

+

걍 속시원하게 2.7 밀고 새로 깔고 클린하게~

sudo apt-get remove python
sudo apt-get remove python3.7
sudo apt-get autoremove
sudo apt-get install python3.7
sudo apt-get install python3-pip

[링크 : https://linuxize.com/post/how-to-install-python-3-7-on-ubuntu-18-04/]

[링크 : https://linuxize.com/post/how-to-install-pip-on-ubuntu-18.04/]

 

안되잖아! ㅠㅠ

$ python3 pygl_test.py
Traceback (most recent call last):
  File "pygl_test.py", line 92, in 
    main()
  File "pygl_test.py", line 10, in main
    if not glfw.init():
  File "/home/minimonk/.local/lib/python3.6/site-packages/glfw/__init__.py", line 607, in init
    res = _glfw.glfwInit()
  File "/home/minimonk/.local/lib/python3.6/site-packages/glfw/__init__.py", line 516, in errcheck
    _reraise(exc[1], exc[2])
  File "/home/minimonk/.local/lib/python3.6/site-packages/glfw/__init__.py", line 45, in _reraise
    raise exception.with_traceback(traceback)
  File "/home/minimonk/.local/lib/python3.6/site-packages/glfw/__init__.py", line 495, in callback_wrapper
    return func(*args, **kwargs)
  File "/home/minimonk/.local/lib/python3.6/site-packages/glfw/__init__.py", line 669, in _raise_glfw_errors_as_exceptions
    raise GLFWError(message)
glfw.GLFWError: (65544) b'X11: RandR gamma ramp support seems broken'

 

옛날 글이고 18.04 / python3에는 아래 패키지를 깔아주면 되는 듯.

$ sudo apt-get install python3-opengl
Install the distribution package as: sudo apt-get install python-opengl - this works for me.

[링크 : https://stackoverflow.com/questions/26700719/pyopengl-glutinit-nullfunctionerror]

 

일단은 해결~ 인가?

위에 쉐이더 쓰는건 원격으로 할 경우에는 방법이 없는 듯.. ㅠㅠ

[링크 : http://code.activestate.com/recipes/325391-open-a-glut-window-and-draw-a-sphere-using-pythono/]

'Programming > python(파이썬)' 카테고리의 다른 글

python pylint @ vscode  (0) 2019.05.09
python wxpython  (0) 2019.05.08
python 3.7 + MS build tool 2015 + pyGL 또 실패 ㅠㅠ  (0) 2019.05.01
python + openGL  (0) 2019.04.30
python + openCV 공부 시작  (0) 2019.04.30
Posted by 구차니

+

전체 사용자 설치로 하면 사용자 권한 문제로 pip로 설치시 안되는 수가 있어서 --user 옵션을 주어야 함

Could not install packages due to an EnvironmentError: [WinError 5] 액세스가 거부되었습니다: 'c:\\program files (x86)\\python37-32\\lib\\site-packages\\pip-19.0.3.dist-info\\entry_points.txt'
Consider using the `--user` option or check the permissions.

 

---

python 3.7.3에

mingw 실패

ms vs community에 14.0 빌드툴 추가해도 실패

 

python 3.4.3 에

mingw 실패

 

그래서 고민하다가 원래대로 해보겠다고 고생중

 

Microsoft Visual C++ 14.0 standalone: Visual C++ Build Tools 2015 (x86, x64, ARM)

This is a standalone version of Visual C++ 14.0 compiler, you don't need to install Visual Studio 2015.

  • Install Microsoft Visual C++ Build Tools 2015. Check Windows 8.1 SDK and Windows 10 SDK options.

  • The setuptools Python package version must be at least 24.0.

 Visual C++ Build Tools 2015 was upgraded by Microsoft to Build Tools for Visual Studio 2017. See the previous paragraph to install it.

[링크 : https://wiki.python.org/moin/WindowsCompilers]

 

 

microsoft visual C++ Build Tools 2015를 까는데 별다른 체크옵션 없던데..

[링크 : https://www.microsoft.com/ko-kr/download/details.aspx?id=48159]

 

아래 경로를 PATH에 추가

C:\Program Files (x86)\MSBuild\14.0\Bin

[링크 : http://www.sysnet.pe.kr/2/0/11275]

 

MSBuild tool 로도 안되네..

    ERROR: Complete output from command 'c:\program files (x86)\python37-32\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\shin\\AppData\\Local\\Temp\\pip-install-i1zl3xr6\\PyOpenGL-accelerate\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\shin\AppData\Local\Temp\pip-record-kda1gypo\install-record.txt' --single-version-externally-managed --compile --user --prefix=:
    ERROR: Unable to import numpy, skipping numpy extension building
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-3.7
    creating build\lib.win32-3.7\OpenGL_accelerate
    copying .\setup.py -> build\lib.win32-3.7\OpenGL_accelerate
    copying .\__init__.py -> build\lib.win32-3.7\OpenGL_accelerate
    running build_ext
    building 'OpenGL_accelerate.wrapper' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
    ----------------------------------------
ERROR: Command "'c:\program files (x86)\python37-32\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\shin\\AppData\\Local\\Temp\\pip-install-i1zl3xr6\\PyOpenGL-accelerate\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\shin\AppData\Local\Temp\pip-record-kda1gypo\install-record.txt' --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in C:\Users\shin\AppData\Local\Temp\pip-install-i1zl3xr6\PyOpenGL-accelerate\

 

visual studio community 받기

[링크 : https://visualstudio.microsoft.com/ko/downloads]

 

windows 8.1 / 10 SDK

[링크 : https://developer.microsoft.com/ko-kr/windows/downloads/sdk-archive]

 

 

+

2019.05.02

도대체 저걸 어떻게 해야하려나...

wrapper.c를 찾아봐야겠네

 C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\cl.exe
 /c /nologo /Ox /W3 /GL /DNDEBUG /MD 
-IC:\Users\shin\AppData\Local\Temp\pip-install-1qm70fwh\PyOpenGL-accelerate\.. 
-IC:\Users\shin\AppData\Local\Temp\pip-install-1qm70fwh\PyOpenGL-accelerate\src 
-IC:\Users\shin\AppData\Local\Temp\pip-install-1qm70fwh\PyOpenGL-accelerate 
"-Ic:\program files (x86)\python37-32\include" 
"-Ic:\program files (x86)\python37-32\include" 
"-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" 
"-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" 
"-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" 
"-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" 
"-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" 
"-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" 
/Tcsrc\wrapper.c 
/Fobuild\temp.win32-3.7\Release\src\wrapper.obj

'Programming > python(파이썬)' 카테고리의 다른 글

python wxpython  (0) 2019.05.08
PyOpenGL + ubuntu 18.04  (0) 2019.05.02
python + openGL  (0) 2019.04.30
python + openCV 공부 시작  (0) 2019.04.30
pypy  (0) 2018.04.04
Posted by 구차니

해보려는데 영 안되네.. 설치 안한게 있어서 그런가?

 

C:\Users>pip install pyopengl numpy glfw
Collecting pyopengl
  Downloading https://files.pythonhosted.org/packages/9c/1d/4544708aaa89f26c97cc09450bb333a23724a320923e74d73e028b3560f9/PyOpenGL-3.1.0.tar.gz (1.2MB)
     |████████████████████████████████| 1.2MB 731kB/s
Requirement already satisfied: numpy in c:\users\shin\appdata\local\programs\python\python37-32\lib\site-packages (1.16.3)
Collecting glfw
  Downloading https://files.pythonhosted.org/packages/af/3b/2f8c60fcb0a486eae4dd18c29de22ed667aed5e81f16874102f8580b5900/glfw-1.7.1-py2.py3-none-win32.whl (55kB)
     |████████████████████████████████| 61kB 27kB/s
Installing collected packages: pyopengl, glfw
  Running setup.py install for pyopengl ... done
Successfully installed glfw-1.7.1 pyopengl-3.1.0

 

C:\study\python>python gl.py
Traceback (most recent call last):
  File "gl.py", line 92, in 
    main()
  File "gl.py", line 13, in main
    window = glfw.create_window(800, 600, "My OpenGL window", None, None)
  File "C:\Users\shin\AppData\Local\Programs\Python\Python37-32\lib\site-packages\glfw\__init__.py", line 893, in create_window
    monitor, share)
  File "C:\Users\shin\AppData\Local\Programs\Python\Python37-32\lib\site-packages\glfw\__init__.py", line 516, in errcheck
    _reraise(exc[1], exc[2])
  File "C:\Users\shin\AppData\Local\Programs\Python\Python37-32\lib\site-packages\glfw\__init__.py", line 45, in _reraise
    raise exception.with_traceback(traceback)
  File "C:\Users\shin\AppData\Local\Programs\Python\Python37-32\lib\site-packages\glfw\__init__.py", line 495, in callback_wrapper
    return func(*args, **kwargs)
  File "C:\Users\shin\AppData\Local\Programs\Python\Python37-32\lib\site-packages\glfw\__init__.py", line 669, in _raise_glfw_errors_as_exceptions
    raise GLFWError(message)
glfw.GLFWError: (65542) b'WGL: The driver does not appear to support OpenGL'

[링크 : https://webnautes.tistory.com/1271]

[링크 : https://answers.microsoft.com/.../no-opengl-acceleration-with-hd-3000-on-windows-10/...]

[링크 : https://www.intel.com/content/www/us/en/support/articles/000005526/graphics-drivers.html?language=en_US]

 

+

2019.05.01

 

홈페이지 가보니 PyOpenGL_accelerate 패키지를 안깔아서 그런가?

Downloading and Installation
The easiest way to install PyOpenGL is using pip

$ pip install PyOpenGL PyOpenGL_accelerate

[링크 : http://pyopengl.sourceforge.net/]

'Programming > python(파이썬)' 카테고리의 다른 글

PyOpenGL + ubuntu 18.04  (0) 2019.05.02
python 3.7 + MS build tool 2015 + pyGL 또 실패 ㅠㅠ  (0) 2019.05.01
python + openCV 공부 시작  (0) 2019.04.30
pypy  (0) 2018.04.04
파이썬 print가 희한하네..  (0) 2017.04.02
Posted by 구차니

지하철에서 잉여하지 말고 이거나 해야지

노트북에 웹캠도 있으니 딱이네

 

[링크 : https://diy-project.tistory.com/78]

[링크 : https://pypi.org/project/opencv-contrib-python/]

 

vscode와 연동하기

[링크 : https://realpython.com/python-development-visual-studio-code/]

 

+

C:\Users>pip install OpenCV-Python
Collecting OpenCV-Python
  Downloading https://files.pythonhosted.org/packages/99/ad/864b2f284517249a96190fdf6b21a291d9716115d6886938ccd86afaf821/opencv_python-4.1.0.25-cp37-cp37m-win32.whl (25.7MB)
    100% |████████████████████████████████| 25.7MB 439kB/s
Collecting numpy>=1.14.5 (from OpenCV-Python)
  Downloading https://files.pythonhosted.org/packages/ab/75/9ac63977cbca68e17406a53a8c573a925a16771800be47a73f18c838f3fb/numpy-1.16.3-cp37-cp37m-win32.whl (10.0MB)
    100% |████████████████████████████████| 10.0MB 371kB/s
Installing collected packages: numpy, OpenCV-Python
Successfully installed OpenCV-Python-4.1.0.25 numpy-1.16.3
You are using pip version 19.0.3, however version 19.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

'Programming > python(파이썬)' 카테고리의 다른 글

python 3.7 + MS build tool 2015 + pyGL 또 실패 ㅠㅠ  (0) 2019.05.01
python + openGL  (0) 2019.04.30
pypy  (0) 2018.04.04
파이썬 print가 희한하네..  (0) 2017.04.02
파이썬 리스트(list)와 튜플(tuple)  (0) 2017.04.02
Posted by 구차니