[PYTHON] What to do if the library doesn't load when you run it in PyCharm, even though it works fine on terminal

python's strongest development environment, PyCharm

I've been programming in various environments so far, but since I met JetBrains, I've been captivated by JetrBrains' IDE.

In particular, PyCharm is the one that many people give the highest evaluation.

Recommendation of the strongest Python development environment PyCharm

What you should be careful about such PyCharm is setting PATH

I used PyCharm to run Tensorflow, a machine learning framework.

An error occurred when trying to run the sample code after completing all the setup.

CUDA is not recognized

Install CUDA when using Tensorflow with NVIDIA GPU.

I got an error saying that CUDA is missing.

LD_LIBRARY_PATH is overwritten! ??

After a lot of research, it seems that certain environment variables are overwritten on PyCharm.

The CUDA library PATH is written to LD_LIBARARY_PARH.

The LD_LIBRARY_PATH was overwritten.

Play with Run-> Edit Configurations!

Run -> Edit Configurations -> Python -> [your project] -> Environment variables

It was solved by defining LD_LIBRARY_PATH in and adding the desired path.

1:Run -> Edit Configurations Screen Shot 2017-06-21 at 22.38.28.png

2: Python -> [your project name] -> Environment variables Screen Shot 2017-06-21 at 22.38.50.png

3: Add Environment Variables Write the PATH of the library that PyCharm should recognize in / add / path / here. Screen Shot 2017-06-21 at 22.36.23.png

in conclusion

that's all.

Recommended Posts

What to do if the library doesn't load when you run it in PyCharm, even though it works fine on terminal
What to do if the Microsoft Store opens even if you run python on Windows
What to do if you get the error ʻERR_FEATURE_UNAVAILABLE_ON_PLATFORM` when using ts-node-dev on Linux
What to do if you can't use the trash in Lubuntu 18.04.
What to do if you get an error when trying to load mnist
What to do if you get "The session could not be opened" when installing CentOS on VirtualBox
What to do if you installed pyenv on Mac OS using Homebrew but the python version doesn't switch
What to do if "export" keeps appearing on terminal when trying to put Python on macOS
What to do if you get an error when importing matplotlib in Python (Mac)
What to do if you can't hit the arrow keys in the Python interactive console
What to do if you run python in IntelliJ and end with an error
What to do if you can't create a virtual environment using venv even though you're following the Django official website
[* CentOS 6.10] What to do if you cannot add the IUS Community Project repository on CentOS 6.5 (VirtualBox)
What to do if you get "coverage unknown" in Coveralls
What to do if you can't log in as root
What to do if you can't use WiFi on Linux
What to do if you get an error when running "certbot renew" in CakePHP environment
What to do if you get `locale.Error: unsupported locale setting` when getting the day of the week from a date in Python
What to do if you cat or tail a binary file and the terminal is garbled
What to do if you get a must override `get_config` error when trying to model.save in Keras
What to do if you get angry if you don't have libxml / xmlversion.h when installing lxml on CentOS
What to do if Python doesn't work on Git for Windows
What to do if you get a minus zero in Python
What to do if the inode is exhausted on EC2 Linux
What to do when you get "I can't see the site !!!!"
What to do when the value type is ambiguous in Python?
What to do if you get the message "" ~ .pkg "is corrupted and cannot be opened" when installing wxPython on Mac OS X
What to do if you get a "Wrong Python Platform" warning when using Python with the NetBeans IDE
What to do if you get a Permission denied (public key) error when trying to pull on Github
[Python] What to do if you get a ModuleNotFoundError when importing pandas using Jupyter Notebook in Anaconda
What to do when the result downloaded via scrapy is in English
What to do if you can't find PDO in Laravel or CakePHP
What to do if you forget your login password on Manjaro Linux
What to do if you get lost in file reference with FileNotFoundError
What to do if you get angry in TensorFlow v2 without attribute'app'
What to do if you get stuck during Anaconda installation on Linux
What to do if the server doesn't start with python manage.py runserver
What to do if you can't install with pip in babun environment
What to do when the warning "The environment is in consistent ..." appears in the Anaconda environment
What to do if you get an error when installing Dlib (Ubuntu)
What to do if you get the error RuntimeError: Python is not installed as a framework when trying to use matplitlib and pylab in Python 3.3
What to do if you get an error when trying to send a message in tasks.loop () immediately after startup
What to do if you get a "No versions found" error in pipenv
What to do if CERTIFICATE_VERIFY_FAILED occurs when nltk.download () is done on macOS pyhon
In pandas.DataFrame, even when assigning only a specific column, if index is attached, you do not have to worry about the order of data
If you guys in the scope kitchen can do it with a margin ~ ♪
Let's Encrypt updated! What to do if the certbot renew command doesn't work
[Note] What to do if the Qt library conflicts between pyqt and opencv
What to do if scrapy doesn't work after installing scrapy with pip on mac
What to do if you get an error when installing python with pyenv
What to do if you get "Python not configured." Using PyDev in Eclipse
What to do if abort is displayed when inputting camera video in OpenCV
What to do when the graph does not appear in jupyter (ipython) notebook
What to do if a version error occurs in the selenium Chrome driver
What to do if (base) is displayed at the beginning of the Mac terminal
What to do if you get the error "Error: opencv3: Does not support building both Python 2 and 3 wrappers" when installing openCV 3
What to do if pipreqs results in UnicodeDecodeError
What to do if you can't pipenv shell
What to do if rails s doesn't work
What to do if atom autocomplete-python doesn't work
What to do if you get an OpenSSL error when installing Python 2 with pyenv