How to install the binarySearch module? - python

I need a module, do you know how I can get it?
Currently getting this error code:
File "C:\Users\b\OneDrive\Desktop\Analyse\test_binarySearch.py", line 10, in <module>
import binarySearch as BS
ModuleNotFoundError: No module named 'binarySearch'

If you have pip installed, you can install binary-search by running the following command:
pip install binary-search
(If you do not have pip installed, refer to the documentation for installation instructions.)
Then you can import the library in your code like this:
import binary_search

Open up cmd and type :
pip install binary-search

Related

importing openbabel wrapper pybel for macos without conda

Previously I asked how to install openbabel for macos here. Now I also need to install the openbabel python wrapper pybel. I tried pip install pybel and it was installed. Then, while I was following the tutorial,
import openbabel
import pybel
mymol = pybel.readstring("smi", "CCCC")
I got the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'pybel' has no attribute 'readstring'
It turns out other people had similar issues and in fact I found in the mailing list that, I quote
'I guess you installed pybel via pip install pybel, which is the
"wrong" pybel'
Then they give a solution which is pip install openbabel, which is not possible for macos.
A solution is to use conda to install openbabel but I am not using conda and I would like to keep it that way so I am looking for a solution which does not require conda.
I found the solution, you can brew install open-babel and then give the path to homebrewed library of python site-packages. For me the following works:
import sys
sys.path.append('/usr/local/lib/python3.8/site-packages')
Then you can
import openbabel
from openbabel import pybel
and so on.
I have exactly the same problem. It works with the following code:
from openbabel import pybel
mymol = pybel.readstring("smi","CCN(CC)CC")
mymol

ModuleNotFoundError: No module named 'camelot'

I want to extract tables from pdf and for that
I used Camelot. But I'm getting this error whenever I try to import it:
import camelot
Traceback (most recent call last):
File "<ipython-input-11-679d8f55abf0>", line 1, in <module>
import camelot
ModuleNotFoundError: No module named 'camelot'
I've tried installing camelot using:
pip install camelot-py[cv]
and
pip install camelot-py[all]
but I'm getting the same error again and again. How do I remove this?
Your help would be appreciated!
Check for your python version by writing python --version in the command prompt with the path where python is installed.
For python 3.7, try:
pip install camelot-py
https://pypi.org/project/camelot-py/
I hope this works for you.
If using conda (this is what I'd recommend):
conda install -c conda-forge camelot-py
If using pip (may have to manually handle dependencies): pip install camelot-py[cv]
Official installation instructions: https://camelot-py.readthedocs.io/en/master/user/install.html#install
Try to install Camelot in correct python version directory using
''''python2.7 -m pip install''''
Use your python version number instead of 2.7 above
In your python environment you have to install padas library.
You can install Camelot python with following command:
pip install Camelot
After the installation of Camelot python library, ModuleNotFoundError: No module named 'Camelot' error will be solved.
Thanks

ModuleNotFoundError: No module named 'tide'

I'm calling tide in the pytides module with Python3.7, which is installed using the pip method.Here is my python code:
from pytides.tide import Tide
I ran into the following problems:
ModuleNotFoundError: No module named 'tide'
What should I do to solve this problem?
This is my link to the petides installation package, and you can see the full code here
enter link description here
I think you should you
from pytides import Tide
It will work, correct me if it doesn't
Edit 1:
sudo apt-get install liblapack-dev libatlas-base-dev gfortran
export LAPACK=/usr/lib/liblapack.so
export ATLAS=/usr/lib/libatlas.so
export BLAS=/usr/lib/libblas.so
pip install numpy
pip install scipy
pip install pytides
It is a problem in \site-packages\pytides\__init__.py
You need to rewrite:
from . import tide
from . import astro
from . import constituent
from . import nodal_corrections
Same problem in \site-packages\pytides\constituent.py
You need to change
from . import nodal_corrections as nc
and you need to add:
from functools import reduce
And again in \site-packages\pytides\tide.py
You need to change:
from .astro import astro
from . import constituent
The pytides is outdated. Use pytides2, the newer version. Other thing to keep in mind is,if your interpreter is miniconda/anaconda, then you can't obtain it from their repository. You must create a 3.7 (and no later version) interpreter in pycharm using python3 (real or virtual environment, either is fine).

ImportError: No module named geographiclib.geodesic

When I am trying to run .py script file ,I am getting this error. In the script file after import the packages, I am written "from geographiclib.geodesic import Geodesic"
You might have to install the module geographiclib by running
pip install geographiclib
or
easy_install geographiclib
I resolve the issue below are the step which i follow to reslove.
1. Install PIP using command "python get-pip.py". you can download the get-pip.py file from internet.
2. Then run "pip install geographiclib".
3.finish

Prosodylab Aligner

Can someone that uses this tool give me a step by step manual. while I follow the available youtube manual and others on the Github I have still problems. when I want to run aligner.py I have the error
from utilities import opts2cfg, mkdir_p, \
File "/home/mary/Desktop/htk/Prosodylab-Aligner/aligner/utilities.py", line 8, in <module>
import yaml
ImportError: No module named 'yaml'
Is there any way to fix it? I try to install yaml but it seems impossible
The module should be install as pyaml. You can use pip to install Python packages. In your case this will be your installation command.
pip install pyaml

Categories

Resources