问题
So I installed tensorflow onto my mac through the main response from here: https://stackoverflow.com/a/33691154/6095482
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?
Thanks!
回答1:
You have installed tensorflow
in a virtualenv
, here's how to get PyCharm to use it:
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
Once added as an interpreter you want to select it for your project. Here's a guide: Selecting Python interpreter for a project
来源:https://stackoverflow.com/questions/37447906/how-to-get-virtualenv-tensorflow-to-work-in-pycharm