文章目录
Ubuntu pycharm 安装与启动
PyCharm 对py文件添加默认头
打开PyCharm程序,根据菜单栏中按照如下进入设置:
File -> settings -> Editor -> File and Code Templates -> Python Script
找到Python Script选项,然后将一下内容添加进文本框即可:
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Time : ${DATE} ${TIME} # @Author : ${user} # @File : ${NAME}.py # @Version : ${VERSION} # @Software: ${PRODUCT_NAME} # @Description : 'This is ...'
安装keras特定版本
sudo pip3 install keras==2.2.4
查看是否安装好:
pip3 show keras
zhaodeng@ubuntu:~$ pip3 show keras Name: Keras Version: 2.2.4 Summary: Deep Learning for humans Home-page: https://github.com/keras-team/keras Author: Francois Chollet Author-email: License: MIT Location: /usr/local/lib/python3.5/dist-packages Requires: keras-preprocessing, keras-applications, h5py, pyyaml, numpy, scipy, six Required-by:
查看并安装其他包
numpy
查看:pip3 show numpy
安装情况:
zhaodeng@ubuntu:~$ pip show numpy Name: numpy Version: 1.17.4 Summary: NumPy is the fundamental package for array computing with Python. Home-page: https://www.numpy.org Author: Travis E. Oliphant et al. Author-email: None License: BSD Location: /usr/local/lib/python3.5/dist-packages Requires: Required-by: tensorflow, tensorflow-estimator, tensorboard, scipy, Keras, Keras-Preprocessing, Keras-Applications, h5py
argparse
查看:pip show argparse
安装:sudo pip3 install argparse
安装结果:
zhaodeng@ubuntu:~$ pip show argparse Name: argparse Version: 1.4.0 Summary: Python command-line parsing library Home-page: https://github.com/ThomasWaldmann/argparse/ Author: Thomas Waldmann Author-email: License: Python Software Foundation License Location: /usr/local/lib/python3.5/dist-packages Requires: Required-by:
pycryptodomex
查看:pip show pycryptodomex
安装:sudo pip3 install pycryptodomex
安装情况:
zhaodeng@ubuntu:~$ pip show pycryptodomex WARNING: Package(s) not found: pycryptodomex zhaodeng@ubuntu:~$ sudo pip3 install pycryptodomex WARNING: The directory '/home/zhaodeng/.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. WARNING: The directory '/home/zhaodeng/.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 pycryptodomex Downloading https://files.pythonhosted.org/packages/1e/c0/459bf69d3907ecd280d465e31140dc858aaa7d1a599c/pycryptodomex-3.9.4-cp35-cp35m-manylinux1_x86_64.whl (9.7MB) |████████████████████████████████| 9.7MB 40kB/s Installing collected packages: pycryptodomex Successfully installed pycryptodomex-3.9.4 zhaodeng@ubuntu:~$ pip show pycryptodomex Name: pycryptodomex Version: 3.9.4 Summary: Cryptographic library for Python Home-page: https://www.pycryptodome.org Author: Helder Eijs Author-email: License: BSD, Public Domain, Apache Location: /usr/local/lib/python3.5/dist-packages Requires: Required-by:
matplotlib
查看:pip show matplotlib
安装:sudo pip3 install matplotlib
安装情况:
zhaodeng@ubuntu:~$ pip3 show matplotlib Name: matplotlib Version: 3.0.3 Summary: Python plotting package Home-page: http://matplotlib.org Author: John D. Hunter, Michael Droettboom Author-email: License: PSF Location: /usr/local/lib/python3.5/dist-packages Requires: pyparsing, python-dateutil, numpy, kiwisolver, cycler Required-by:
pysoundfile
查看:pip show pysoundfile
安装:sudo pip3 install pysoundfile
安装情况:
zhaodeng@ubuntu:~$ pip3 show pysoundfile WARNING: Package(s) not found: pysoundfile zhaodeng@ubuntu:~$ sudo pip3 install pysoundfile [sudo] password for zhaodeng: WARNING: The directory '/home/zhaodeng/.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. WARNING: The directory '/home/zhaodeng/.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 pysoundfile Downloading https://files.pythonhosted.org/packages/2a/b3/0b871e5fd31b9a8e54b4eee705a1ca1ed2f081dc7cc1693/PySoundFile-0.9.0.post1-py2.py3-none-any.whl Collecting cffi>=0.6 Downloading https://files.pythonhosted.org/packages/a8/8d/986e0c4e2aa3b24db56a0affc50d1ae3c4da45d51d549dc2697d53/cffi-1.13.2-cp35-cp35m-manylinux1_x86_64.whl (397kB) |████████████████████████████████| 399kB 27kB/s Collecting pycparser Downloading https://files.pythonhosted.org/packages/68/9e/aee219aead1290e00d1e7fdeabe83e1b9ab5585e6206a/pycparser-2.19.tar.gz (158kB) |████████████████████████████████| 163kB 39kB/s Building wheels for collected packages: pycparser Building wheel for pycparser (setup.py) ... done Created wheel for pycparser: filename=pycparser-2.19-py2.py3-none-any.whl size= sha256=8e2a7edce9a9783c31b50dfd83e9be0514a35738f1bad6 Stored in directory: /home/zhaodeng/.cache/pip/wheels/f2/9a/90/de94fddc9d9c8b271b0f63e57b26fb1d67a Successfully built pycparser Installing collected packages: pycparser, cffi, pysoundfile Successfully installed cffi-1.13.2 pycparser-2.19 pysoundfile-0.9.0.post1 zhaodeng@ubuntu:~$ pip3 show pysoundfile Name: PySoundFile Version: 0.9.0.post1 Summary: An audio library based on libsndfile, CFFI and NumPy Home-page: https://github.com/bastibe/PySoundFile Author: Bastian Bechtold Author-email: License: BSD 3-Clause License Location: /usr/local/lib/python3.5/dist-packages Requires: cffi Required-by:
python-Levenshtein
查看:pip show python-Levenshtein
安装:sudo pip3 install python-Levenshtein
安装情况:
zhaodeng@ubuntu:~$ pip3 show python-Levenshtein WARNING: Package(s) not found: python-Levenshtein zhaodeng@ubuntu:~$ sudo pip3 install python-Levenshtein [sudo] password for zhaodeng: WARNING: The directory '/home/zhaodeng/.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. WARNING: The directory '/home/zhaodeng/.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 python-Levenshtein Downloading https://files.pythonhosted.org/packages/42/a9/d1785c85ebf9b7dfacd08938dd028209c34a0ea3b1bcdbbd40a67d/python-Levenshtein-0.12.0.tar.gz (48kB) |████████████████████████████████| 51kB 5.4kB/s Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from python-Levenshtein) (20.7.0) Building wheels for collected packages: python-Levenshtein Building wheel for python-Levenshtein (setup.py) ... done Created wheel for python-Levenshtein: filename=python_Levenshtein-0.12.0-cp35-cp35m-linux_x86_64.whl size= sha256=1810f603ae00f4acfb568a8e9a0031befbf2776e9c9bf7796bd0753c4f Stored in directory: /home/zhaodeng/.cache/pip/wheels/de/c2/93/660fd5fad2dc6d81c4e39e9eeaf7e342 Successfully built python-Levenshtein Installing collected packages: python-Levenshtein Successfully installed python-Levenshtein-0.12.0 zhaodeng@ubuntu:~$ pip3 show python-Levenshtein Name: python-Levenshtein Version: 0.12.0 Summary: Python extension for computing string edit distances and similarities. Home-page: http://github.com/ztane/python-Levenshtein Author: Antti Haapala Author-email: License: GPL Location: /usr/local/lib/python3.5/dist-packages Requires: setuptools Required-by:
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/172997.html原文链接:https://javaforall.net
