I was trying to use tensorflow in Pycharm IDE.
It seems that in Pycharm, it is one-click to install a package. It was very easy with bumpy. Now error occurs when I was trying to install tensorflow. Tensorflow was installed through terminal on Mac, as screenshot shows, using the command
sudo pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.8.0-py2-none-any.whl (Refer to https://www.tensorflow.org/versions/r0.8/get_started/os_setup.html#pip-installation) Any suggestions ? Thanks.
This is a working solution for me, first create a virtualenv from Pycharm and then install tensorflow there: In Pycharm, Preferences -> Project interpreter -> Create VirtualEnv -> give the virtualenv a name and location of your choice, and select "inherit global site-packages" option -> OK.
Click the Python Interpreter tab within your project tab. Click the small + symbol to add a new library to the project. Now type in the library to be installed, in your example "tensorflow" without quotes, and click Install Package . Wait for the installation to terminate and close all popup windows.
# There is currently no official GPU support for MacOS. Note: TensorFlow with GPU access is supported for WSL2 on Windows 10 19044 or higher. This corresponds to Windows 10 version 21H2, the November 2021 update. You can get the latest update from here: Download Windows 10.
If you install tensorflow with the virtualenv option and want to use it from Pycharm for a project, you need to set up a corresponding virtualenv interpreter. There are a few solutions on the forum, for example How to get VirtualEnv TensorFlow to work in PyCharm?, however, that one didn't work for me with a "python packaging tools not found pycharm" error.
This is a working solution for me, first create a virtualenv from Pycharm and then install tensorflow there:
In command line, install tensorflow in the virtualenv location you created in Step 1. For the above case, the location is ~/tensorflow_pycharm
, therefore, run command virtualenv --system-site-packages ~/tensorflow_pycharm
In Pycharm, select the created project interpreter, and select the tensorflow package, double click to install the package.
If Step 3 is successful, set run configuration, and try run a sample program.
Update - Nov. 1, 2017:
Tried successfully with Latest Jetbrain PyCharm Community Edition (2017.2.4) and Python 2.7.14, with Installing with virtualenv
of https://www.tensorflow.org/install/install_mac.
Run tensorboard --logdir=/tmp/tensorflow_logs
in Terminal of PyCharm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With