Coder Social home page Coder Social logo

Comments (6)

gfursin avatar gfursin commented on May 29, 2024

Hi @yzh89.

You need to use exactly the same python version which you used when installing TensorFlow package via CK. The reason is that CK will install extra Python packages such as numpy required by TF for this specific Python version and will add then to PYTHONPATH in the above virtual env. So if you do the following, it should work:

$ python3.5 -c "import numpy"

other python versions will indeed conflict with above packages ...

from ck-tensorflow.

gfursin avatar gfursin commented on May 29, 2024

In fact, it was solving different existing problems when you have multiple Pythons installed and then try to install TF for just one of them - in such case TF will often fail with above error. That's why we fix Python, fix TF dependencies for it, then install TF, and then allow you to use it from CK virtual environment with the same Python ... Actually, you can use ${CK_PYTHON_BIN} to know which Python version was used in this CK virtual environment ...

from ck-tensorflow.

unmeshbordoloi avatar unmeshbordoloi commented on May 29, 2024

I understand. However, I am not sure how to configure CK program object-detection-tf-py to use Python3.5.

from ck-tensorflow.

gfursin avatar gfursin commented on May 29, 2024

I see "python" in the CK dependencies of this program, so normally, if you run it, you should be asked to select a Python (if you have multiple versions registered by CK). If CK already detected some version and it's not the suitable one, you can detect and register the correct one as follows:

$ ck detect soft --tags=compiler,python

Next time you run this program (i.e. "ck run program:object-detection-tf-py"), CK should ask you which Python version to use ...

However, maybe I am missing something. I will let @psyhtest check it further ...

from ck-tensorflow.

gfursin avatar gfursin commented on May 29, 2024

By the way, one more thing, I have an experimental option --reuse_deps which tries to reuse already resolved dependencies (such as Python) for all other dependencies. This can help you rebuild proper environment from scratch:

$ ck run object-detection-tf-py --reuse_deps

from ck-tensorflow.

psyhtest avatar psyhtest commented on May 29, 2024

The most robust way of handling this is to select a version of Python (e.g. python3.6) and stick to it when installing dependencies via pip e.g.:

$ ck detect soft:compiler.python --full_path=`which python3.6`
$ python3.6 -m pip install numpy

then selecting the same version when installing TensorFlow:

$ ck install package --tags=lib,tensorflow

and finally when running a benchmark:

$ CK_PYTHON=python3.6 ck run program:image-classification-tf-py

from ck-tensorflow.

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.