Code Monkey home page Code Monkey logo

Comments (12)

emailweixu avatar emailweixu commented on May 7, 2024

paddlepaddle has not been tested against anaconda python. Can you check which python paddlepaddle is linked with by looking at build/CMakeCache file?

from paddle.

reyoung avatar reyoung commented on May 7, 2024

Maybe you need install PaddlePaddle's python package manually. Try to find the file paddle*.whl in your install directory. It normally at "/usr/local/opt/paddle/share/wheels/" if you did not change DESTDIR or CMAKE_INSTALL_PREFIX.

During make process, PaddlePaddle will install some python package to default python interpreter in system, not anaconda.

from paddle.

mingtop avatar mingtop commented on May 7, 2024

@emailweixu

I added this to build:

cmake -DWITH_GPU=ON -DWITH_DOC=OFF -DWITH_SWIG_PY=ON -DCMAKE_INSTALL_PREFIX=/home/youhost -DPYTHON_INCLUDE_DIR=/home/youhost/anaconda/include/python2.7 -DPYTHON_LIBRARY=/home/youhost/anaconda/lib/libpython2.7.so ..

From cmake file , I found this:
if(WITH_PYTHON)
find_package(PythonLibs 2.7 REQUIRED)
find_package(PythonInterp REQUIRED)
find_package(NumPy REQUIRED)
endif()
so to make python find my python libs I added : -DPYTHON_LIBRARY=/home/youhost/anaconda/lib
ref: https://cmake.org/cmake/help/v3.0/module/FindPythonLibs.html

build successed

-- Found PythonLibs: /home/youhost/anaconda/lib/libpython2.7.so (found suitable version "2.7.12", minimum required is "2.7")
-- Found PythonInterp: /home/youhost/anaconda/bin/python2.7 (found suitable version "2.7.12", minimum required is "2.7")

but But still has this error ...

F0831 20:01:44.284020 28877 PythonUtil.cpp:120] Check failed: (pyModule) != nullptr Python Error: <type 'exceptions.ImportError'> : No module named paddle.trainer.config_parser

太多坑了啊.

Another: gflags no found .

-- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
-- Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
-- Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.

Hope your team slove this , Thank you every much~

from paddle.

mingtop avatar mingtop commented on May 7, 2024

@reyoung yes . pypaddle_.whl and paddle_.whl in my install path.

from paddle.

reyoung avatar reyoung commented on May 7, 2024

@mingtop Just run anaconda's pip install these wheels, and will solve this problem

like this http://stackoverflow.com/questions/28002897/wheel-file-installation

from paddle.

Xiaomi2008 avatar Xiaomi2008 commented on May 7, 2024

I'm having the same problem when calling train.sh

from paddle.

qingqing01 avatar qingqing01 commented on May 7, 2024

@mingtop @Xiaomi2008 I have tested against anaconda2 python, I can run train.sh successfully. And the python package is installed in /home/xxx/anaconda2/lib/python2.7/site-packages/paddle-0.8.0b0-py2.7.egg on my machine which is CentOS.

@Xiaomi2008 You may need to install PaddlePaddle's python package manually as @reyoung mentioned above.

from paddle.

Xiaomi2008 avatar Xiaomi2008 commented on May 7, 2024

@qingqing01
I used pip install pypaddle__.whl and paddle__.whl , the problem is still exist and I use python2.7, not anaconda python. please help.

from paddle.

qingqing01 avatar qingqing01 commented on May 7, 2024

@Xiaomi2008 You should ensure that the python used for compiling and running PaddlePaddle is the same. Then if you have install paddle-xxx.wh successfully. You maybe see the package like: your/python/path(or system lib path)/lib/python2.7/site-packages/paddle-0.8.0b0-py2.7.egg/.

You can test it as follows. If there is no problem when importing, then installation is successful and I think it will be ok when run train.sh.

python
import paddle.trainer.config_parser

from paddle.

Xiaomi2008 avatar Xiaomi2008 commented on May 7, 2024

@qingqing01 I did see paddle in xxx/lib/python2.7/site-packages/paddle-0.8.0b0-py2.7.egg/
and I import paddle.trainer.config_parser with no error. But still got No this error when running train.sh.
BTW, my system is Ubuntu 14.04 server

from paddle.

reyoung avatar reyoung commented on May 7, 2024

@Xiaomi2008 Will the latest PaddlePaddle get this error? We did some fixes in 674d69c .

from paddle.

zhuyong0000 avatar zhuyong0000 commented on May 7, 2024

还是有 ImportError: No module named _sysconfigdata_nd的错误
需要将paddle\utils\PythonUtil.cpp的
Py_SetProgramName(argv[0]);
改为
Py_SetProgramName((char*)"python");
就正常了

from paddle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.