반응형
반응형

 

파일 실행에 필요한 모듈 리스트 추출 방법

 

pip install pipreqs

pipreqs . --encoding=utf-8 --force


       .: 현재 디렉토리를 스캔하라는 의미입니다.
       
       --encoding=utf-8: 파일 인코딩을 지정합니다. (한글 주석 등이 있을 경우 필요)
       
       --force: 이미 requirements.txt 파일이 존재하더라도 덮어쓰도록 합니다. (주의해서 사용)


pip install -r requirements.txt
반응형
반응형

크로스 플랫폼 사용자 인터페이스의 신속한 개발을 위한 오픈 소스 파이썬 라이브러리다.

키비 응용 프로그램을 사용하면 리눅스, 윈도우에 사용하는 GUI 프로그램뿐 아니라 안드로이드, IOS 용도로 개발할 수 있다.

 

https://kivy.org/

 

Kivy: Cross-platform Python Framework for NUI

Open source Python framework for rapid development of applications that make use of innovative user interfaces, such as multi-touch apps.

kivy.org

https://kivy.org/doc/stable/gettingstarted/intro.html

 

Introduction — Kivy 2.2.1 documentation

Introduction Start Developing Kivy Apps Right Away! Creating Kivy apps is fun and rewarding. This guide should be the perfect starting point to get you on the right track for app development. You will require a basic knowledge of Python to follow this intr

kivy.org

https://wikidocs.net/book/8263

 

kivy 한글 공식페이지

문의: mr.everything.kr@gmail.com

wikidocs.net

# pip install kivy


from kivy.app import App
from kivy.uix.button import Button

class YourApp(App):
    def build(self):
        return Button(text="Hello, Kivy!")

if __name__ == '__main__':
    YourApp().run()
반응형
반응형

[PYTHON] python QRCode 만들기

    pyqrcode
    >> pip install pyqrcode
   
    pypng
    >> pip install pypng
   
    Pillow (PIL Fork)
    >> pip install Pillow
   
    1.pip 를 업데이트 하고 설치 하는 것이 좋다.
    2.Prompt는 "관리자로 실행" 해서 설치 하시오.
    python.exe -m pip install --upgrade pip
   
    * 설치된 패키지 확인
    pip list -v 

 

""" pyqrcode
    https://pypi.org/project/PyQRCode/
    >> pip install pyqrcode
    
    pypng
    https://pypi.org/project/pypng/
    >> pip install pypng
    
    Pillow (PIL Fork)
    https://pillow.readthedocs.io/en/latest/installation.html
    >> pip install Pillow
    
    1.pip 를 업데이트 하고 설치 하는 것이 좋다. 
    2.Prompt는 "관리자로 실행" 해서 설치 하시오. 
    python.exe -m pip install --upgrade pip
    
    * 설치된 패키지 확인
    pip list -v
"""
import os
import sys
os.environ['JAVA_OPTS'] = 'Xmx4096M'

import pyqrcode
import png
from PIL import Image 

print(" os.getcwd() : ", os.getcwd())

prePath = "./Project/QR/"
file_name = prePath + "QRCode.png" 

link = input("URL을 입력하세요~ : ")
qr_code = pyqrcode.create(link)
qr_code.png( file_name, scale=5)
Image.open(file_name)

반응형
반응형

 

1. tkinter 설치

 

먼저 tkinter를 설치해야겠죠.

저는 Mac 기준으로 설명을 드릴테지만 (놀랍게도 tkinter는 Mac에서도 작동합니다.)

Window도 동일합니다.

 

pip install tk

 

terminal에 위 명령어를 입력합시다.

주의할 점은 라이브러리 이름이 tkinter라고 해서 pip install tkinter라고 입력하면 설치되지 않습니다.

pip install tk라고 입력해야 합니다.

반응형
반응형

mpld3 - Bringing Matplotlib to the Browser

https://mpld3.github.io/install.html

 

Installing mpld3 — Bringing Matplotlib to the Browser

Dependencies The mpld3 package is compatible with Python versions 2.6, 2.7, 3.3, and 3.4. It requires matplotlib version 1.3+ and jinja2 version 2.7+. Optionally, mpld3 can be used within the IPython notebook, and requires IPython version 1.0+, and prefera

mpld3.github.io

 mpld3는 매트플롯립과 d3js를 사용해서 웹의 인터랙티브 데이터 시각화 를 가능하도록 만드는 것이 목적이라고 하네요. 간단하게, matpllitb의 그래픽을 html코드로(코드를 뜯어보면, 사실 거의 d3js 코드입니다만), 변환해줍니다. 이걸 가지고, 차트 같은 것을 좀 더 편하게 변환할 수 있겠죠.

https://anaconda.org/conda-forge/mpld3

Installers

Info: This package contains files in non-standard labels.

conda install 

  •  linux-64  v0.3
  •  win-32  v0.3
  •    noarch  v0.5.7
  •  osx-64  v0.3
  •  win-64  v0.3
To install this package with conda run one of the following:
conda install -c conda-forge mpld3
conda install -c conda-forge/label/gcc7 mpld3
conda install -c conda-forge/label/cf201901 mpld3
conda install -c conda-forge/label/cf202003 mpld3
반응형
반응형

 

pip install pandas 

 

conda install -c anaconda pandas 

When working with tabular data, such as data stored in spreadsheets or databases, pandas is the right tool for you. pandas will help you to explore, clean, and process your data. In pandas, a data table is called a DataFrame.

반응형

+ Recent posts