如何让VirtualEnv TensorFlow在PyCharm中运行? [英] How to get VirtualEnv TensorFlow to work in PyCharm?
问题描述
所以我通过这里的主要响应将tensorflow安装到我的mac上: https://stackoverflow.com/a/33691154/6095482
So I installed tensorflow onto my mac through the main response from here: https://stackoverflow.com/a/33691154/6095482
这意味着我的张量流可以在virtualenv中运行。我可以通过我的终端运行它来进行脚本编写,但是想知道是否有任何方法可以将它移植到IDE上。我熟悉pycharm,但无法弄清楚路径路由和虚拟环境以便实现它。有没有人有任何关于从哪里拿这个以及哪个IDE会好的建议?
This means that my tensorflow works in a virtualenv. I can run it through my terminal for scripting purposes, but was wondering if there's any way to port that onto an IDE. I am familiar with pycharm, but couldn't figure out the path routing and virtual environments in order to get it going. Does anyone have any advice on where to take this and which IDE would be good?
谢谢!
推荐答案
您已经在 virtualenv
中安装了 tensorflow
,以下是如何使用PyCharm它:
You have installed tensorflow
in a virtualenv
, here's how to get PyCharm to use it:
-
首先,您要添加您创建的virtualenv并安装tensorflow,作为PyCharm中的解释器。请遵循PyCharm制造商的指南:添加现有虚拟环境
您将要从virtualenv
forlder中选择python
可执行文件,例如your_venv / bin / python
First you want to add that virtualenv you created and installed tensorflow in, as an interpreter in PyCharm. Please follow this guide from PyCharm makers: Adding Existing Virtual Environment You will want to select
python
executable from yourvirtualenv
forlder, e.g.your_venv/bin/python
作为解释器添加后,您要为项目选择它。以下是指南:选择Python解释器对于项目
Once added as an interpreter you want to select it for your project. Here's a guide: Selecting Python interpreter for a project
这篇关于如何让VirtualEnv TensorFlow在PyCharm中运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!