(原+转)pycharm中使用caffe
2016-09-22 15:09
344 查看
转载请注明出处:
http://www.cnblogs.com/darkknightzh/p/5896446.html
参考网址:
http://www.th7.cn/Program/Python/201510/641841.shtml
http://stackoverflow.com/questions/33371954/pycharm-import-caffe-error/33397590
http://askubuntu.com/questions/684550/importing-a-python-module-works-from-command-line-but-not-from-pycharm
http://www.th7.cn/Program/Python/201510/641841.shtml中说使用sys.path.append实际上可用:
http://stackoverflow.com/questions/33371954/pycharm-import-caffe-error/33397590说修改/etc/ld.so.conf。修改了之后,不管用。但是该网址中图片内已经贴出使用sys.path.insert来增加路径。实际上也是可以的:
http://askubuntu.com/questions/684550/importing-a-python-module-works-from-command-line-but-not-from-pycharm中Mihai Capotă指出,由于pycharm并不读取.bashrc中的内容,因而在命令行中能使用import python,但是pycharm中依旧不能使用python。解决方法是:As an alternative to setting the paths in PyCharm, you can simply start PyCharm from a Bash shell to give it access to the environment variables you set in .bashrc.(从bash shell中启动pycharm,使pycharm能读取.bashrc中的环境变量)——这个没试过。
http://www.cnblogs.com/darkknightzh/p/5896446.html
参考网址:
http://www.th7.cn/Program/Python/201510/641841.shtml
http://stackoverflow.com/questions/33371954/pycharm-import-caffe-error/33397590
http://askubuntu.com/questions/684550/importing-a-python-module-works-from-command-line-but-not-from-pycharm
http://www.th7.cn/Program/Python/201510/641841.shtml中说使用sys.path.append实际上可用:
import sys sys.path.append("/home/xxx/project/caffe-master/python")
http://stackoverflow.com/questions/33371954/pycharm-import-caffe-error/33397590说修改/etc/ld.so.conf。修改了之后,不管用。但是该网址中图片内已经贴出使用sys.path.insert来增加路径。实际上也是可以的:
import sys sys.path.insert(0, "/home/xxx/project/caffe-master/python")
http://askubuntu.com/questions/684550/importing-a-python-module-works-from-command-line-but-not-from-pycharm中Mihai Capotă指出,由于pycharm并不读取.bashrc中的内容,因而在命令行中能使用import python,但是pycharm中依旧不能使用python。解决方法是:As an alternative to setting the paths in PyCharm, you can simply start PyCharm from a Bash shell to give it access to the environment variables you set in .bashrc.(从bash shell中启动pycharm,使pycharm能读取.bashrc中的环境变量)——这个没试过。
相关文章推荐
- pycharm 教程(一)安装和首次使用
- linux下破解Python集成开发环境WingIDE4.1,以及使用PyCharm的使用
- pycharm 使用心得(一)安装和首次使用
- pycharm 使用心得(五)断点调试
- pycharm 使用心得(九)解决No Python interpreter selected的问题
- pycharm 使用心得(五)断点调试
- pycharm 使用心得(二)设置字体大小
- pycharm 使用心得(八)如何调用另一文件中的函数
- pycharm 使用心得(六)进行简单的数据库管理
- pycharm 教程(一)安装和首次使用
- 在ubunut下使用pycharm和eclipse进行python远程调试
- pycharm 使用心得(三)Hello world!
- pycharm 使用心得(一)安装和首次使用
- MacOS java升级后pycharm 无法使用的解决方案
- pycharm 教程(一)安装和首次使用
- 使用pycharm进行简单的数据库管理
- windows下使用PyCharm编程,import的类找不到
- pycharm 使用心得(三)Hello world!
- pycharm 使用心得(七)一些实用功能介绍
- Pycharm的安装配置及使用