If you prefer Pycharm IDE for developing in Python, there are some one time configurations you need to do for setting up opencog-to-minecraft development environment in Pycharm.
- Create a .pycharmrc file in your home directory and add the following lines to it :
source ~/.bashrc
source /your-opencog-to-minecraft/catkin_ws/devel/setup.bash
- If you use zsh, add these instead :
source ~/.zshrc
source /your-opencog-to-minecraft/catkin_ws/devel/setup.zsh
- Whenever you start Pycharm through the terminal using pycharm.sh script provided in the tarball of pycharm, execute this line just before executing pycharm.sh in the same terminal :
/bin/bash --rcfile ~/.pycharmrc
For zsh users :
/bin/zsh --rcfile ~/.pycharmrc
It might be possible that you get too many alerts regarding ImportErrors when you start up. Here's how to resolve ...
-
After opening the project in Pycharm, go to File -> Settings ('Preferences' in some versions) -> Project Interpreter.
-
Click on the top right "Settings" icon and Click "More"...
-
Select "Show Paths for the Selected Interpreter", and select "Add"/ "+" icon.
-
Add the following paths one after another :
/usr/local/share/opencog/python
/your_opencog/build/opencog/cython/
/your_opencog-to-minecraft/
Pycharm version 5 and above have a built in terminal to execute Linux Shell commands. You can return to README and continue the steps either in Pycharm built in terminal or normal terminal provided by your Ubuntu desktop environment.