Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: No module named 'filters' #12

Closed
ItsEric opened this issue Nov 9, 2016 · 8 comments
Closed

ImportError: No module named 'filters' #12

ItsEric opened this issue Nov 9, 2016 · 8 comments
Assignees

Comments

@ItsEric
Copy link

ItsEric commented Nov 9, 2016

I just tried installing Commpy on my Macbook Pro (2015) using pip.

When I type import commpy I get the following error message (Python 3.5) :

/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 "/Users/Eric/Dropbox/Python TIPE/Bruit/test pillow"
Traceback (most recent call last):
  File "/Users/User_name/path/file", line 1, in <module>
    import commpy.channels
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/commpy/__init__.py", line 17, in <module>
    from filters import *
ImportError: No module named 'filters'

Do anybody know how I can solve this issue ?

Thank you,

Eric

@koppa
Copy link

koppa commented Jan 10, 2017

Just get the master branch of commpy, this bug has been already fixed.

@jdemel
Copy link

jdemel commented Jul 11, 2017

The CommPy version installed via 'pip3' may still cause this error. It is version 0.3.0

The error is caused by implicit imports in __init__.py.
The lines like:
from filters import *
need to be updated to: from commpy.filters import *
This is fixed in the current master branch.

It would be great if a new commpy version would be released which includes this fix.

@cnMuggle
Copy link

cnMuggle commented Oct 3, 2017

download from windows 10 using pip, still have this issue, fixed manually with the instruction above, python 3.6.

@cnMuggle
Copy link

I re-install the Python with 3.6.2rc1 on Windows 10 and install scikit-commpy of version 0.3.0. The above error appear again, this time, claiming "from commpy.filters import *" or "from commpy.filters import rcosfilter" doesn't help resolve the issue.

How can I install the master branch?
Why this bug appear again? Is that because I install a different version of Python?

@234982
Copy link

234982 commented May 20, 2018

I suppose it is just a matter of publishing updated lib in pip repository :/.

@soopnoods
Copy link

soopnoods commented Mar 5, 2019

This is still an issue? does anybody have a solution? I am trying to run the following code from https://stackoverflow.com/questions/14614966/easy-way-to-implement-a-root-raised-cosine-rrc-filter-using-python-numpy

import numpy as np
from commpy.modulation import QAMModem
from commpy.filters import rrcosfilter
N = 1024 # output size
mod1 = QAMModem(16) # QAM16
sB = randint(0, 2, mod1.num_bits_symbolNM/4) # Random bit stream
sQ = mod1.modulate(sB) # Modulated baud points
sPSF = rrcosfilter(N*4, 0.8, 1, 24)[1]
qW = np.convolve(sPSF, sQ) # Waveform with PSF

And I am receiving the same error as ItsEric

@BastienTr
Copy link
Collaborator

BastienTr commented Mar 6, 2019

Yes the workaround is known. You must use the version from github as the version on pip is outdated. With the github version, rrcosfilter is imported without error.
Has you have some syntax errors, I could not test your code as a whole but it should work. If not, I could look more closely.

To @veeresht : it would be great to make a new realease on pip to avoid this kind of error

@BastienTr BastienTr self-assigned this Jul 2, 2019
@BastienTr
Copy link
Collaborator

Pip is now updated to v0.4 and this issue should not occcure anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants