PyWavelets / pywt

PyWavelets - Wavelet Transforms in Python
http://pywavelets.readthedocs.org
MIT License
1.97k stars 460 forks source link

PyWavelets module installation issues and importing pywt error #666

Closed Limunng closed 1 year ago

Limunng commented 1 year ago

May I know what should I do to fix the error of importing pywt?

My Python version is 3.11.1. I have installed PyWavelets to my PyCharm using command prompt: pip install PyWavelets. It shows that the "Requirement already satisfied: PyWavelets in c: and also numpy>=1.17.3 in c" So, I think the version is already satisfied.

The problem is when I use "Import pywt" to run for wavelet transform function, it has got a red balloon and I clicked to install the package which leads to "Installing packages: error occurred. Details…". Then I clicked to view the "Details" and it shows:

ERROR: Could not find a version that satisfies the requirement pywt (from versions: none) ERROR: No matching distribution found for pywt

[notice] A new release of pip available: 22.3.1 -> 23.0.1 [notice] To update, run: python.exe -m pip install --upgrade pip

So, I updated the pip version yet does not resolve my issue. I am very clueless now on which part did I do it wrong.

rgommers commented 1 year ago

There are not enough details here to say for sure, but please try:

$ pip uninstall pywavelets
$ pip install pywavelets
Limunng commented 1 year ago

There are not enough details here to say for sure, but please try:

$ pip uninstall pywavelets
$ pip install pywavelets

Hi dear Rgommers, first of all, thank you for your suggestion. I have already tried this method, uninstall and reinstall, but to not avail. Regarding the error stated, after multiple attempt on troubleshooting it, I have finally able to install PyWavelets and import it to my coding.

The solution is as follows:

  1. Go to File and Settings.
  2. Select Python Interpreter and click the + sign.
  3. Please search the package by typing PyWavelets instead of pywt (as I searched with pywt it will show PyWt but not the one that I want)
  4. Please click the Install Package at the left bottom of the window and there you are.
  5. To use it in your coding, please type Import pywt , then you can now run wavelet transform without any issue.

I am using Windows 11. My Python version is Python 3.11.1. The PyWavelets package version is 1.4.1. The numpy package version is 1.24.2.

So hopefully it helps to anyone of you who are also experiencing the same issue as me.

rgommers commented 1 year ago

Thanks for the update with your solution @Limunng