次のように私はこの問題を解決:
- 行くために:
File -> Settings -> Project -> Project Interpreter -> Your docker interpreter -> Path mappings
。
- 行を追加:
{'Local path': 'C:', 'Remote path': '/c'}
(ドライブでドライブに置き換えてください;このインターピターをdifferenドライブのいくつかのプロジェクトに使用してからすべて追加してください)。
- 移動先:
Run -> Edit Configurations -> Your configuration -> Docker container settings -> '...' -> Volume bindings
;
- プロジェクトのバインディングで行を選択し(例:
{'Container path': '/opt/project', 'Host path': 'C:\Users\_username_\my_python_project'}
)、 '編集'を押します。
- プレス
OK -> Apply -> OK
。最初に 'OK'が変更されていない場合は、'Host path': 'C:\Users\_username_\my_python_project'
を'Host path': '/c/Users/_username_/my_python_project'
に置き換えてください。
- Pythonの設定を実行します。
について:
- 1607のWindows 10 [10.0.14393]
- PyCharm 2016年2月3日
- ビルド#PY-162.1967.10、9月7日に建てられ、2016
- JRE:1.8.0_102-b14 amd64
- JVM:Java HotSpot(TM)64ビット・サーバーVM、Oracle Corporation
なぜPyCharmはFile -> Settings -> Build, Execution, Deployment -> Docker -> VirtualBox shared folders
を無視するのですか?Run -> Edit Configurations
?