pycharm manage.py tasks ImportError: No module named manage

pycharm manage.py tasks ImportError: No module named manage

在远程环境中尝试在 pycharm 中执行 "run manage.py Task..." 时出现以下错误:

ssh://vagrant@127.0.0.1:2222/home/vagrant/.virtualenvs/telmo/bin/python3.4 -u /home/vagrant/.pycharm_helpers/pycharm/django_manage.py migrate /home/alberick/Documents/tixif-projects/telmo-api/api
bash: line 0: cd: /home/alberick/Documents/tixif-projects/telmo-api/api: No such file or directory
Traceback (most recent call last):
  File "/home/vagrant/.pycharm_helpers/pycharm/django_manage.py", line 23, in <module>
    run_module(manage_file, None, '__main__', True)
  File "/usr/lib/python3.4/runpy.py", line 178, in run_module
    mod_name, mod_spec, code = _get_module_details(mod_name)
  File "/usr/lib/python3.4/runpy.py", line 112, in _get_module_details
    raise ImportError("No module named %s" % mod_name)
ImportError: No module named manage

Process finished with exit code 1 

我在 "Run Django Console..." 上遇到了同样的问题,但我使用 "No module named manage" in PyCharm 解决了它。

我通过首先向 pycharm 添加一个新的部署服务器来解决这个问题。

只需进入工具/部署。

单击加号并配置新的 SFTP 连接。 然后单击映射并配置您的本地路径和部署服务器路径。

然后使用"deployment configuration"

将远程解释器添加到pycharm

在此之后 "run django console" 和 "run manage.py Task" 开始为我远程工作。