Why cannot pip upgrade from my private gitlab? - ssl

I cannot upgrade my package from private gitlab.
I share a project on a gitlab hosted in my company local network.
Until now, I used to simply upgrade my package with
> pip install -U myPackage
But now, pip tells me my package is up-to-date:
> pip install -U myPackage
Requirement already satisfied: myPackage in <some_windows_path> (1.16.5)
I tried to figure it out and found that pip does not search on the gitlab whereas pip show indicates the right home-page.
So I tried to force pip to take into account the gitlab with some options (--extra-index-url, --find-links).
I also tried to reinstall it from void with (git+https).
In both case I get SSL error.
Since I have no issue with git, I retrieve the certificate used by Git (git config -l) and tried to specified the certificate to pip (--cert).
But it was one more fail.
> uname -a
Windows_NT <some_machine_name> 6 3 x86
> python -V
Python 3.10.4
> pip -V
pip 22.2.2 from <some_windows_path> (python 3.10)
> git -v
git version 2.37.3.windows.1
The issue is linked to SSL certification.
Since I have no issue with Git, I guess we can exclude proxy as a cause.
I must miss something here but what?
> pip install --dry-run --client-cert <windows_path_of_git_config_http.sslcainfo> -U git+https:<gitlab_url>
Collecting git+https:<gitlab_url>
Cloning https:<gitlab_url> to c:\users\me\appdata\local\temp\pip-req-build-m6p4_4ve
Running command git clone --filter=blob:none --quiet https:<gitlab_url> 'C:\Users\me\AppData\Local\Temp\pip-req-build-m6p4_4ve'
fatal: unable to access 'https:<gitlab_url>': SSL certificate problem: unable to get local issuer certificate
error: subprocess-exited-with-error
× git clone --filter=blob:none --quiet https:<gitlab_url> 'C:\Users\me\AppData\Local\Temp\pip-req-build-m6p4_4ve' did not run successfully.
│ exit code: 128
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× git clone --filter=blob:none --quiet https:<gitlab_url> 'C:\Users\me\AppData\Local\Temp\pip-req-build-m6p4_4ve' did not run successfully.
│ exit code: 128
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.

Related

How to install p4python on Cygwin64

Trying to install p4python on Cygwin fails with
$pip install p4python
[... logs ...]
File "/tmp/pip-install-6mn3hyn3/p4python_9e95a104710b449a90a68bc227a2ee69/setup.py", line 292, in run
raise Exception("Parameter --ssl is needed")
Exception: Parameter --ssl is needed
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> p4python
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I am using Cygwin64 on Windows 10, specifically:
$ pip --version
pip 22.3 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
$ python --version
Python 3.9.10
$ which python
/usr/bin/python
I tried using the wheel files from PyPi but there is no compatible platform for Cygwin.
How can I work around this ssl dependency to install the module?
I have included libssl while installing Cygwin.
Try
python -m pip install p4python

Error intsalling tensorflow via pip install

WARNING: Failed to write executable - trying to use .deleteme logic
ERROR: Could not install packages due to an EnvironmentError: [WinError 2] The system cannot find the file specified: 'c:\python38\Scripts\chardetect.exe' -> 'c:\python38\Scripts\chardetect.exe.deleteme'
I was trying to install Tensorflow via command pip install tensorflow. and after downloading everything at the end found this error..can anyone tell me why this happened?
According to https://www.codegrepper.com/ you can use these two:
In Windows
python -m pip install -U pip --user
In Linux
pip install -U pip --user

Buildozer error while compiling apk - pip ssl

I am trying to compile a simple program into an apk for Android with Buildozer but have run into the following problem. Can you please help? I tried upgrading pip but that didn't help:python3 -m pip install --upgrade pip
So, I reverted back to the original pip version.
Installed Cython separately: pip3 install Cython
But the same issue persists. I am at a loss. :-(
Command: buildozer android debug
RAN: /bin/bash -c 'venv/bin/pip install Cython'
STDOUT:
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
How can I fix this?
Could not fetch URL https://pypi.org/simple/cython/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/cython/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement Cython (from versions: none)
ERROR: No matching distribution found for Cython
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
This is a recent bug, you need to install libssl-dev using apt install libssl-dev
Then you might also want to clean your buildozer directory by running rm -rf .buildozer in the directory that contains your buildozer.spec file.
That should do it!

pip install matplotlib fails: 'cannot build package freetype; "python setup.py egg_info" failed with error code 1'

I want to use matplotlib.pyplot. I can't because
altoidnerd#LEPTON:~/ $ pip install matplotlib
is failing on ubuntu 14 giving an egg_info error, and warning "cannot build package freetype"
* The following required packages can not be built:
* freetype
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-8UvQcW/matplotlib
But
altoidnerd#LEPTON:~/$ dpkg -L libfreetype6
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libfreetype.so.6.11.1
/usr/share
/usr/share/doc
/usr/share/doc/libfreetype6
/usr/share/doc/libfreetype6/FTL.TXT.gz
/usr/share/doc/libfreetype6/ft2faq.html
/usr/share/doc/libfreetype6/TODO
/usr/share/doc/libfreetype6/copyright
/usr/share/doc/libfreetype6/changelog.Debian.gz
/usr/share/doc/libfreetype6/pcf
/usr/share/doc/libfreetype6/pcf/README
/usr/lib/x86_64-linux-gnu/libfreetype.so.6
my debug.log is here: http://pastebin.com/rvDuYDiy
A discussion about this on github was closed last year, but I was unable to use it to solve the problem (I left a note):
https://github.com/matplotlib/matplotlib/issues/3029
I started a reddit thread too.
This did the trick for me:
sudo apt-get install libfreetype6-dev pkg-config
The following command mentioned in the github thread that you mentioned above works for me:
sudo ln -s /usr/include/freetype2/ft2build.h /usr/include/
I had a similar issue solved by:
easy_install -U pip
pip install matplotlib

lxml won't install under pypy using easy_install

When doing:
$ sudo pypy -m easy_install lxml
The response is:
Searching for lxml
[...snip...]
ERROR: /bin/sh: 1: xslt-config: not found
** make sure the development packages of libxml2 and libxslt are installed **
Using build configuration of libxslt
/usr/lib/pypy/lib-python/2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
warning: no files found matching '*.txt' under directory 'src/lxml/tests'
src/lxml/lxml.etree.c:8:22: fatal error: pyconfig.h: No such file or directory
compilation terminated.
error: Setup script exited with error: command 'cc' failed with exit status 1
At the same time, sudo pip install lxml works fine.
What's going on?
Thanks.
sudo apt-get install python-dev fixed it for me on ubuntu 13.04
$yum install python-lxml or apt-get install python-lxml
this solved mine.
I've stumbled with this trouble a couple of times.
Short answer
Python2: $ python2.7 setup.py clean build --with-cython install
Python3: $ pip-3.3 install lxml
Long answer
The hypothesis is that pip install lxml should work in every environment, regardless if you are using Python2 or Python3.
There's also Cython to be considered: You will certainly enjoy lxml compiled with Cython due to relevant performance gains.
For reasons unknown to me, the compilation on Python2 does not find Cython.
To be more precise and absolutely explicit about this matter, both commands below DO NOT employ Cython:
# DO NOT use these commands. I repeat: DO NOT use these commands.
$ pip-2.7 install lxml
$ easy_install-2.7 install lxml
So, when using Python2 you have only one alternative, as far as I know, which is: compile from sources, Luke!
# install build environment and dependencies
$ kernel_release=$( uname -r )
$ sudo apt-get install linux-headers-${kernel_release} build-essential -y
$ sudo apt-get install libxml2-dev libxslt1-dev -y
# Download from github and compile from sources
$ git clone --branch lxml-3.2.4 https://github.com/lxml/lxml
$ python2.7 setup.py clean build --with-cython install
I've handled this problem by installed Ubuntu package pypy-dev.