-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpython
More file actions
116 lines (94 loc) · 5.57 KB
/
python
File metadata and controls
116 lines (94 loc) · 5.57 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
install python3.6 on debian
https://www.rosehosting.com/blog/how-to-install-python-3-6-4-on-debian-9/
jpython 入门基础教程
http://www.runoob.com/python/python-tutorial.html
http://wiki.jikexueyuan.com/project/start-learning-python/
https://amaozhao.gitbooks.io/pandas-notebook/content/pandas%E4%B8%AD%E7%9A%84%E7%BB%98%E5%9B%BE%E5%87%BD%E6%95%B0.html
https://www.jelekinn.com/python-data-analysis-3-mac.html
Pandas 视频教程
https://pythonprogramming.net/
http://openbookproject.net/thinkcs/python/english2e/
http://openbookproject.net/thinkcs/python/english3e/
https://wiki.python.org/moin/BeginnersGuide/NonProgrammers
Pandas 使用问题跟踪
pip install matplotlib --upgrade --user
I dont get any error but my program fails saying
Traceback (most recent call last):
File "forest.py", line 22, in <module>
matplotlib.style.use('ggplot')
AttributeError: 'module' object has no attribute 'style'
when I try to upgrade matplotlib without --user I get following error
$ pip install matplotlib --upgrade
Collecting matplotlib
Using cached matplotlib-1.5.2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Requirement already up-to-date: cycler in /Users/vangapellisanthosh/Library/Python/2.7/lib/python/site-packages (from matplotlib)
Collecting pyparsing!=2.0.0,!=2.0.4,!=2.1.2,>=1.5.6 (from matplotlib)
Using cached pyparsing-2.1.8-py2.py3-none-any.whl
Collecting pytz (from matplotlib)
Using cached pytz-2016.6.1-py2.py3-none-any.whl
Collecting numpy>=1.6 (from matplotlib)
Using cached numpy-1.11.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting python-dateutil (from matplotlib)
Using cached python_dateutil-2.5.3-py2.py3-none-any.whl
Collecting six (from cycler->matplotlib)
Using cached six-1.10.0-py2.py3-none-any.whl
Installing collected packages: pyparsing, pytz, numpy, six, python-dateutil, matplotlib
Found existing installation: pyparsing 2.0.1
DEPRECATION: Uninstalling a distutils installed project (pyparsing) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling pyparsing-2.0.1:
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/commands/install.py", line 317, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_set.py", line 736, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_install.py", line 742, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
copy2(src, real_dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
copystat(src, dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/var/folders/7j/19zzrqpn5dl6ghw1pms6k2m80000gp
解决:sudo pip install matplotlib --upgrade --ignore-installed six
jupyter 安装错误
sudo pip install --upgrade ipython --ignore-installed six
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 209, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 317, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 732, in install
**kwargs
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 835, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 1030, in move_wheel_files
isolated=self.isolated,
File "/Library/Python/2.7/site-packages/pip/wheel.py", line 376, in move_wheel_files
clobber(source, dest, False, fixer=fixer, filter=filter)
File "/Library/Python/2.7/site-packages/pip/wheel.py", line 315, in clobber
ensure_dir(destdir)
File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
os.makedirs(path)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 1] Operation not permitted: '/System/Library/Frameworks/Python.framework/Versions/2.7/share'
解决方案:pip install ipython --user -U
使用jinja模版
https://realpython.com/blog/python/primer-on-jinja-templating/
virtualenvwrapper
https://virtualenvwrapper.readthedocs.io/en/latest/
python 编码规范
http://zh-google-styleguide.readthedocs.io/en/latest/google-python-styleguide/python_style_rules/