Giter Site home page Giter Site logo

Comments (18)

tfcollins avatar tfcollins commented on July 17, 2024 1

You are missing the libiio dependency. See here https://analogdevicesinc.github.io/pyadi-iio/guides/quick.html

from pyadi-iio.

tfcollins avatar tfcollins commented on July 17, 2024 1

ok. Please don't use branches besides main or packages from pypi/conda. If there is doc pointing to other branches let me know

from pyadi-iio.

tfcollins avatar tfcollins commented on July 17, 2024

Can you print the library version?

python -c "import adi ; print(adi.__version__)"

from pyadi-iio.

GoldenxSun avatar GoldenxSun commented on July 17, 2024

Yes of course. It will throw the same error: "AttributeError: module 'adi' has no attribute 'version'" as in the following picture

image

from pyadi-iio.

tfcollins avatar tfcollins commented on July 17, 2024

Are you sure you have the module installed? Can you provide the output of pip list and inspect adi:

pip list
python -c "import adi ; print(dir(adi))"

from pyadi-iio.

GoldenxSun avatar GoldenxSun commented on July 17, 2024

Yes pip list shows I have adi.init installed. Seems like I haven't installed the right module.

image

and dir(adi) print the following output:

image

but why is it not installed if it is located in the folder C:\Users\Users\AppData\Local\Program Files\Python\Python311\Lib\site-packages?

from pyadi-iio.

tfcollins avatar tfcollins commented on July 17, 2024

Yes this is not pyadi-iio. Run:

pip uninstall adi

Then install pyadi-iio
(from pypi)

pip install pyadi-iio

(from source cloned git repo)

pip install .

but why is it not installed if it is located in the folder C:\Users\Users\AppData\Local\Program Files\Python\Python311\Lib\site-packages?

How were things put here? I'm a bit lost on what you mean

from pyadi-iio.

GoldenxSun avatar GoldenxSun commented on July 17, 2024

I installed it via pypi by entering the command "pip install pyadi-iio". It then installed all the libraries in the python site-packages folder. Now when I run the command again it says all required libraries are already installed: "requirement already satisfied"

from pyadi-iio.

GoldenxSun avatar GoldenxSun commented on July 17, 2024

That's why I am confused. It tells me requirements are already satisfied but on the other hand it can't find the module. Even if it's fully installed in the python site-packages. I have already gone through all the recommended steps and even uninstalled and reinstalled the library.

from pyadi-iio.

tfcollins avatar tfcollins commented on July 17, 2024

Have you removed adi.util? If not then its likely they is higher priority on the import list and will trump pyadi-iio.

from pyadi-iio.

GoldenxSun avatar GoldenxSun commented on July 17, 2024

Where can I find adi.util?

from pyadi-iio.

tfcollins avatar tfcollins commented on July 17, 2024

Its the package you installed through pip. So running this will remove it:

pip uninstall adi.init

from pyadi-iio.

GoldenxSun avatar GoldenxSun commented on July 17, 2024

Okay thank you. But now I get a different error TypeError: argument of type 'NoneType' is not iterable after running the following command:

python -c "import adi ; print(adi.__version__)"

image

from pyadi-iio.

GoldenxSun avatar GoldenxSun commented on July 17, 2024

Okay, thanks, that worked! Sorry for the misunderstanding. Also, I had to adjust the files cn0540.py, adis16507.py, adxl345.py, adxrs290.py and ltc2983.py because np.float was deprecated and to use the numpy scalar type specifically, I had to use np.float64.

image

from pyadi-iio.

tfcollins avatar tfcollins commented on July 17, 2024

Can you provide your installed dependency list and python version?

pip list
python --version

from pyadi-iio.

GoldenxSun avatar GoldenxSun commented on July 17, 2024

Yes of course

image

from pyadi-iio.

tfcollins avatar tfcollins commented on July 17, 2024

Okay, thanks, that worked! Sorry for the misunderstanding. Also, I had to adjust the files cn0540.py, adis16507.py, adxl345.py, adxrs290.py and ltc2983.py because np.float was deprecated and to use the numpy scalar type specifically, I had to use np.float64.

I'm a bit confused here. Do you have a really old clone of the pyadi-iio repo you are using? This was fixed a long time ago ef36521 If you are working in a source tree it should take precedence over installed packages with the same name.

from pyadi-iio.

GoldenxSun avatar GoldenxSun commented on July 17, 2024

I understand. I was working in the apdp410x branch and probably used an old version of pyadi-iio because of that. This was because I was working with the EVAL-ADPD410x-ARDZ and the example programs are only available under the adpd410x branch. The commit ef36521 is newer than the apdp410x branch.

from pyadi-iio.

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.