python pip install error language_check - python-2.7

When I am trying to install sudo pip install language_check
I got this error:
Collecting language_check
Downloading language-check-1.0.tar.gz
Complete output from command python setup.py egg_info: zip_safe flag not set; analyzing archive contents...
Installed /tmp/pip-build-_cYgOq/language-check/.eggs/3to2-1.1.1-py2.7.‌​
egg error in language-check setup command: package_data must be a dictionary
mapping package names to lists of wildcard patterns
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-_cYgOq/language-check/

It's a bug in language-check. They fixed it at 23 March but didn't include in any release yet (release 1.0 was from 21 March).
Download the sources from Github and install with
python setup.py install

I believe that if you install the latest version of Python, python3.6.2 it should work.

git clone -b patch-1 https://github.com/SpartorA/language-check.git
python setup.py install
Above will work

I was able to successfully install language-check in my Python 3.7 environment on MacOS as follows:
Check Java installation :
for language-check, Java 8 is expected
For MacOS: Follow these steps : https://stackoverflow.com/a/24657630
Install language-check
pip install language-check, won't directly work, you would have to:
Install from a forked & fixed repo for language-check
pip install git+https://github.com/MCFreddie777/language-check.git

Related

Trying to install Pyramid package with "python setup.py install" gives error searching for a package

I'm working on a Pyramid project that has to be deployed in a Debian 7 server.
The Debian 7 server has the python version 2.7.3 as from the archives repositories.
After creating a virtual environment with virtualenv command the pip version installed in this virtualenv is 1.1.
First thing noted: I can't upgrade pip with pip install --upgrade pip. The version is not updated and remains in 1.1 version.
After installing the OS packages needed to install the project I ran python setup.py install but I get the error:
Searching for zipp==0.5
Reading http://pypi.python.org/simple/zipp/
Couldn't find index page for 'zipp' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for zipp==0.5
error: Could not find suitable distribution for Requirement.parse('zipp==0.5')
So, the python setup.py install command could not recognize the zipp package.
I thought that this was related to the older version of pip (1.1). So I could update pip version successfully using the index-url option:
$ pip install --index-url https://pypi.python.org/simple --upgrade pip
That updated pip version from 1.1 to 20.3b1. Then I tried python setup.py install again, but the same error occurred.
What I could see is that, after updating pip version, the zipp==0.5.0 package is installed if I ran pip install zipp==0.5.
I'm new to Pyramid and the package installing using the setup.py module. I'm not understanding why I can install the zipp package with pip and can't with python setup.py install.
I'm not putting the content of setup.py here because I think it's not a problem of the setup.py script. With more recent versions of python and pip in an Ubuntu 18.04 machine the setup.py works like a charm.
Someone could explain how to solve this issue?
When you run python setup.py install directly, you are not using pip, so the version of pip you have installed is irrelevant. This command is antiquated, should not be used, etc, etc. The right answer is to use pip install . as a replacement for python setup.py install and to use pip install -e . as a replacement for python setup.py develop.
With respect to what you're seeing, when you run python setup.py install this using the version of easy_install bundled with setuptools to talk to PyPI and install dependencies. This should be avoided for a lot of reasons but just know that to override urls it uses they go in ~/.pydistutils.cfg and have nothing to do with pip. HTTPS is one problem that you looked at, another is that old versions of Python do not have the right CA trust store, nor support the minimum required TLS 1.2 to handshake with PyPI. So expect lots of problems using old tools - at the very least try to use pip instead of easy_install.

Cythonizing sklearn/_isotonic.pyx failed

I'm trying to install the OCRF-Examples (https://github.com/ngoix/OCRF).
The installation instructions said:
conda create -n OCRF_env python=2.7 anaconda
source activate OCRF_env
conda install -n OCRF_env numpy scipy cython matplotlib
git clone https://github.com/ngoix/OCRF
cd OCRF
pip install --upgrade pip
pip install pyper
python setup.py install
I was able to run all the commands of the installation instructions without any problems - except for the last one:
python setup.py install
Here I got this error:
Cython is installed with the latest version (0.29.13) and no other Cython versions are installed.
If relevant: I already had Python 3.6.9 installed on my Macbook. Due to the OCRF installation, I now have Python 2.7. as additional environment.
Am I doing something wrong?

ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-YYFUnW/psycopg2/

I'm trying to install requirements.txt file in python 2.7 in ubuntu but i get ERROR:
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-YYFUnW/psycopg2/
What exactly does that mean, and how do I fix it? I already tried these commands:
apt-get install python-bs4
sudo install --upgrade setuptools
sudo apt-get update
Error Image :
This error can occur because of the version of psycopg2==2.6.2 you are trying to install. I did face this error while installing this version of psycopg2. So to avoid this error, you can use another version of it or the latest version as:
pip install psycopg2
Also, psycopg2 is going to be renamed from release of version 2.8, so it is recommended to install it using:
pip install psycopg2-binary
If you are installing psycopg2 from a requirements.txt file, you can comment out the package listed in the file as:
# psycopg2==2.6.2
Then install the package as suggested above, then install other requirements from the file with the package name still commented.

Command "python setup.py egg_info" failed with error code 1 in PATH/psycopg2

I needed to upgrade PostgreSQL from version 9.5 to version 11. After that, when I recreated my virtualEnv from a 'requirements.txt' file, I started giving the following error when installing the psycopg2 package:
Collecting psycopg2 == 2.6.2 (from -r conf/requirements.txt (line 50))
  Using cached https://files.pythonhosted.org/packages/7b/a8/dc2d50a6f37c157459cd18bab381c8e6134b9381b50fbe969997b2ae7dbc/psycopg2-2.6.2.tar.gz
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info/psycopg2.egg-info
    writing pip-egg-info/psycopg2.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
    writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
    Error: could not determine PostgreSQL version from '11 .1 '
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-0Q7bhV/psycopg2/
After some research, I ran the following commands to try to solve, but it did not work:
sudo apt-get install postgresql-server-dev-all
sudo apt-get install postgresql-common
Finally, I noticed that version 2.6.2 of psycopg2 only supports version 9.5 of postgresql. For 11 you should use the latest version of psycopg2, that is, version 2.7.7. After you change the requirements.txt file, and the virtualEnv has been recreated correctly.
I hope it will be useful to others.
Go for this Command Python3 - sudo apt install libpq-dev python3-dev

Pip installation bug

So I tried to install pip using the get-pip.py file, and when I ran the file, terminal told me I already had pip installed on 2.7. However, when I try to find the version of my pip, terminal tells me pip doesn't exist and points to a version of 3.5 I have installed. Clearly my issue is that I have pip installed on v2.7 but the pip command is linked to v3.5. Any clues on how to fix?
Here's a picture of my terminal output:
To install a package in a particular version of python, use the following commands always:
For python 2.x:
sudo python -m pip install [package]
For python 3.x:
sudo python3 -m pip install [package]
This should resolve the doubt of which python version is the given package getting installed for.
Note: This is assuming you have not created aliases for the python command