'도서 > 국내 도서' 카테고리의 다른 글
모던 자바스크립트 입문 (0) | 2018.07.27 |
---|---|
오픈소스 도구를 활용한 웹 모의해킹과 침해대응 (0) | 2018.07.24 |
텐서플로 入門 (0) | 2018.07.18 |
프로그래밍 면접 이렇게 준비한다 (0) | 2018.07.03 |
인생단어 변화를 이끄는 긍정적인 사람의 한 마디 (0) | 2018.07.01 |
모던 자바스크립트 입문 (0) | 2018.07.27 |
---|---|
오픈소스 도구를 활용한 웹 모의해킹과 침해대응 (0) | 2018.07.24 |
텐서플로 入門 (0) | 2018.07.18 |
프로그래밍 면접 이렇게 준비한다 (0) | 2018.07.03 |
인생단어 변화를 이끄는 긍정적인 사람의 한 마디 (0) | 2018.07.01 |
1. conda 업데이트
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | (base) C:\Users\Admin>conda update -n base conda Solving environment: done ## Package Plan ## environment location: C:\Users\Admin\Anaconda3 added / updated specs: - conda The following packages will be downloaded: package | build ---------------------------|----------------- conda-4.5.8 | py36_0 1.0 MB The following packages will be UPDATED: certifi: 2018.4.16-py36_0 conda-forge --> 2018.4.16-py36_0 conda: 4.5.5-py36_0 conda-forge --> 4.5.8-py36_0 Proceed ([y]/n)? y Downloading and Extracting Packages conda-4.5.8 | 1.0 MB | ########################################################################### | 100% Preparing transaction: done Verifying transaction: done Executing transaction: done | cs |
2. 텐서플로우 설치
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | (base) C:\Users\Admin>pip install tensorflow Collecting tensorflow Downloading https://files.pythonhosted.org/packages/e7/88/417f18ca7eed5ba9bebd51650d04a4af929f96c10a10fbb3302196f8d098/tensorflow-1.9.0-cp36-cp36m-win_amd64.whl (37.1MB) 100% |████████████████████████████████| 37.1MB 503kB/s Collecting protobuf>=3.4.0 (from tensorflow) Downloading https://files.pythonhosted.org/packages/75/7a/0dba607e50b97f6a89fa3f96e23bf56922fa59d748238b30507bfe361bbc/protobuf-3.6.0-cp36-cp36m-win_amd64.whl (1.1MB) 100% |████████████████████████████████| 1.1MB 1.8MB/s Collecting tensorboard<1.10.0,>=1.9.0 (from tensorflow) Downloading https://files.pythonhosted.org/packages/9e/1f/3da43860db614e294a034e42d4be5c8f7f0d2c75dc1c428c541116d8cdab/tensorboard-1.9.0-py3-none-any.whl (3.3MB) 100% |████████████████████████████████| 3.3MB 3.0MB/s Requirement already satisfied: wheel>=0.26 in c:\users\admin\anaconda3\lib\site-packages (from tensorflow) (0.31.1) Collecting grpcio>=1.8.6 (from tensorflow) Downloading https://files.pythonhosted.org/packages/d5/c6/15728549704f9c03db7179b7f99303b91b7703e18a50f5e7b47e59b289ea/grpcio-1.13.0-cp36-cp36m-win_amd64.whl (1.4MB) 100% |████████████████████████████████| 1.4MB 2.5MB/s Collecting absl-py>=0.1.6 (from tensorflow) Downloading https://files.pythonhosted.org/packages/57/8d/6664518f9b6ced0aa41cf50b989740909261d4c212557400c48e5cda0804/absl-py-0.2.2.tar.gz (82kB) 100% |████████████████████████████████| 92kB 3.2MB/s Collecting astor>=0.6.0 (from tensorflow) Downloading https://files.pythonhosted.org/packages/35/6b/11530768cac581a12952a2aad00e1526b89d242d0b9f59534ef6e6a1752f/astor-0.7.1-py2.py3-none-any.whl Collecting gast>=0.2.0 (from tensorflow) Downloading https://files.pythonhosted.org/packages/5c/78/ff794fcae2ce8aa6323e789d1f8b3b7765f601e7702726f430e814822b96/gast-0.2.0.tar.gz Requirement already satisfied: numpy>=1.13.3 in c:\users\admin\anaconda3\lib\site-packages (from tensorflow) (1.14.3) Requirement already satisfied: six>=1.10.0 in c:\users\admin\anaconda3\lib\site-packages (from tensorflow) (1.11.0) Requirement already satisfied: setuptools<=39.1.0 in c:\users\admin\anaconda3\lib\site-packages (from tensorflow) (39.1.0) Collecting termcolor>=1.1.0 (from tensorflow) Downloading https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz Requirement already satisfied: werkzeug>=0.11.10 in c:\users\admin\anaconda3\lib\site-packages (from tensorboard<1.10.0,>=1.9.0->tensorflow) (0.14.1) Collecting markdown>=2.6.8 (from tensorboard<1.10.0,>=1.9.0->tensorflow) Downloading https://files.pythonhosted.org/packages/6d/7d/488b90f470b96531a3f5788cf12a93332f543dbab13c423a5e7ce96a0493/Markdown-2.6.11-py2.py3-none-any.whl (78kB) 100% |████████████████████████████████| 81kB 2.8MB/s Building wheels for collected packages: absl-py, gast, termcolor Running setup.py bdist_wheel for absl-py ... done Stored in directory: C:\Users\Admin\AppData\Local\pip\Cache\wheels\a0\f8\e9\1933dbb3447ea6ef57062fd5461cb118deb8c2ed074e8344bf Running setup.py bdist_wheel for gast ... done Stored in directory: C:\Users\Admin\AppData\Local\pip\Cache\wheels\9a\1f\0e\3cde98113222b853e98fc0a8e9924480a3e25f1b4008cedb4f Running setup.py bdist_wheel for termcolor ... done Stored in directory: C:\Users\Admin\AppData\Local\pip\Cache\wheels\7c\06\54\bc84598ba1daf8f970247f550b175aaaee85f68b4b0c5ab2c6 Successfully built absl-py gast termcolor distributed 1.21.8 requires msgpack, which is not installed. Installing collected packages: protobuf, markdown, tensorboard, grpcio, absl-py, astor, gast, termcolor, tensorflow Successfully installed absl-py-0.2.2 astor-0.7.1 gast-0.2.0 grpcio-1.13.0 markdown-2.6.11 protobuf-3.6.0 tensorboard-1.9.0 tensorflow-1.9.0 termcolor-1.1.0 | cs |
[에러] ModuleNotFoundError: No module named 'pymysql' (4) | 2018.07.03 |
---|---|
[에러] ModuleNotFoundError: No module named 'bcolz' (0) | 2018.07.02 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | >>> import matplotlib.pyplot as plt Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 115, in <module> _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup() File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/__init__.py", line 62, in pylab_setup [backend_name], 0) File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_tkagg.py", line 4, in <module> from . import tkagg # Paint image to Tk photo blitter extension. File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/tkagg.py", line 5, in <module> from six.moves import tkinter as Tk File "/usr/lib/python2.7/dist-packages/six.py", line 203, in load_module mod = mod._resolve() File "/usr/lib/python2.7/dist-packages/six.py", line 115, in _resolve return _import_module(self.mod) File "/usr/lib/python2.7/dist-packages/six.py", line 82, in _import_module __import__(name) File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 42, in <module> raise ImportError, str(msg) + ', please install the python-tk package' ImportError: No module named _tkinter, please install the python-tk package | cs |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | $ sudo apt-get -y install vsftpd Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: vsftpd 0 upgraded, 1 newly installed, 0 to remove and 13 not upgraded. Need to get 115 kB of archives. After this operation, 336 kB of additional disk space will be used. Get:1 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 vsftpd amd64 3.0.3-3 ubuntu2 [115 kB] Fetched 115 kB in 0s (301 kB/s) Preconfiguring packages ... Selecting previously unselected package vsftpd. (Reading database ... 198798 files and directories currently installed.) Preparing to unpack .../vsftpd_3.0.3-3ubuntu2_amd64.deb ... Unpacking vsftpd (3.0.3-3ubuntu2) ... Processing triggers for systemd (229-4ubuntu21.2) ... Processing triggers for ureadahead (0.100.0-19) ... Processing triggers for man-db (2.7.5-1) ... Setting up vsftpd (3.0.3-3ubuntu2) ... Processing triggers for systemd (229-4ubuntu21.2) ... Processing triggers for ureadahead (0.100.0-19) ... rabbit@rabbit-virtual-machine:~$ sudo service vsftpd start rabbit@rabbit-virtual-machine:~$ vi /etc/vsftpd.conf rabbit@rabbit-virtual-machine:~$ sudo vi /etc/vsftpd.conf rabbit@rabbit-virtual-machine:~$ sudo vi /etc/vsftpd.conf rabbit@rabbit-virtual-machine:~$ sudo service vsftpd restart rabbit@rabbit-virtual-machine:~$ sudo apt-get -y install python-tk Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: blt tk8.6-blt2.5 Suggested packages: blt-demo tix python-tk-dbg The following NEW packages will be installed: blt python-tk tk8.6-blt2.5 0 upgraded, 3 newly installed, 0 to remove and 13 not upgraded. Need to get 605 kB of archives. After this operation, 2,123 kB of additional disk space will be used. Get:1 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 tk8.6-blt2.5 amd64 2 .5.3+dfsg-3 [574 kB] Get:2 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 blt amd64 2.5.3+dfsg -3 [4,852 B] Get:3 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python-tk am d64 2.7.12-1~16.04 [26.3 kB] Fetched 605 kB in 0s (1,895 kB/s) Selecting previously unselected package tk8.6-blt2.5. (Reading database ... 198855 files and directories currently installed.) Preparing to unpack .../tk8.6-blt2.5_2.5.3+dfsg-3_amd64.deb ... Unpacking tk8.6-blt2.5 (2.5.3+dfsg-3) ... Selecting previously unselected package blt. Preparing to unpack .../blt_2.5.3+dfsg-3_amd64.deb ... Unpacking blt (2.5.3+dfsg-3) ... Selecting previously unselected package python-tk. Preparing to unpack .../python-tk_2.7.12-1~16.04_amd64.deb ... Unpacking python-tk (2.7.12-1~16.04) ... Processing triggers for libc-bin (2.23-0ubuntu10) ... Setting up tk8.6-blt2.5 (2.5.3+dfsg-3) ... Setting up blt (2.5.3+dfsg-3) ... Setting up python-tk (2.7.12-1~16.04) ... Processing triggers for libc-bin (2.23-0ubuntu10) ... | cs |
설치 후 다시 임포트를 진행합니다.
1 2 3 | >>> import matplotlib.pyplot as plt >>> | cs |
[에러] 'module' object has no attribute 'merge_all_summaries' (0) | 2018.07.19 |
---|---|
[에러] 'module' object has no attribute 'mul' (0) | 2018.07.19 |
tensorflow 라이브러리 사용 시 다음과 같은 에러 발생 시
1
2
3
4
5
6
7
8
9
10 |
>>> with tf.Session() as session:
... merged = tf.merge_all_summaries()
... writer = tf.train.SummaryWriter("/tmp/tensorflowlogs",session.graph)
... session.run(model)
... print(session.run(y))
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
AttributeError: 'module' object has no attribute 'merge_all_summaries'
|
cs |
해당 속성이 없으므로 사용할 수 없다는 에러인데 TF 버전에 따라 해당 API 및 일부 API가 변경되었기 때문에 다음과 같이 사용합니다.
: tf.audio_summary -> tf.summary.audio[에러] No module named _tkinter, please install the python-tk package (0) | 2018.07.19 |
---|---|
[에러] 'module' object has no attribute 'mul' (0) | 2018.07.19 |
tensorflow 라이브러리 사용 시 다음과 같은 에러 발생 시
1 2 3 4 5 | >>> y = tf.mul(a, b) Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'mul' | cs |
해당 속성이 없으므로 사용할 수 없다는 에러인데 TF 버전에 따라 해당 API 및 일부 API가 변경되었기 때문에 다음과 같이 사용합니다.
: tf.mul -> tf.multiply
: tf.sub -> tf.subtract
: tf.neg -> tf.negative
[에러] No module named _tkinter, please install the python-tk package (0) | 2018.07.19 |
---|---|
[에러] 'module' object has no attribute 'merge_all_summaries' (0) | 2018.07.19 |
Ubuntu
Python 2.x
1.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | $ sudo apt-get install -y python-pip python-dev python-virtualenv Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libexpat1-dev libpython-all-dev libpython-dev libpython2.7-dev python-all python-all-dev python-pip-whl python-setuptools python-wheel python2.7-dev python3-virtualenv virtualenv Suggested packages: python-setuptools-doc The following NEW packages will be installed: libexpat1-dev libpython-all-dev libpython-dev libpython2.7-dev python-all python-all-dev python-dev python-pip python-pip-whl python-setuptools python-virtualenv python-wheel python2.7-dev python3-virtualenv virtualenv 0 upgraded, 15 newly installed, 0 to remove and 9 not upgraded. Need to get 29.8 MB of archives. After this operation, 45.0 MB of additional disk space will be used. Get:1 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libexpat1-dev amd64 2.1.0-7ubuntu0.16.04.3 [115 kB] Get:2 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7-dev amd64 2.7.12-1ubuntu0~16.04.3 [27.8 MB] Get:3 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython-dev amd64 2.7.12-1~16.04 [7,840 B] Get:4 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython-all-dev amd64 2.7.12-1~16.04 [1,006 B] Get:5 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python-all amd64 2.7.12-1~16.04 [996 B] Get:6 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python2.7-dev amd64 2.7.12-1ubuntu0~16.04.3 [276 kB] Get:7 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python-dev amd64 2.7.12-1~16.04 [1,186 B] Get:8 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python-all-dev amd64 2.7.12-1~16.04 [1,016 B] Get:9 http://kr.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 python-pip-whl all 8.1.1-2ubuntu0.4 [1,110 kB] Get:10 http://kr.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 python-pip all 8.1.1-2ubuntu0.4 [144 kB] Get:11 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 python-setuptools all 20.7.0-1 [169 kB] Get:12 http://kr.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 python-virtualenv all 15.0.1+ds-3ubuntu1 [46.6 kB] Get:13 http://kr.archive.ubuntu.com/ubuntu xenial/universe amd64 python-wheel all 0.29.0-1 [48.0 kB] Get:14 http://kr.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 python3-virtualenv all 15.0.1+ds-3ubuntu1 [43.2 kB] Get:15 http://kr.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 virtualenv all 15.0.1+ds-3ubuntu1 [4,342 B] Fetched 29.8 MB in 4s (7,364 kB/s) Selecting previously unselected package libexpat1-dev:amd64. (Reading database ... 198182 files and directories currently installed.) Preparing to unpack .../libexpat1-dev_2.1.0-7ubuntu0.16.04.3_amd64.deb ... Unpacking libexpat1-dev:amd64 (2.1.0-7ubuntu0.16.04.3) ... Selecting previously unselected package libpython2.7-dev:amd64. Preparing to unpack .../libpython2.7-dev_2.7.12-1ubuntu0~16.04.3_amd64.deb ... Unpacking libpython2.7-dev:amd64 (2.7.12-1ubuntu0~16.04.3) ... Selecting previously unselected package libpython-dev:amd64. Preparing to unpack .../libpython-dev_2.7.12-1~16.04_amd64.deb ... Unpacking libpython-dev:amd64 (2.7.12-1~16.04) ... Selecting previously unselected package libpython-all-dev:amd64. Preparing to unpack .../libpython-all-dev_2.7.12-1~16.04_amd64.deb ... Unpacking libpython-all-dev:amd64 (2.7.12-1~16.04) ... Selecting previously unselected package python-all. Preparing to unpack .../python-all_2.7.12-1~16.04_amd64.deb ... Unpacking python-all (2.7.12-1~16.04) ... Selecting previously unselected package python2.7-dev. Preparing to unpack .../python2.7-dev_2.7.12-1ubuntu0~16.04.3_amd64.deb ... Unpacking python2.7-dev (2.7.12-1ubuntu0~16.04.3) ... Selecting previously unselected package python-dev. Preparing to unpack .../python-dev_2.7.12-1~16.04_amd64.deb ... Unpacking python-dev (2.7.12-1~16.04) ... Selecting previously unselected package python-all-dev. Preparing to unpack .../python-all-dev_2.7.12-1~16.04_amd64.deb ... Unpacking python-all-dev (2.7.12-1~16.04) ... Selecting previously unselected package python-pip-whl. Preparing to unpack .../python-pip-whl_8.1.1-2ubuntu0.4_all.deb ... Unpacking python-pip-whl (8.1.1-2ubuntu0.4) ... Selecting previously unselected package python-pip. Preparing to unpack .../python-pip_8.1.1-2ubuntu0.4_all.deb ... Unpacking python-pip (8.1.1-2ubuntu0.4) ... Selecting previously unselected package python-setuptools. Preparing to unpack .../python-setuptools_20.7.0-1_all.deb ... Unpacking python-setuptools (20.7.0-1) ... Selecting previously unselected package python-virtualenv. Preparing to unpack .../python-virtualenv_15.0.1+ds-3ubuntu1_all.deb ... Unpacking python-virtualenv (15.0.1+ds-3ubuntu1) ... Selecting previously unselected package python-wheel. Preparing to unpack .../python-wheel_0.29.0-1_all.deb ... Unpacking python-wheel (0.29.0-1) ... Selecting previously unselected package python3-virtualenv. Preparing to unpack .../python3-virtualenv_15.0.1+ds-3ubuntu1_all.deb ... Unpacking python3-virtualenv (15.0.1+ds-3ubuntu1) ... Selecting previously unselected package virtualenv. Preparing to unpack .../virtualenv_15.0.1+ds-3ubuntu1_all.deb ... Unpacking virtualenv (15.0.1+ds-3ubuntu1) ... Processing triggers for doc-base (0.10.7) ... Processing 1 added doc-base file... Processing triggers for man-db (2.7.5-1) ... Setting up libexpat1-dev:amd64 (2.1.0-7ubuntu0.16.04.3) ... Setting up libpython2.7-dev:amd64 (2.7.12-1ubuntu0~16.04.3) ... Setting up libpython-dev:amd64 (2.7.12-1~16.04) ... Setting up libpython-all-dev:amd64 (2.7.12-1~16.04) ... Setting up python-all (2.7.12-1~16.04) ... Setting up python2.7-dev (2.7.12-1ubuntu0~16.04.3) ... Setting up python-dev (2.7.12-1~16.04) ... Setting up python-all-dev (2.7.12-1~16.04) ... Setting up python-pip-whl (8.1.1-2ubuntu0.4) ... Setting up python-pip (8.1.1-2ubuntu0.4) ... Setting up python-setuptools (20.7.0-1) ... Setting up python-virtualenv (15.0.1+ds-3ubuntu1) ... Setting up python-wheel (0.29.0-1) ... Setting up python3-virtualenv (15.0.1+ds-3ubuntu1) ... Setting up virtualenv (15.0.1+ds-3ubuntu1) ... | cs |
2.
1 2 3 4 5 6 7 8 9 10 11 | $ sudo pip install -U pip The directory '/home/rabbit/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/home/rabbit/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Collecting pip Downloading https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl (1.3MB) 100% |████████████████████████████████| 1.3MB 796kB/s Installing collected packages: pip Found existing installation: pip 8.1.1 Not uninstalling pip at /usr/lib/python2.7/dist-packages, outside environment /usr Successfully installed pip-10.0.1 | cs |
3.
1 2 | $ mkdir ~/tensorflow | cs |
4.
1 2 3 4 5 6 | $ virtualenv --system-site-packages ~/tensorflow Running virtualenv with interpreter /usr/bin/python2 New python executable in /home/rabbit/tensorflow/bin/python2 Also creating executable in /home/rabbit/tensorflow/bin/python Installing setuptools, pkg_resources, pip, wheel...done. | cs |
5.
1 2 | $ source ~/tensorflow/bin/activate | cs |
6.
1 2 3 | (tensorflow) rabbit@rabbit-virtual-machine:~$ pip install -U pip Requirement already up-to-date: pip in ./tensorflow/lib/python2.7/site-packages (10.0.1) | cs |
7.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | $ pip install -U tensorflow Collecting tensorflow Downloading https://files.pythonhosted.org/packages/37/ff/97d4542f805ae25bf4b65b6263515584c78bd9a6111ed78ea971eff2946a/tensorflow-1.9.0-cp27-cp27mu-manylinux1_x86_64.whl (51.2MB) 100% |████████████████████████████████| 51.2MB 168kB/s Collecting setuptools<=39.1.0 (from tensorflow) Downloading https://files.pythonhosted.org/packages/8c/10/79282747f9169f21c053c562a0baa21815a8c7879be97abd930dbcf862e8/setuptools-39.1.0-py2.py3-none-any.whl (566kB) 100% |████████████████████████████████| 573kB 15.8MB/s Collecting astor>=0.6.0 (from tensorflow) Downloading https://files.pythonhosted.org/packages/35/6b/11530768cac581a12952a2aad00e1526b89d242d0b9f59534ef6e6a1752f/astor-0.7.1-py2.py3-none-any.whl Collecting protobuf>=3.4.0 (from tensorflow) Downloading https://files.pythonhosted.org/packages/27/e7/bf96130ebe633b08a3913da4bb25e50dac5779f1f68e51c99485423f7443/protobuf-3.6.0-cp27-cp27mu-manylinux1_x86_64.whl (7.1MB) 100% |████████████████████████████████| 7.1MB 4.7MB/s Collecting gast>=0.2.0 (from tensorflow) Downloading https://files.pythonhosted.org/packages/5c/78/ff794fcae2ce8aa6323e789d1f8b3b7765f601e7702726f430e814822b96/gast-0.2.0.tar.gz Collecting enum34>=1.1.6 (from tensorflow) Downloading https://files.pythonhosted.org/packages/c5/db/e56e6b4bbac7c4a06de1c50de6fe1ef3810018ae11732a50f15f62c7d050/enum34-1.1.6-py2-none-any.whl Requirement not upgraded as not directly required: six>=1.10.0 in /usr/lib/python2.7/dist-packages (from tensorflow) (1.10.0) Requirement not upgraded as not directly required: wheel in ./tensorflow/lib/python2.7/site-packages (from tensorflow) (0.31.1) Collecting absl-py>=0.1.6 (from tensorflow) Downloading https://files.pythonhosted.org/packages/57/8d/6664518f9b6ced0aa41cf50b989740909261d4c212557400c48e5cda0804/absl-py-0.2.2.tar.gz (82kB) 100% |████████████████████████████████| 92kB 17.3MB/s Collecting backports.weakref>=1.0rc1 (from tensorflow) Downloading https://files.pythonhosted.org/packages/88/ec/f598b633c3d5ffe267aaada57d961c94fdfa183c5c3ebda2b6d151943db6/backports.weakref-1.0.post1-py2.py3-none-any.whl Collecting tensorboard<1.10.0,>=1.9.0 (from tensorflow) Downloading https://files.pythonhosted.org/packages/d5/98/e2e9d5afbc86cef0b2dd0f4ab791519b9bd305ea207e1e5c2f9a9f2f6da6/tensorboard-1.9.0-py2-none-any.whl (3.3MB) 100% |████████████████████████████████| 3.3MB 7.3MB/s Collecting termcolor>=1.1.0 (from tensorflow) Downloading https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz Collecting numpy>=1.13.3 (from tensorflow) Downloading https://files.pythonhosted.org/packages/6a/a9/c01a2d5f7b045f508c8cefef3b079fe8c413d05498ca0ae877cffa230564/numpy-1.14.5-cp27-cp27mu-manylinux1_x86_64.whl (12.1MB) 100% |████████████████████████████████| 12.1MB 2.5MB/s Collecting grpcio>=1.8.6 (from tensorflow) Downloading https://files.pythonhosted.org/packages/fa/53/685b9d68e5734cf8e2d13b2d4d29e6cede94714b665019a5627a623b3e21/grpcio-1.13.0-cp27-cp27mu-manylinux1_x86_64.whl (9.0MB) 100% |████████████████████████████████| 9.0MB 2.3MB/s Collecting mock>=2.0.0 (from tensorflow) Downloading https://files.pythonhosted.org/packages/e6/35/f187bdf23be87092bd0f1200d43d23076cee4d0dec109f195173fd3ebc79/mock-2.0.0-py2.py3-none-any.whl (56kB) 100% |████████████████████████████████| 61kB 13.5MB/s Collecting werkzeug>=0.11.10 (from tensorboard<1.10.0,>=1.9.0->tensorflow) Downloading https://files.pythonhosted.org/packages/20/c4/12e3e56473e52375aa29c4764e70d1b8f3efa6682bef8d0aae04fe335243/Werkzeug-0.14.1-py2.py3-none-any.whl (322kB) 100% |████████████████████████████████| 327kB 10.1MB/s Collecting futures>=3.1.1; python_version < "3" (from tensorboard<1.10.0,>=1.9.0->tensorflow) Downloading https://files.pythonhosted.org/packages/2d/99/b2c4e9d5a30f6471e410a146232b4118e697fa3ffc06d6a65efde84debd0/futures-3.2.0-py2-none-any.whl Collecting markdown>=2.6.8 (from tensorboard<1.10.0,>=1.9.0->tensorflow) Downloading https://files.pythonhosted.org/packages/6d/7d/488b90f470b96531a3f5788cf12a93332f543dbab13c423a5e7ce96a0493/Markdown-2.6.11-py2.py3-none-any.whl (78kB) 100% |████████████████████████████████| 81kB 7.5MB/s Collecting pbr>=0.11 (from mock>=2.0.0->tensorflow) Downloading https://files.pythonhosted.org/packages/ae/d6/2ab389a3bf5fffd03069dacaddb0cdd531594abab5119f308527c0df53e6/pbr-4.1.0-py2.py3-none-any.whl (98kB) 100% |████████████████████████████████| 102kB 15.4MB/s Collecting funcsigs>=1; python_version < "3.3" (from mock>=2.0.0->tensorflow) Downloading https://files.pythonhosted.org/packages/69/cb/f5be453359271714c01b9bd06126eaf2e368f1fddfff30818754b5ac2328/funcsigs-1.0.2-py2.py3-none-any.whl Building wheels for collected packages: gast, absl-py, termcolor Running setup.py bdist_wheel for gast ... done Stored in directory: /home/rabbit/.cache/pip/wheels/9a/1f/0e/3cde98113222b853e98fc0a8e9924480a3e25f1b4008cedb4f Running setup.py bdist_wheel for absl-py ... done Stored in directory: /home/rabbit/.cache/pip/wheels/a0/f8/e9/1933dbb3447ea6ef57062fd5461cb118deb8c2ed074e8344bf Running setup.py bdist_wheel for termcolor ... done Stored in directory: /home/rabbit/.cache/pip/wheels/7c/06/54/bc84598ba1daf8f970247f550b175aaaee85f68b4b0c5ab2c6 Successfully built gast absl-py termcolor Installing collected packages: setuptools, astor, protobuf, gast, enum34, absl-py, backports.weakref, werkzeug, futures, markdown, numpy, tensorboard, termcolor, grpcio, pbr, funcsigs, mock, tensorflow Found existing installation: setuptools 40.0.0 Uninstalling setuptools-40.0.0: Successfully uninstalled setuptools-40.0.0 Found existing installation: enum34 1.1.2 Not uninstalling enum34 at /usr/lib/python2.7/dist-packages, outside environment /home/rabbit/tensorflow Can't uninstall 'enum34'. No files were found to uninstall. Successfully installed absl-py-0.2.2 astor-0.7.1 backports.weakref-1.0.post1 enum34-1.1.6 funcsigs-1.0.2 futures-3.2.0 gast-0.2.0 grpcio-1.13.0 markdown-2.6.11 mock-2.0.0 numpy-1.14.5 pbr-4.1.0 protobuf-3.6.0 setuptools-39.1.0 tensorboard-1.9.0 tensorflow-1.9.0 termcolor-1.1.0 werkzeug-0.14.1 | cs |
텐서플로우 동작 확인
8.
1 2 3 4 5 6 | (tensorflow) rabbit@rabbit-virtual-machine:~$ python Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> | cs |
9.
1 2 3 4 5 6 7 | >>> import tensorflow as tf >>> hello = tf.constant("hello TensorFlow!") >>> sess = tf.Session() 2018-07-18 15:35:43.209250: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA >>> print(sess.run(hello)) hello TensorFlow! | cs |
ubuntu 18.04 고정 IP 설정 (0) | 2018.10.03 |
---|---|
ubuntu 16.04 mysql 설치 (0) | 2018.07.02 |
ubuntu mongo db 설치 (0) | 2018.06.18 |
Kali Linux 고정 IP 설정하기 (0) | 2018.06.12 |
CentOS7 고정 IP 설정 (0) | 2018.06.01 |
오픈소스 도구를 활용한 웹 모의해킹과 침해대응 (0) | 2018.07.24 |
---|---|
인생은 뜨겁게 버트런드 러셀 자서전 (0) | 2018.07.22 |
프로그래밍 면접 이렇게 준비한다 (0) | 2018.07.03 |
인생단어 변화를 이끄는 긍정적인 사람의 한 마디 (0) | 2018.07.01 |
파이썬으로 배우는 데이터 과학 입문과 실습 소규모 데이터셋 처리부터 빅데이터 처리, 머신러닝, 시각화까지 (0) | 2018.06.28 |
1. https://www.elastic.co/kr/downloads/elasticsearch
2. 압축 해제 후
3. 해당 폴더의 빈 공간에 "Shift + 우클릭"하여 "여기서 명령 창 열기" 혹은 "여기에 PowerShell 창 열기"를 선택합니다.
4.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | PS C:\elasticsearch-6.3.0\elasticsearch-6.3.0\bin> .\elasticsearch [2018-07-05T13:09:33,162][INFO ][o.e.n.Node ] [] initializing ... [2018-07-05T13:09:33,232][INFO ][o.e.e.NodeEnvironment ] [_dQxEAG] using [1] data paths, mounts [[(C:)]], net usable_space [463.2gb], net total_space [930.1gb], types [NTFS] [2018-07-05T13:09:33,232][INFO ][o.e.e.NodeEnvironment ] [_dQxEAG] heap size [989.8mb], compressed ordinary object pointers [true] [2018-07-05T13:09:33,238][INFO ][o.e.n.Node ] [_dQxEAG] node name derived from node ID [_dQxEAGURO6gbD4nbCYUVA]; set [node.name] to override [2018-07-05T13:09:33,238][INFO ][o.e.n.Node ] [_dQxEAG] version[6.3.0], pid[7084], build[default/zip/424e937/2018-06-11T23:38:03.357887Z], OS[Windows 10/10.0/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_101/25.101-b13] [2018-07-05T13:09:33,239][INFO ][o.e.n.Node ] [_dQxEAG] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=C:\Users\Admin\AppData\Local\Temp\elasticsearch, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -XX:+PrintGCDetails, -XX:+PrintGCDateStamps, -XX:+PrintTenuringDistribution, -XX:+PrintGCApplicationStoppedTime, -Xloggc:logs/gc.log, -XX:+UseGCLogFileRotation, -XX:NumberOfGCLogFiles=32, -XX:GCLogFileSize=64m, -Delasticsearch, -Des.path.home=C:\elasticsearch-6.3.0\elasticsearch-6.3.0, -Des.path.conf=C:\elasticsearch-6.3.0\elasticsearch-6.3.0\config, -Des.distribution.flavor=default, -Des.distribution.type=zip] [2018-07-05T13:09:35,533][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [aggs-matrix-stats] [2018-07-05T13:09:35,534][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [analysis-common] [2018-07-05T13:09:35,534][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [ingest-common] [2018-07-05T13:09:35,534][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [lang-expression] [2018-07-05T13:09:35,534][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [lang-mustache] [2018-07-05T13:09:35,535][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [lang-painless] [2018-07-05T13:09:35,535][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [mapper-extras] [2018-07-05T13:09:35,535][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [parent-join] [2018-07-05T13:09:35,535][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [percolator] [2018-07-05T13:09:35,535][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [rank-eval] [2018-07-05T13:09:35,536][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [reindex] [2018-07-05T13:09:35,536][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [repository-url] [2018-07-05T13:09:35,536][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [transport-netty4] [2018-07-05T13:09:35,536][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [tribe] [2018-07-05T13:09:35,536][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [x-pack-core] [2018-07-05T13:09:35,538][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [x-pack-deprecation] [2018-07-05T13:09:35,539][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [x-pack-graph] [2018-07-05T13:09:35,540][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [x-pack-logstash] [2018-07-05T13:09:35,541][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [x-pack-ml] [2018-07-05T13:09:35,542][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [x-pack-monitoring] [2018-07-05T13:09:35,543][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [x-pack-rollup] [2018-07-05T13:09:35,549][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [x-pack-security] [2018-07-05T13:09:35,550][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [x-pack-sql] [2018-07-05T13:09:35,551][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [x-pack-upgrade] [2018-07-05T13:09:35,552][INFO ][o.e.p.PluginsService ] [_dQxEAG] loaded module [x-pack-watcher] [2018-07-05T13:09:35,553][INFO ][o.e.p.PluginsService ] [_dQxEAG] no plugins loaded [2018-07-05T13:09:39,882][INFO ][o.e.x.s.a.s.FileRolesStore] [_dQxEAG] parsed [0] roles from file [C:\elasticsearch-6.3.0\elasticsearch-6.3.0\config\roles.yml] [2018-07-05T13:09:40,439][INFO ][o.e.x.m.j.p.l.CppLogMessageHandler] [controller/22068] [Main.cc@109] controller (64 bit): Version 6.3.0 (Build 0f0a34c67965d7) Copyright (c) 2018 Elasticsearch BV [2018-07-05T13:09:40,739][DEBUG][o.e.a.ActionModule ] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security [2018-07-05T13:09:40,980][INFO ][o.e.d.DiscoveryModule ] [_dQxEAG] using discovery type [zen] [2018-07-05T13:09:41,726][INFO ][o.e.n.Node ] [_dQxEAG] initialized [2018-07-05T13:09:41,726][INFO ][o.e.n.Node ] [_dQxEAG] starting ... [2018-07-05T13:09:44,151][INFO ][o.e.t.TransportService ] [_dQxEAG] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}, {[::1]:9300} [2018-07-05T13:09:47,228][INFO ][o.e.c.s.MasterService ] [_dQxEAG] zen-disco-elected-as-master ([0] nodes joined)[, ], reason: new_master {_dQxEAG}{_dQxEAGURO6gbD4nbCYUVA}{NLBAt36xS-mMf0j_sKL9CA}{127.0.0.1}{127.0.0.1:9300}{ml.machine_memory=17087102976, xpack.installed=true, ml.max_open_jobs=20, ml.enabled=true} [2018-07-05T13:09:47,234][INFO ][o.e.c.s.ClusterApplierService] [_dQxEAG] new_master {_dQxEAG}{_dQxEAGURO6gbD4nbCYUVA}{NLBAt36xS-mMf0j_sKL9CA}{127.0.0.1}{127.0.0.1:9300}{ml.machine_memory=17087102976, xpack.installed=true, ml.max_open_jobs=20, ml.enabled=true}, reason: apply cluster state (from master [master {_dQxEAG}{_dQxEAGURO6gbD4nbCYUVA}{NLBAt36xS-mMf0j_sKL9CA}{127.0.0.1}{127.0.0.1:9300}{ml.machine_memory=17087102976, xpack.installed=true, ml.max_open_jobs=20, ml.enabled=true} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)[, ]]]) [2018-07-05T13:09:47,532][WARN ][o.e.x.s.a.s.m.NativeRoleMappingStore] [_dQxEAG] Failed to clear cache for realms [[]] [2018-07-05T13:09:47,560][INFO ][o.e.l.LicenseService ] [_dQxEAG] license [b37d9cae-d9d3-471e-b94a-dee571e45476] mode [basic] - valid [2018-07-05T13:09:47,582][INFO ][o.e.g.GatewayService ] [_dQxEAG] recovered [0] indices into cluster_state [2018-07-05T13:09:48,868][INFO ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [_dQxEAG] publish_address {127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}, {[::1]:9200} [2018-07-05T13:09:48,869][INFO ][o.e.n.Node ] [_dQxEAG] started | cs |
5. 확인
: http://localhost:9200
1.
2.
2-1.
2-2.
3.
4.
5.
6.
Yelp Data Analytics 실습 (0) | 2018.08.01 |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ModuleNotFoundError Traceback (most recent call last) <ipython-input-5-825f67b3e58c> in <module>() 5 password = 'python' 6 database = 'python' ----> 7 mc = create_engine("mysql+pymysql://" + user + ":" + password + "@192.168.0.21/" + database) 8 connection = mc.raw_connection() 9 cursor = connection.cursor() ~\Anaconda3\lib\site-packages\sqlalchemy\engine\__init__.py in create_engine(*args, **kwargs) 422 strategy = kwargs.pop('strategy', default_strategy) 423 strategy = strategies.strategies[strategy] --> 424 return strategy.create(*args, **kwargs) 425 426 ~\Anaconda3\lib\site-packages\sqlalchemy\engine\strategies.py in create(self, name_or_url, **kwargs) 79 if k in kwargs: 80 dbapi_args[k] = pop_kwarg(k) ---> 81 dbapi = dialect_cls.dbapi(**dbapi_args) 82 83 dialect_args['dbapi'] = dbapi ~\Anaconda3\lib\site-packages\sqlalchemy\dialects\mysql\pymysql.py in dbapi(cls) 60 @classmethod 61 def dbapi(cls): ---> 62 return __import__('pymysql') 63 64 if py3k: ModuleNotFoundError: No module named 'pymysql' | cs |
아나콘다 프롬프트를 실행시킨 후 다음과 같이 해당 모듈을 찾아서 설치를 진행합니다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | (base) C:\Users\Admin>conda install -c anaconda pymysql Solving environment: done ## Package Plan ## environment location: C:\Users\Admin\Anaconda3 added / updated specs: - pymysql The following packages will be downloaded: package | build ---------------------------|----------------- pymysql-0.9.1 | py36_0 139 KB anaconda The following NEW packages will be INSTALLED: pymysql: 0.9.1-py36_0 anaconda Proceed ([y]/n)? y Downloading and Extracting Packages pymysql-0.9.1 | 139 KB | ############################################################################## | 100% Preparing transaction: done Verifying transaction: done Executing transaction: done (base) C:\Users\Admin> | cs |
tensorflow 설치 (0) | 2018.07.19 |
---|---|
[에러] ModuleNotFoundError: No module named 'bcolz' (0) | 2018.07.02 |