Errors installing pygit2 on CentOs - python

I am trying to install pygit2 on Centos and am getting the following error
I would be grateful if anyone could suggest what may be wrong
thanks
You are using pip version 7.1.0, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting pygit2
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Using cached pygit2-0.25.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-uSxy32/pygit2/setup.py", line 60, in <module>
from _run import ffi, preamble, C_KEYWORDS
File "pygit2/_run.py", line 72, in <module>
ffi.cdef(C_HEADER_SRC)
File "/usr/lib64/python2.6/site-packages/cffi/api.py", line 97, in cdef
self._parser.parse(csource, override=override)
File "/usr/lib64/python2.6/site-packages/cffi/cparser.py", line 154, in parse
self._internal_parse(csource)
File "/usr/lib64/python2.6/site-packages/cffi/cparser.py", line 159, in _internal_parse
ast, macros = self._parse(csource)
File "/usr/lib64/python2.6/site-packages/cffi/cparser.py", line 126, in _parse
self.convert_pycparser_error(e, csource)
File "/usr/lib64/python2.6/site-packages/cffi/cparser.py", line 148, in convert_pycparser_error
raise api.CDefError(msg)
cffi.api.CDefError: cannot parse "typedef int64_t git_time_t;"
:640: Multiple type specifiers with a type tag
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-uSxy32/pygit2

Looking at https://github.com/libgit2/pygit2/issues/470 it looks like you need to first run:
pip install --upgrade pip
pip upgrade pycparser

Related

(raspberrypi) "pandas" Requirement already satisfied, but No module named 'pandas', when I use it

(raspberrypi) "pandas" Requirement already satisfied, but No module named 'pandas', when I run python script ("import pandas as pd")
I use raspberrypi 4 ; 32 bit, linux run python
I run: in virtual environment
(venv) joy#raspberrypi: sudo pip install pandas
(venv) joy#raspberrypi: ython excel_to_mDB.py
(venv) joy#raspberrypi:/media/joy/DATA $ sudo pip install pandas
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: pandas in /usr/lib/python3/dist-packages (1.1.5)
(venv) joy#raspberrypi:/media/joy/DATA $ python excel_to_mDB.py
Traceback (most recent call last):
File "/media/joy/DATA/excel_to_mDB.py", line 3, in <module>
import pandas as pd
ModuleNotFoundError: No module named 'pandas'
solving on process:
after I do pip install pandas
(venv) joy#raspberrypi:/media/joy/DATA $ pip install pandas
(venv) joy#raspberrypi:/media/joy/DATA $ python excel_to_mDB.py
(venv) joy#raspberrypi:/media/joy/DATA $ pip install pandas
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pandas
Using cached pandas-1.5.1.tar.gz (5.2 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [53 lines of output]
Traceback (most recent call last):
File "/tmp/pip-build-env-d93of2e3/overlay/lib/python3.9/site-packages/numpy/core/__init__.py", line 22, in <module>
from . import multiarray
File "/tmp/pip-build-env-d93of2e3/overlay/lib/python3.9/site-packages/numpy/core/multiarray.py", line 12, in <module>
from . import overrides
File "/tmp/pip-build-env-d93of2e3/overlay/lib/python3.9/site-packages/numpy/core/overrides.py", line 7, in <module>
from numpy.core._multiarray_umath import (
ImportError: libcblas.so.3: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/joy/myproject/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
main()
File "/home/joy/myproject/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/joy/myproject/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-d93of2e3/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/tmp/pip-build-env-d93of2e3/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-d93of2e3/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 483, in run_setup
super(_BuildMetaLegacyBackend,
File "/tmp/pip-build-env-d93of2e3/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 335, in run_setup
exec(code, locals())
File "<string>", line 18, in <module>
File "/tmp/pip-build-env-d93of2e3/overlay/lib/python3.9/site-packages/numpy/__init__.py", line 140, in <module>
from . import core
File "/tmp/pip-build-env-d93of2e3/overlay/lib/python3.9/site-packages/numpy/core/__init__.py", line 48, in <module>
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
* The Python version is: Python3.9 from "/home/joy/myproject/venv/bin/python"
* The NumPy version is: "1.19.3"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: libcblas.so.3: cannot open shared object file: No such file or directory
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
(venv) joy#raspberrypi:/media/joy/DATA $ python excel_to_mDB.py
Traceback (most recent call last):
File "/media/joy/DATA/excel_to_mDB.py", line 3, in <module>
import pandas as pd
ModuleNotFoundError: No module named 'pandas'
You are installing the pandas using the command sudo pip install pandas which will install pandas into the root folder /usr/lib/python3/dist-packages see the logs in your command. You need to install pandas into the virtual environment. So install pandas without sudo.
pip install pandas

Having difficulty installing pygames to python

I'm still a novice to all the advanced parts of coding. i have the 3.9.11 version of python installed. Whenever i install Pygames, I always get this result below. Any way that i could resolve this? thanks!
C:\\Users\\username\>pip install pygame==2.0.0.dev14
Collecting pygame==2.0.0.dev14
Downloading https://files.pythonhosted.org/packages/4e/f6/9031970fbd0cabb02842a68b6bd2defc55f4c1409e76712dd32c4d6e46cf/pygame-2.0.0.dev14.tar.gz (5.6MB)
100% |################################| 5.6MB 74kB/s
c:\\users\\username\\appdata\\local\\programs\\python\\python35\\lib\\site-packages_distutils_hack\__init_\_.py:18: UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.
"Distutils was imported before Setuptools, but importing Setuptools "
c:\\users\\username\\appdata\\local\\programs\\python\\python35\\lib\\site-packages_distutils_hack\__init_\_.py:30: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
Exception:
Traceback (most recent call last):
File "c:\\users\\username\\appdata\\local\\programs\\python\\python35\\lib\\site-packages\\pip\\basecommand.py", line 211, in main
status = self.run(options, args)
File "c:\\users\\username\\appdata\\local\\programs\\python\\python35\\lib\\site-packages\\pip\\commands\\install.py", line 294, in run
requirement_set.prepare_files(finder)
File "c:\\users\\username\\appdata\\local\\programs\\python\\python35\\lib\\site-packages\\pip\\req\\req_set.py", line 334, in prepare_files
functools.partial(self.\_prepare_file, finder))
File "c:\\users\\username\\appdata\\local\\programs\\python\\python35\\lib\\site-packages\\pip\\req\\req_set.py", line 321, in \_walk_req_to_install
more_reqs = handler(req_to_install)
File "c:\\users\\username\\appdata\\local\\programs\\python\\python35\\lib\\site-packages\\pip\\req\\req_set.py", line 505, in _prepare_file_
abstract_dist.prep_for_dist()
File "c:\\users\\username\\appdata\\local\\programs\\python\\python35\\lib\\site-packages\\pip\\req\\req_set.py", line 123, in prep_for_dist
self.req_to_install.run_egg_info()
File "c:\\users\\username\\appdata\\local\\programs\\python\\python35\\lib\\site-packages\\pip\\req\\req_install.py", line 376, in run_egg_info
self.setup_py, self.name,
File "c:\\users\\username\\appdata\\local\\programs\\python\\python35\\lib\\site-packages\\pip\\req\\req_install.py", line 347, in setup_py
import setuptools # noqa
File "c:\\users\\username\\appdata\\local\\programs\\python\\python35\\lib\\site-packages\\setuptools\__init_.py", line 8, in \<module\>
import _distutils_hack.override # noqa: F401_
File "c:\\users\\username\\appdata\\local\\programs\\python\\python35\\lib\\site-packages_distutils_hack\\override.py", line 1, in \<module\>
__import__('_distutils_hack').do_override()_
File "c:\\users\\username\\appdata\\local\\programs\\python\\python35\\lib\\site-packages_distutils_hack\__init_.py", line 72, in do_override
ensure_local_distutils()
File "c:\\users\\username\\appdata\\local\\programs\\python\\python35\\lib\\site-packages_distutils_hack\__init_.py", line 59, in ensure_local_distutils
assert '\_distutils' in core.__file__, core.__file__
AssertionError: c:\\users\\username\\appdata\\local\\programs\\python\\python35\\lib\\distutils\\core.py
You are using pip version 7.1.2, however version 22.0.4 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
First things first, upgrade your pip putting this in your cmd: python -m pip install --upgrade pip. Why are you installing lower version of pygame? Also if you don't have a specific reason to use python 3.9, you can install python 3.10. If that doesn't work, try reinstalling python so it reinstalls the pip and then try again.

Getting "ERROR: Double requirement given: setuptools" error in zappa

I tried to deploy my Flask app with zappa==0.52.0, but I get an error as below;
ERROR: Double requirement given: setuptools (already in setuptools==52.0.0.post20210125, name='setuptools')
WARNING: You are using pip version 20.2.3; however, version 21.1.3 is available.
You should consider upgrading via the '/Users/yoonshinkwark/Documents/JBR_reco_local_2/JBR_reco_API_2/dola-aldagram/aws-flask38/bin/python3.8 -m pip install --upgrade pip' command.
Oh no! An error occurred! :(
Traceback (most recent call last):
File "/Users/yoonshinkwark/opt/anaconda3/lib/python3.8/site-packages/zappa/cli.py", line 3422, in handle
sys.exit(cli.handle())
File "/Users/yoonshinkwark/opt/anaconda3/lib/python3.8/site-packages/zappa/cli.py", line 588, in handle
self.dispatch_command(self.command, stage)
File "/Users/yoonshinkwark/opt/anaconda3/lib/python3.8/site-packages/zappa/cli.py", line 630, in dispatch_command
self.deploy(self.vargs["zip"], self.vargs["docker_image_uri"])
File "/Users/yoonshinkwark/opt/anaconda3/lib/python3.8/site-packages/zappa/cli.py", line 852, in deploy
self.create_package()
File "/Users/yoonshinkwark/opt/anaconda3/lib/python3.8/site-packages/zappa/cli.py", line 2760, in create_package
venv=self.zappa.create_handler_venv(),
File "/Users/yoonshinkwark/opt/anaconda3/lib/python3.8/site-packages/zappa/core.py", line 513, in create_handler_venv
raise EnvironmentError("Pypi lookup failed")
OSError: Pypi lookup failed
The version of Python is 3.8.8.
There is already an issue in the zappa github:
https://github.com/zappa/Zappa/issues/995
The problem is that zappa adds setup-tools to its dependencies but the latest release of pip-tools (6.2.0) does the same now.
As a quick fix, you can pin pip-tools to version 6.1.0 in your requirements.txt

pip installation error when installing a package

So, I'm currently trying to install this package:
pip install git+https://github.com/Rapptz/discord.py#async
Github here: https://github.com/Rapptz/discord.py
but I get this error:
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-khtOce/aiohttp/setup.py", line 61, in <module>
raise RuntimeError("aiohttp requires Python 3.4.1+")
RuntimeError: aiohttp requires Python 3.4.1+
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-khtOce/aiohttp/
So instead I have tried using pip3 to install the same package, but I'm currently getting a version conflict which I do not know how to solve.
Traceback (most recent call last):
File "/usr/local/bin/pip3", line 9, in <module>
load_entry_point('pip==8.1.1', 'console_scripts', 'pip3')()
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.14- py2.7.egg/pkg_resources.py", line 305, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.14-py2.7.egg/pkg_resources.py", line 2243, in load_entry_point
raise ImportError("Entry point %r not found" % ((group,name),))
ImportError: Entry point ('console_scripts', 'pip3') not found
I remember doing this yesterday, and I may have toyed around installing and reinstalling pip, but before, when I tried to install the same package when pip3 was working, I still remember getting the same error, so idk if solving the version conflict will do much.
I think you have a setuptools conflict here which will probably be resolved by updating setuptools.
Try:
pip install setuptools --upgrade
You can remove the previous setuptools installation in case it gives you a problem.

Python 3.5.1 Cannot download Robot Framework library

I'm new to Python and I'm trying to automate a test with Robot Framework. When I tried downloading the library via pip I ran into some issues.
I'm using Python 3.5.1, Robot Framework 3.0, PyCharm 2016.1(64),
Output for command pip install robotframework-selenium2library:
Collecting robotframework-selenium2library
Using cached robotframework-selenium2library-1.7.4.tar.gz
Complete output from command python setup.py egg_info:
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz
Extracting in C:\Users\Radek\AppData\Local\Temp\tmpooendh2g
Traceback (most recent call last):
File "c:\users\radek\appdata\local\programs\python\python35\lib\site-packages\ez_setup.py", line 143, in use_setuptools
raise ImportError
ImportError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Radek\AppData\Local\Temp\pip-build-gh4jw21a\robotframework-selenium2library\setup.py", line 8, in <module>
use_setuptools()
File "c:\users\radek\appdata\local\programs\python\python35\lib\site-packages\ez_setup.py", line 145, in use_setuptools
return _do_download(version, download_base, to_dir, download_delay)
File "c:\users\radek\appdata\local\programs\python\python35\lib\site-packages\ez_setup.py", line 125, in _do_download
_build_egg(egg, tarball, to_dir)
File "c:\users\radek\appdata\local\programs\python\python35\lib\site-packages\ez_setup.py", line 99, in _build_egg
_extractall(tar)
File "c:\users\radek\appdata\local\programs\python\python35\lib\site-packages\ez_setup.py", line 467, in _extractall
self.chown(tarinfo, dirpath)
TypeError: chown() missing 1 required positional argument: 'numeric_owner'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Radek\AppData\Local\Temp\pip-build-gh4jw21a\robotframework-selenium2library\
Setuptools are up-to-date, so is ez_setup
C:\Users\Radek>pip install --upgrade setuptools
Requirement already up-to-date: setuptools in c:\users\radek\appdata\local\programs\python\python35\lib\site-packages
C:\Users\Radek>pip install ez_setup
Requirement already satisfied (use --upgrade to upgrade): ez-setup in c:\users\radek\appdata\local\programs\python\python35\lib\site-packages
Selenium2Library is not (yet) compatible with Python 3.x.
We have a Pull Request (github.com/robotframework/Selenium2Library/pull/564) to have Selenium2Library compatible with all Python versions, but it is not in the official Release, and it was tested with Python 2.6, 2.7 and 3.4.
I you want to install you could try github.com/HelioGuilherme66/robotframework-selenium2library/releases/tag/v1.8.0b1
For example with:
pip install -U --pre https://github.com/HelioGuilherme66/robotframework-selenium2library/archive/v1.8.0b1.zip

Categories

Resources