How do I install langid python library from github? - python

I have attempted the following:
sudo pip install git+https://github.com/saffsd/langid.py.git
However I get the following error.
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
However both python-dev and numpy are already installed.
selah#selah-OptiPlex-9020:~$ dpkg -s python-numpy
Package: python-numpy
Status: install ok installed
...
and
selah#selah-OptiPlex-9020:~$ dpkg -s python-dev
Package: python-dev
Status: install ok installed
...
Any ideas of what I could try next?

Install langid's dependencies and directly the version 1.1.4 from pypy
sudo pip install https://pypi.python.org/packages/source/l/langid/langid-1.1.4dev.tar.gz

Related

No matching distribution found for botocore<1.22.0,>=1.21.0 (from awsebcli)

CircleCi returns the following error:
No matching distribution found for botocore <1.22.0,> = 1.21.0 (from awsebcli).
My config.yml file installs the following dependencies:
sudo apt-get -y -qq update
sudo apt-get install python3-pip python-dev build-essential
sudo pip3 install --upgrade setuptools
sudo pip3 install awsebcli --upgrade pip3 install awscli
In my case, the issue is that I have two python versions installed. So using python3 worked smoothly
python3 ./aws-elastic-beanstalk-cli-setup/scripts/ebcli_installer.py
These commands work for me:
- apt-get update && apt-get install -y python-dev
- apt install python3 -y
- apt install python3-pip -y
- export LC_ALL=C.UTF-8
- pip3 install awsebcli --upgrade
This issue has been raised upstream. The suggested workaround from there is sudo pip3 install awsebcli botocore==1.19.63 --upgrade.
If you are working on a docker container provided by aws: FROM amazon/aws-cli the python version is: 2.7.18
In that case, if you see this error:
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.
I used this to fix it:
pip install awsebcli botocore==1.19.63 --upgrade --use-feature=2020-resolver
1.19.63 could be different in your case

How to install python packages like pip, numpy on Amazon EC2 - ubuntu

Need to install python packages like pip, numpy, cv2 on an Amazon EC2 instance of Ubuntu. I tried using sudo apt-get install python-pip but got below given error:
ubuntu#ip-172-31-35-131:~$ sudo apt-get install python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-pip
Try first sudo apt-get update then
sudo apt-get install python-pip
Have you tried the instructions here?
You can install pip from PyPa directly:
curl -O https://bootstrap.pypa.io/get-pip.py
python get-pip.py --user
Your system may have a concurrent python3.x under the name python3, then you can install pip for it with python3 get-pip.py --user as well. (Or contrarily, python2.x under the name python2.)

Kivy Installation via Makefile

I'm tearing what's left of my hair out trying to figure out how to install Kivy on Linux. I'm a newb to pretty much everything, so not incredibly surprising, but I'm trying to make a Makefile that will install the necessary dependencies for my app that I build via Kivy.
This is my Makefile:
#!/bin/sh
all: packages program
packages:
sudo apt-get install python3-kivy
sudo apt-get install python3-pip
sudo apt-get install python-setuptools python-dev build-essential
sudo apt-get install python3-dev
sudo apt-get docutils-doc python3-pygame python-pil-doc python3-pil-dbg ttf-bitstream-vera
sudo easy_install pip
sudo apt-get -f install
pip install --upgrade pip
pip3 install python3-weather-api
sudo pip install requests
pip3 install beautifulsoup4
pip3 install Cython
pip3 install h5py
pip3 install kivy
program:
python3 project.py
This is the output:
sudo apt-get install python3-kivy
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-kivy is already the newest version (1.10.0-0~stable0+201708191146~pkg175~ubuntu16.04.1).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
python3-kivy : Depends: python3-kivy-common (= 1.10.0-0~stable0+201708191146~pkg175~ubuntu16.04.1) but it is not going to be installed
Depends: python3-kivy-bin (= 1.10.0-0~stable0+201708191146~pkg175~ubuntu16.04.1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Makefile:5: recipe for target 'packages' failed
It keeps saying to run apt-get -f install, which I did, but the same error keeps popping up.

transifex Error cannot import name six

I download and install the transifex with several steps but I always get Error cannot import name six:
apt-get install python-dev
apt-get install gcc make
install python python-setuptools python-imaging
easy_install transifex
easy_install pip
pip install django-celery
How can I run the transifex without error?
I had the same problem. In my case, there were some unneeded libraries floating around that got in the way, and sudo apt autoremove fixed it. I was also missing urllib3.exceptions, which I installed with pip install urllib3.

Installing SciPy with pip

It is possible to install NumPy with pip using pip install numpy.
Is there a similar possibility with SciPy? (Doing pip install scipy does not work.)
Update
The package SciPy is now available to be installed with pip!
Prerequisite:
sudo apt-get install build-essential gfortran libatlas-base-dev python-pip python-dev
sudo pip install --upgrade pip
Actual packages:
sudo pip install numpy
sudo pip install scipy
Optional packages:
sudo pip install matplotlib OR sudo apt-get install python-matplotlib
sudo pip install -U scikit-learn
sudo pip install pandas
src
An attempt to easy_install indicates a problem with their listing in the Python Package Index, which pip searches.
easy_install scipy
Searching for scipy
Reading http://pypi.python.org/simple/scipy/
Reading http://www.scipy.org
Reading http://sourceforge.net/project/showfiles.php?group_id=27747&package_id=19531
Reading http://new.scipy.org/Wiki/Download
All is not lost, however; pip can install from Subversion (SVN), Git, Mercurial, and Bazaar repositories. SciPy uses SVN:
pip install svn+http://svn.scipy.org/svn/scipy/trunk/#egg=scipy
Update (12-2012):
pip install git+https://github.com/scipy/scipy.git
Since NumPy is a dependency, it should be installed as well.
In Ubuntu 10.04 (Lucid), I could successfully pip install scipy (within a virtualenv) after installing some of its dependencies, in particular:
$ sudo apt-get install libamd2.2.0 libblas3gf libc6 libgcc1 libgfortran3 liblapack3gf libumfpack5.4.0 libstdc++6 build-essential gfortran libatlas-sse2-dev python-all-dev
To install scipy on windows follow these instructions:-
Step-1 : Press this link http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy to download a scipy .whl file (e.g. scipy-0.17.0-cp34-none-win_amd64.whl).
Step-2: Go to the directory where that download file is there from the command prompt (cd folder-name ).
Step-3: Run this command:
pip install scipy-0.17.0-cp27-none-win_amd64.whl
I tried all the above and nothing worked for me. This solved all my problems:
pip install -U numpy
pip install -U scipy
Note that the -U option to pip install requests that the package be upgraded. Without it, if the package is already installed pip will inform you of this and exit without doing anything.
If I first install BLAS, LAPACK and GCC Fortran as system packages (I'm using Arch Linux), I can get SciPy installed with:
pip install scipy
On Fedora, this works:
sudo yum install -y python-pip
sudo yum install -y lapack lapack-devel blas blas-devel
sudo yum install -y blas-static lapack-static
sudo pip install numpy
sudo pip install scipy
If you get any public key errors while downloading, add --nogpgcheck as parameter to yum, for example:
yum --nogpgcheck install blas-devel
On Fedora 23 onwards, use dnf instead of yum.
For the Arch Linux users:
pip install --user scipy prerequisites the following Arch packages to be installed:
gcc-fortran
blas
lapack
Addon for Ubuntu (Ubuntu 10.04 LTS (Lucid Lynx)):
The repository moved, but a
pip install -e git+http://github.com/scipy/scipy/#egg=scipy
failed for me... With the following steps, it finally worked out (as root in a virtual environment, where python3 is a link to Python 3.2.2):
install the Ubuntu dependencies (see elaichi), clone NumPy and SciPy:
git clone git://github.com/scipy/scipy.git scipy
git clone git://github.com/numpy/numpy.git numpy
Build NumPy (within the numpy folder):
python3 setup.py build --fcompiler=gnu95
Install SciPy (within the scipy folder):
python3 setup.py install
In my case, it wasn't working until I also installed the following package : libatlas-base-dev, gfortran
sudo apt-get install libatlas-base-dev gfortran
Then run pip install scipy
install python-3.4.4
scipy-0.15.1-win32-superpack-python3.4
apply the following commend doc
py -m pip install --upgrade pip
py -m pip install numpy
py -m pip install matplotlib
py -m pip install scipy
py -m pip install scikit-learn
The answer is yes, there is.
First you can easily install numpy use commands:
pip install numpy
Then you should install mkl, which is required by Scipy, and you can download it here
After download the file_name.whl you install it
C:\Users\****\Desktop\a> pip install mkl_service-1.1.2-cp35-cp35m-win32.whl
Processing c:\users\****\desktop\a\mkl_service-1.1.2-cp35-cp35m-win32.whl
Installing collected packages: mkl-service
Successfully installed mkl-service-1.1.2
Then at the same website you can download scipy-0.18.1-cp35-cp35m-win32.whl
Note:You should download the file_name.whl according to you python version, if you python version is 32bit python3.5 you should download this one, and the "win32" is about your python version, not your operating system version.
Then install file_name.whl like this:
C:\Users\****\Desktop\a>pip install scipy-0.18.1-cp35-cp35m-win32.whl
Processing c:\users\****\desktop\a\scipy-0.18.1-cp35-cp35m-win32.whl
Installing collected packages: scipy
Successfully installed scipy-0.18.1
Then there is only one more thing to do: comment out a specfic line or there will be error messages when you imput command "import scipy".
So comment out this line
from numpy._distributor_init import NUMPY_MKL # requires numpy+mkl
in this file: your_own_path\lib\site-packages\scipy__init__.py
Then you can use SciPy :)
Here tells you more about the last step.
Here is a similar anwser to a similar question.
Besides all of these answers,
If you install python of 32bit on your 64bit machine, you have to download scipy of 32-bit irrespective of your machine.
http://www.lfd.uci.edu/~gohlke/pythonlibs/
In the above URL you can download the packages and command is: pip install
For gentoo, it's in the main repository:
emerge --ask scipy
You can also use this in windows with python 3.6 python -m pip install scipy

Categories

Resources