Python : No module named 'pyasn1_modules'

fdroidserver

#1

Hello all!

I’ve been trying in initiate fdroid server following instructions from README.md. I’ve already cloned both the repos but when I run fdroid init, I get an ImportError

Traceback (most recent call last):
  File "/home/knight/Documents/fdroidserver/fdroid", line 24, in <module>
    import fdroidserver.common
  File "/home/knight/Documents/fdroidserver/fdroidserver/common.py", line 50, in <module>
    from pyasn1_modules import rfc2315
ImportError: No module named 'pyasn1_modules'

So I tried to install the packages which seems to be missing;

sudo apt-get --reinstall install python-pyasn1-modules

But the issue still persist.

Following are the package versions installed;

Preparing to unpack .../python-pyasn1_0.1.9-1_all.deb ...
Unpacking python-pyasn1 (0.1.9-1) over (0.1.9-1) ...
Preparing to unpack .../python-pyasn1-modules_0.0.7-0.1_all.deb ...
Unpacking python-pyasn1-modules (0.0.7-0.1) over (0.0.7-0.1) ...
Processing triggers for doc-base (0.10.7) ...
Processing 1 changed doc-base file...
Setting up python-pyasn1 (0.1.9-1) ...
Setting up python-pyasn1-modules (0.0.7-0.1) ...

Am I using a different version than the one required in python-pyasn1? Also I noticed there are different dashes in both common.py and apt library.

apt-get --> python-pyasn1-modules
common.py --> pyasn1_modules


#2

Why not install fdroidserver from repos too? IIRC, I hit that error at one point too, so I ended up with the packaged one instead, after trying to fix it by installing more packages via pip or apt. ;(


#3

Maybe this is a conflict between pyasn1* versions installed with pip and apt-get


#4

Hi all! I couldn’t make this work by following README.md instructions. So I installed Fdroid server with apt and managed to get it built!

sudo apt install fdroidserver

Hope this will help anyone with a similar issue! :slight_smile:


#5

I don’t know, but I did try them separately too w/o any result.

I’ll see if I can retest at some point.


#6

We’re using python3 so I guess what you would have needed was:

sudo apt-get install python3-pyasn1-modules

#7

Tried all to no avail, iirc.