質問編集履歴
2
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -77,4 +77,130 @@
|
|
77
77
|
six==1.11.0
|
78
78
|
typed-ast==1.1.0
|
79
79
|
Werkzeug==0.14.1
|
80
|
-
wrapt==1.10.11
|
80
|
+
wrapt==1.10.11
|
81
|
+
|
82
|
+
---
|
83
|
+
#追記①
|
84
|
+
|
85
|
+
VSCode のターミナル(Bash)で実行
|
86
|
+
```Bash
|
87
|
+
$ powershell
|
88
|
+
Windows PowerShell
|
89
|
+
Copyright (C) Microsoft Corporation. All rights reserved.
|
90
|
+
|
91
|
+
[PS](*'-')<D:\DevNotes\ProjectFolder> .env/Scripts/Activate
|
92
|
+
(.env) [PS](*'-')<D:\DevNotes\ProjectFolder> pip list
|
93
|
+
Package Version
|
94
|
+
----------------- -------
|
95
|
+
astroid 2.0.4
|
96
|
+
Click 7.0
|
97
|
+
colorama 0.3.9
|
98
|
+
Flask 1.0.2
|
99
|
+
isort 4.3.4
|
100
|
+
itsdangerous 0.24
|
101
|
+
Jinja2 2.10
|
102
|
+
lazy-object-proxy 1.3.1
|
103
|
+
MarkupSafe 1.0
|
104
|
+
mccabe 0.6.1
|
105
|
+
pip 18.1
|
106
|
+
pylint 2.1.1
|
107
|
+
python-dotenv 0.9.1
|
108
|
+
rope 0.11.0
|
109
|
+
setuptools 40.4.3
|
110
|
+
six 1.11.0
|
111
|
+
typed-ast 1.1.0
|
112
|
+
Werkzeug 0.14.1
|
113
|
+
wheel 0.32.1
|
114
|
+
wrapt 1.10.11
|
115
|
+
(.env) [PS](*'-')<D:\DevNotes\ProjectFolder> pip show python-dotenv
|
116
|
+
Name: python-dotenv
|
117
|
+
Version: 0.9.1
|
118
|
+
Summary: Add .env support to your django/flask apps in development and deployments
|
119
|
+
Home-page: http://github.com/theskumar/python-dotenv
|
120
|
+
Author: Saurabh Kumar
|
121
|
+
Author-email: me+github@saurabh-kumar.com
|
122
|
+
License: UNKNOWN
|
123
|
+
Location: d:\devnotes\ProjectFolder.env\lib\site-packages
|
124
|
+
Requires:
|
125
|
+
Required-by:
|
126
|
+
(.env) [PS](*'-')<D:\DevNotes\ProjectFolder>
|
127
|
+
|
128
|
+
## インタープリタをPython3.6.6(virtualenv)
|
129
|
+
## デバッグをPython:Flask で実行
|
130
|
+
|
131
|
+
Traceback (most recent call last):
|
132
|
+
File "c:\program files (x86)\microsoft visual studio\shared\python36_64\Lib\runpy.py", line 193, in _run_module_as_main
|
133
|
+
"__main__", mod_spec)
|
134
|
+
File "c:\program files (x86)\microsoft visual studio\shared\python36_64\Lib\runpy.py", line 85, in _run_code
|
135
|
+
exec(code, run_globals)
|
136
|
+
File "c:\Users\defau.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd\ptvsd\__main__.py", line 211, in <module>
|
137
|
+
singlesession=args.single_session)
|
138
|
+
File "c:\Users\defau.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd\ptvsd\__main__.py", line 205, in main
|
139
|
+
debug_main(addr, name, kind, *extra, **kwargs)
|
140
|
+
File "c:\Users\defau.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd\ptvsd\_local.py", line 28, in debug_main
|
141
|
+
run_module(address, name, *extra, **kwargs)
|
142
|
+
File "c:\Users\defau.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd\ptvsd\_local.py", line 53, in run_module
|
143
|
+
run(argv, addr, **kwargs)
|
144
|
+
File "c:\Users\defau.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd\ptvsd\_local.py", line 125, in _run
|
145
|
+
_pydevd.main()
|
146
|
+
File "c:\Users\defau.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd\ptvsd\_vendored\pydevd\pydevd.py", line 1752, in main
|
147
|
+
globals = debugger.run(setup['file'], None, None, is_module)
|
148
|
+
File "c:\Users\defau.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd\ptvsd\_vendored\pydevd\pydevd.py", line 1099, in run
|
149
|
+
return self._exec(is_module, entry_point_fn, module_name, file, globals, locals)
|
150
|
+
File "c:\Users\defau.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd\ptvsd\_vendored\pydevd\pydevd.py", line 1123, in _exec
|
151
|
+
runpy._run_module_as_main(module_name, alter_argv=False)
|
152
|
+
File "c:\program files (x86)\microsoft visual studio\shared\python36_64\Lib\runpy.py", line 193, in _run_module_as_main
|
153
|
+
"__main__", mod_spec)
|
154
|
+
File "c:\program files (x86)\microsoft visual studio\shared\python36_64\Lib\runpy.py", line 85, in _run_code
|
155
|
+
exec(code, run_globals)
|
156
|
+
File "D:\DevNotes\ProjectFolder.env\lib\site-packages\flask\__main__.py", line 14, in <module>
|
157
|
+
main(as_module=True)
|
158
|
+
File "D:\DevNotes\ProjectFolder.env\lib\site-packages\flask\cli.py", line 894, in main
|
159
|
+
cli.main(args=args, prog_name=name)
|
160
|
+
File "D:\DevNotes\ProjectFolder.env\lib\site-packages\flask\cli.py", line 548, in main
|
161
|
+
load_dotenv()
|
162
|
+
File "D:\DevNotes\ProjectFolder.env\lib\site-packages\flask\cli.py", line 608, in load_dotenv
|
163
|
+
dotenv.load_dotenv(path)
|
164
|
+
File "D:\DevNotes\ProjectFolder.env\lib\site-packages\dotenv\main.py", line 255, in load_dotenv
|
165
|
+
return DotEnv(f, verbose=verbose).set_as_environment_variables(override=override)
|
166
|
+
File "D:\DevNotes\ProjectFolder.env\lib\site-packages\dotenv\main.py", line 95, in set_as_environment_variables
|
167
|
+
for k, v in self.dict().items():
|
168
|
+
File "D:\DevNotes\ProjectFolder.env\lib\site-packages\dotenv\main.py", line 74, in dict
|
169
|
+
values = OrderedDict(self.parse())
|
170
|
+
File "D:\DevNotes\ProjectFolder.env\lib\site-packages\dotenv\main.py", line 79, in parse
|
171
|
+
f = self._get_stream()
|
172
|
+
File "D:\DevNotes\ProjectFolder.env\lib\site-packages\dotenv\main.py", line 62, in _get_stream
|
173
|
+
return io.open(self.dotenv_path)
|
174
|
+
PermissionError: [Errno 13] Permission denied: 'D:\DevNotes\ProjectFolder\.env'
|
175
|
+
|
176
|
+
```
|
177
|
+
|
178
|
+
次は仮想環境ではない、ローカルのpipです。
|
179
|
+
```bash
|
180
|
+
$ pip freeze
|
181
|
+
astroid==2.0.4
|
182
|
+
Click==7.0
|
183
|
+
colorama==0.3.9
|
184
|
+
cycler==0.10.0
|
185
|
+
future==0.16.0
|
186
|
+
isort==4.3.4
|
187
|
+
itsdangerous==0.24
|
188
|
+
Jinja2==2.10
|
189
|
+
kiwisolver==1.0.1
|
190
|
+
lazy-object-proxy==1.3.1
|
191
|
+
MarkupSafe==1.0
|
192
|
+
matplotlib==3.0.0
|
193
|
+
mccabe==0.6.1
|
194
|
+
numpy==1.15.2
|
195
|
+
pefile==2018.8.8
|
196
|
+
pylint==2.1.1
|
197
|
+
pyparsing==2.2.1
|
198
|
+
pypiwin32==223
|
199
|
+
python-dateutil==2.7.3
|
200
|
+
pywin32==223
|
201
|
+
six==1.11.0
|
202
|
+
typed-ast==1.1.0
|
203
|
+
virtualenv==16.0.0
|
204
|
+
Werkzeug==0.14.1
|
205
|
+
wrapt==1.10.11
|
206
|
+
```
|
1
試してみたことを追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -46,9 +46,11 @@
|
|
46
46
|
同じソースでpython-dotenvがあればエラー、なければエラーにならないこと。
|
47
47
|
|
48
48
|
.envディレクトリの権限がUserがフルコントロールであること。(右クリック→プロパティ→セキュリティ)
|
49
|
+
表示されているすべてのユーザーを一時的にフルコントロールにしてみましたがダメでした。
|
49
50
|
|
50
|
-
VisualStudioCodeからではなく、PowerShellを管理者実行しても権限エラーが出
|
51
|
+
VisualStudioCodeからではなく、PowerShellを管理者実行しても権限エラーが出た。
|
51
52
|
|
53
|
+
試しにプロジェクトの読取専用(一部)を外してみましたが、変わりませんでした。
|
52
54
|
|
53
55
|
### 補足情報(FW/ツールのバージョンなど)
|
54
56
|
|