我试图通过Pycharm运行python文件,但是我收到了这个错误。
Cannot run program "/Users/aminialocal/Documents/project/marvin/m_env/bin/python" (in directory "/Users/aminialocal/Documents/project/marvin/agent_interface"): error=2, No such file or directory
我可以从终端完美运行代码。我已在配置中重置项目根目录,并检查了运行配置。但仍然得到同样的错误。有人可以帮我解决问题吗?我正在使用最新版本的Pycharm和osx。
这是配置文件:
# =========================
# CREATE PATHS
# =========================
root_folder = 'marvin'
current_directory = str(os.getcwd())
position = current_directory.find(root_folder)
if position == -1:
print "Could not find '" + root_folder + "' in current working
directory"
else:
start_dir = current_directory[:position]
ROOT_DIR = start_dir + root_folder
DUMP_DIR = ROOT_DIR + '/search_interface/data'
NODES_PICKLE = ROOT_DIR + '/search_interface/data/nodes_dump'
NODES_PICKLE_ACTIONS = ROOT_DIR + '/search_interface/data/nodes_dump_actions'
NODES_PICKLE_LEARNER = ROOT_DIR + '/search_interface/data/nodes_dump_learner'
CONTEXT_PICKLE = ROOT_DIR + '/search_interface/data/context_dump'
NODES_TREE_PICKLE = ROOT_DIR + '/search_interface/data/tree_model'
CONTEXT_FEATURE_PICKLE = ROOT_DIR + '/search_interface/data/context_features_dump'
MERGED_CONTEXT_SIMILARITY = ROOT_DIR + '/search_interface/data/merged_context_similarity'
word2vec_model_path = ROOT_DIR + '/sentence_similarity/cikm_training_model.txt'
PRIMARY_GOALS = ROOT_DIR + '/agent_interface/goals_files/primary_goals.json'
PRIMARY_GOALS_0 = ROOT_DIR + '/agent_interface/goals_files/primary_goals_exploitation.json'
PRIMARY_GOALS_1 = ROOT_DIR + '/agent_interface/goals_files/primary_goals_exploration.json'
MARVIN_GOALS = ROOT_DIR + '/agent_interface/goals_files/marvin_goals.json'
EXCEL_FILE = ROOT_DIR + '/guess_character_game/DisneyMoviesAndCharacters.xlsx'
MAP_CLUSTER_TO_NODE = ROOT_DIR + '/cluster_interface/cluster_data/clustermap_cluster_to_node'
MAP_NODE_TO_CLUSTER = ROOT_DIR + '/cluster_interface/cluster_data/clustermap_node_to_cluster'
最佳