how to install jrjohansson's python wavefunction package? - python

I have installed QuTip at my CentOS 6.5.
Now I try to run this code
http://nbviewer.jupyter.org/github/jrjohansson/wavefunction/blob/master/Wavefunction-Phase-Qubit-Current-Biased.ipynb
I copy the above codes
from scipy import *
from scipy import optimize
from wavefunction import *
from wavefunction.wavefunction1d import *
....
but have some error when running
ImportError: No module named 'wavefunction'
Then I use
conda install wavefunction
pip install wavefunction
still don't work
No matching distribution found for wavefunction
Package not found
Please help me to resolve this issue about the install of the python 'wavefunction' package

Seems like he hasnt uploaded it to conda or pypi. In such cases, you can install it with git:
pip install git+https://github.com/jrjohansson/wavefunction.git#egg=wavefunction

Related

module 'scipy.stats._continuous_distns' has no attribute 'frechet_r_gen'

When
import lmoments3 as lm
from lmoments3 import distr
I get module 'scipy.stats._continuous_distns' has no attribute 'frechet_r_gen'
I cded into scipy/stats folder, and there is no presence of 'frechet_r_gen'
I have tried pip install update scipy lmoments3 and pip install --user scipy
I am using conda environments.
https://docs.scipy.org/doc/scipy/release.1.6.0.html
This distribution was removed in scipy 1.6.0. So either install scipy 1.5.4 or make this lmoments3 module update to a more recent scipy version.

ImportError: cannot import name 'constrained_dtw' from 'dtw'

Does anyone know the solution of this problem:
ImportError: cannot import name 'constrained_dtw' from 'dtw'
I installed python DTW (Dynamic Time Warping) module via
pip install dtw
and I tried to solve it by install:
pip install dtaidistance
pip install dtw-python
without any result

Camelot mportError: cannot import name 'PDFTextExtractionNotAllowed' from 'pdfminer.pdfpage'

After install package:
So the problem that dependency just always install new versions of packages.
import camelot
ImportError: cannot import name 'PDFTextExtractionNotAllowed' from 'pdfminer.pdfpage' (/usr/local/lib/python3.7/site-packages/pdfminer/pdfpage.py)
If somebody has a similar problem after build project.
You should to do pip install pdfminer.six==20200517 it's install an older version.
So pdfminer was updated and package camelot stopped works.
Issue: https://github.com/camelot-dev/camelot/issues/169

pip install geopandas on windows

I am relatively new to python and trying to install geopandas on python 3.7 using pip. For separate reasons, I would like to avoid using the anaconda distribution. Following this post, I was able to successfully install geopandas by first installing the dependencies manually. The problem is that now I run into a problem when I try to import geopandas:
import geopandas
The subsequent error message is:
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\site-packages\geopandas\__init__.py", line 5, in <module>
from geopandas.io.file import read_file
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\site-packages\geopandas\io\file.py", line 4, in <module>
import fiona
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\site-packages\fiona\__init__.py", line 87, in <module>
from fiona.collection import BytesCollection, Collection
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\site-packages\fiona\collection.py", line 9, in <module>
from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
ImportError: DLL load failed: The specified module could not be found.
Any advice would be greatly appreciated
My case is similar to yours. And here is how I got mine setup:
Platform: Windows 10, 64-bit Python Version: Python 3.7
Dependencies (whl files needed):
GDAL‑3.0.4‑cp37‑cp37m‑win_amd64.whl
Fiona‑1.8.13‑cp37‑cp37m‑win_amd64.whl
pyproj‑2.6.0‑cp37‑cp37m‑win_amd64.whl
Rtree‑0.9.4‑cp37‑cp37m‑win_amd64.whl
Steps:
Download the files that match the platform and Python version from
https://www.lfd.uci.edu/~gohlke/pythonlibs/
Install packages (stick with the order)
a) C:\Users...\Python37\Scripts>pip3.7 install C:...\GDAL‑3.0.4‑cp37‑cp37m‑win_amd64.whl
b) C:\Users...\Python37\Scripts>pip3.7 install C:...\Fiona‑1.8.13‑cp37‑cp37m‑win_amd64.whl
c) C:\Users...\Python37\Scripts>pip3.7 install C:...\pyproj‑2.6.0‑cp37‑cp37m‑win_amd64.whl
d) C:\Users...\Python37\Scripts>pip3.7 install C:...\Rtree‑0.9.4‑cp37‑cp37m‑win_amd64.whl
Given no errros, now it's good to go:
C:\Users...\Python37\Scripts>pip3.7.exe install geopandas
Test it using IDEL 3.7.4
import geopandas as pdg
(It works!)
This works for me and I hope this is also helpful for you.
I had trouble installing geopandas on (win-64, Spyder3.8, Python3.8.3)
Use this expression to install geopandas in anaconda prompt:
conda install -c conda-forge/label/cf202003 geos
(do not use this website: https://geopandas.org/install.html)
(do not use this expression: conda install --channel conda-forge geopandas)
The simplest method to install geopandas is:
conda install geopandas
In order to update geopandas to latest version use the following command after installation by conda:
pip install geopandas --upgrade
There are other installation methods also explained in Geopandas official website.
Conda is really powerful when it comes to installation as it will install the dependencies needed by the package. However, if you would like to install dependencies earlier than use the following command:
conda install pandas fiona shapely pyproj rtree descartes
Note that if you have installed the dependencies using above command then you can also use pip to install geopandas but before installing via pip dependencies are required to be installed. In order to read more about dependencies, please follow the official guide. To install using pip use the following command:
pip install geopandas

ModuleNotFoundError: No module named 'spatial'

I've been faced to Module Not Found Error in a script which all it's requirements has been installed. I'm trying to import spatial library:
import spatial
This library is located here:
C:\Users\ASUS\AppData\Local\Programs\Python\Python37\Lib\site-packages\scipy\spatial
I checked installed packages through pip list and it was okay. I tried to install spatial-lib in Pycharm project environment but it couldn't be done:
Could not find a version that satisfies the requirement spatial-lib (from versions: )
No matching distribution found for spatial-lib
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
It's nonesence, because my pip is up-to-date. Maybe good to say, importing scipy has such probelms too.
It looks like spatial is a sub-package of scipy. Therefore, to import spatial, you should use the following:
from scipy import spatial

Categories