infomap is an un-recognized package in my laptop - python

I have installed infomap on my Ubuntu using:
sudo apt-get install build-essential
But when I want to use it in python program just like:
from infomap import infomap
I get this error:
No module named infomap
do I have to import any packages before it? what is wrong?

infomap is a python pip software package. You need to install it via pip, which is a python package manager. Try pip install infomap. If it gives you an error about pip not being found, you need to install it with something like sudo apt-get install python-pip, but I think it's a part of the build-essential package you already installed.

Related

Having trouble installing numpy on Ubuntu 18.04

At first, I was trying to install evo (a package for SLAM research) from source and I encountered an error:
ModuleNotFoundError: No module named 'numpy'
So then I tried to install numpy using pip install numpy. However I encountered another error:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
Finally, I tried to install python-dev using sudo apt-get install python-dev, and I found out it has been installed already. So I don't know where the problem is.
My default python version is 3.8.16
Could anyone help me with this issue?
maybe conda could install it?
conda install -c anaconda numpy
it isn't generally ideal to mix conda and pip, but it should still install numpy successfully.
Run pip3 install --upgrade pip and try again.
If it doesn't work, try sudo apt-get install pypy-dev instead of python-dev.
You can also try sudo apt-get install python3-numpy

How to install infomap module in anaconda(python3.8) on win10?

I need to use the InfoMap module(https://github.com/mapequation/infomap) for graph clustering, installed with pip.
1.First,I installed a windows subsystem for Linux on Win10. https://learn.microsoft.com/en-us/windows/wsl/install-win10#manual-installation-steps
2.Then installed pip and pip3 in Ubuntu.
sudo apt-get -y update
sudo apt-get install python3-pip
sudo apt-get install python-pip
3.Then installed gcc in Ubuntu.
sudo apt install gcc
4.Then installed infomap 1.3.0(https://pypi.org/project/infomap/) in Ubuntu.
pip install infomap
The infomap module was installed successfully, the path is:/home/xc1996/.local/lib/python3.8/site-packages (1.3.0)
5.My anaconda modules packages path is F:\Users\xc\anaconda3\Lib\site-packages on Win10.
Now,my anaconda(python3.8) on win10 can't find this module.
6.In order to install it on my anaconda's path,i also tried
sudo pip3 install infomap --target=/mnt/f/Users/xc/anaconda3/Lib/site-packages
Now,my anaconda(python3.8) on win10 also can't find this module,don't know which step is wrong.How to install it correctly?
You are saying that you need to use infomap module present in github.com
1]First install git in your PC.
2]go to the link *https://github.com/mapequation/infomap*
3]on the github page copy this link in code button or copy the below link
4]the link is this *https://github.com/mapequation/infomap.git*
5]copy the above link
6]open the cmd in your windows and type the below command
7]git clone *https://github.com/mapequation/infomap.git*
8]You are done

Installing pyPdf library module in kali linux to work on Pdf files

How to install pyPdf module in my kali linux ?
I tried with $sudo apt-get install python-pyPdf
getting the error as
E:unable to locate the package python-pyPdf
You are trying to install a Python package using Linux native package management system. It won't work. I believe you have Python and pip installed in Kali. Try,
pip install PyPdf
Update for Kali 2020v4 to solve that issue:
Run
sudo bash
apt-get update
apt-get upgrade
First, check if you have pip3 previously installed
pip3
If the output is command not found then:
apt-get install python3-pip
After having it installed or if you have a pip3 previously installed, run the following command.
pip3 install PyPDF3

Install package paho-mqtt

I am trying to install paho-mqtt package for my python project. But it gives the error
Error: Python packaging tool 'pip' not found.
I am using ubuntu 16.04 and I am running this command
pip install paho-mqtt
Can anyone tell me is there another way to install this?
Install pip first, if using python2
sudo apt-get install python-pip
or for python3
sudo apt-get install python3-pip
Python uses pip to install various Python modules like request, jsonpickel etc.
So you need to install pip first as said by #Asoul

Can't install zbar

I am trying to use the qrtools module with Python 3.4.2 on my Raspberry Pi 2, however it cannot run as I don't have the zbar module installed.
Trying
pip-3.2 install zbar
Gives the error message shown in the picture
sudo pip-3.2 install zbar
gives a similar error
Any ideas?
(I do have it installed with Python 2.7)
UPDATE: Both libzbar-dev and python3-dev are up to date. Still...
No module named 'zbar'
assuming you're using a debian derivative (like ubuntu), you need to install zbar's developement package, which contains the header file zbar.h
$ sudo apt-get install libzbar-dev
for redhat/fedora systems:
$ sudo yum install zbar-devel
and probably python's dev package too:
$ sudo apt-get install python3-dev
or you can use pip install zbar-py
https://pypi.org/project/zbar-py/
Try the following code after entering sudo mode:
yum install zbar-devel
This should work for fedora.
Bumping #herve solution
On ubuntu and on Mint
sudo apt-get install python-zbar libzbar-dev python-qrtools
pip install libzbar-cffi==0.2.1

Categories