Hi Sean and Wael,

Yes, that is correct. Casperfpga is only supported with python 2.x for now.
We have been working on porting this to python3. I know at SARAO we have a
python3 compatible version, but I haven't tested it fully yet.

You are welcome to try and let me/James Smith know:

https://github.com/ska-sa/casperfpga/tree/python3-port

Kind regards,

Adam Isaacson
South African Radio Astronomy Observatory (SARAO)
Hardware Manager
Cell: (+27) 825639602
Tel:  (+27) 215067300
email: aisaac...@ska.ac.za



On Thu, May 7, 2020 at 2:38 AM Wael Farah <wael.a.fa...@gmail.com> wrote:

> Hi Sean,
>
> I might be wrong, but this error is due to the fact that the
> casperfpga module that you are using (when you do "pip install" and/or the
> master branch of the github repo) is meant to work on python 2.x.
>
> What I can suggest doing is the following:
>
> Uninstall casperfpga
> >> pip uninstall casperfpga
>
> Then in your git directory, do a
> >> git checkout py3-merge
>
> This will switch to the python3 version of the module, and then install it.
>
> Hope this will fix the problem!
>
> Cheers,
> Wael
>
> On Wed, 6 May 2020 at 10:23, Sean Mckee <semc8...@colorado.edu> wrote:
>
>> Greetings Casperites,
>>
>> I'm new to Linux, and I think I must have some simple setting adjusted
>> incorrectly.
>>
>> I'm running ubuntu 16.04 and tried this on a fresh install.
>>
>> I first simply tried "pip install casperfpga", but this gave me the error
>> message:
>>
>> ERROR: Could not find a version that satisfies the requirement casperfpga
>> (from versions: none)
>> ERROR: No matching distribution found for casperfpga
>>
>> I then cloned from https://github.com/casper-astro/casperfpga.git and
>> installed. The installation seemed to go fine, but when I open up an
>> ipython instance and type "import casperfpga" I get the following:
>>
>> ----> 1 import casperfpga
>>
>> /home/sean/Casper/casper_venv/lib/python3.5/site-packages/casperfpga-0.1.3-py3.5-linux-x86_64.egg/casperfpga/__init__.py
>> in <module>()
>>       4
>>       5 # import all the main classes that we'll use often
>> ----> 6 from bitfield import Bitfield, Field
>>       7 from katadc import KatAdc
>>       8 from casperfpga import CasperFpga
>>
>> ImportError: No module named 'bitfield'
>>
>> I tried installing bitfield via "pip install bitfield", but this seems to
>> be a different version of bitfield than expected by casperfpga. I get this
>> error message:
>>
>> ----> 1 import casperfpga
>>
>> /home/sean/Casper/casper_venv/lib/python3.5/site-packages/casperfpga-0.1.3-py3.5-linux-x86_64.egg/casperfpga/__init__.py
>> in <module>()
>>       4
>>       5 # import all the main classes that we'll use often
>> ----> 6 from bitfield import Bitfield, Field
>>       7 from katadc import KatAdc
>>       8 from casperfpga import CasperFpga
>>
>> ImportError: cannot import name 'Field'
>>
>> All of this was run from a python 3 virtual environment. Any insight into
>> this?
>>
>> Thanks,
>> Sean
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "casper@lists.berkeley.edu" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to casper+unsubscr...@lists.berkeley.edu.
>> To view this discussion on the web visit
>> https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/b00b1193-9742-480b-87df-f4e5a110b683%40lists.berkeley.edu
>> <https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/b00b1193-9742-480b-87df-f4e5a110b683%40lists.berkeley.edu?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups "
> casper@lists.berkeley.edu" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to casper+unsubscr...@lists.berkeley.edu.
> To view this discussion on the web visit
> https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/CALO2pVeJM3N3khtta4dF1B7Unui7fGj9bP9Ooy_rR%3DOZzd-4wA%40mail.gmail.com
> <https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/CALO2pVeJM3N3khtta4dF1B7Unui7fGj9bP9Ooy_rR%3DOZzd-4wA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"casper@lists.berkeley.edu" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to casper+unsubscr...@lists.berkeley.edu.
To view this discussion on the web visit 
https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/CADTJ%3DnE4RE3gVbJxfaVTjTkJQsBNcQsv1dRbK4bp6njbD%3DTarQ%40mail.gmail.com.

Reply via email to