An attempt to install an evdev equivalent fails:
Users-MacBook-Air:~ user$ sudo pip install hidapi
The directory '/Users/user/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/user/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting hidapi
Could not fetch URL https://pypi.python.org/simple/hidapi/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) - skipping
Could not find a version that satisfies the requirement hidapi (from versions: )
No matching distribution found for hidapi
Second attempt with -H flag
Users-MacBook-Air:~ user$ sudo -H pip install hidapi
Could not fetch URL https://pypi.python.org/simple/hidapi/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) - skipping
Could not find a version that satisfies the requirement hidapi (from versions: )
No matching distribution found for hidapi
The TLSV1 error is because the interpreter does not support TLS v1.2, you must upgrade your interpreter. To diagnose the your TLS version:
python -c "import json, urllib2; print json.load(urllib2.urlopen('https://www.howsmyssl.com/a/check'))['tls_version']"
My TLS version returned 1.0.
Questions
Is the above information enough to define the installation failure?
What tests must be performed to diagnose for corrective action?
If there is sufficient info, what is the proper corrective action?
What exactly is the 'interpreter' (part of Python? part of pip?) and how is this upgraded?
Yes. An installation failure just means it didn't install so the one true test would be trying to import the module and it failing.
Simply installing should be a fine test as long as you can see most or all of the error log.
It seems like you don't have access to the Computer's Pip directory which can be solved by adding the --user flag. And Pip also can't find the name of your requested module. Either because it's not on PyPi or because an internet/https issue Make sure it's on PyPi or install from a .whl file, which can be found for most modules by googling.
Related
I am attempting to install OCaml via the OCaml opam package manager on MacOs. I have successfully installed opam via homebrew. Initiating the package manager with opam init yields the following error:
[ERROR] Could not update repository "default":
OpamDownload.Download_fail(_, "Curl failed: \"/usr/bin/curl
--write-out %{http_code}\\\\n --retry 3 --retry-delay 2
--user-agent opam/2.1.0 -L -o
/private/var/folders/c_/6splkz692w16x82lzgnsxgfr0000gn/T/opam-57814-6b2069/index.tar.gz.part
-- https://opam.ocaml.org/index.tar.gz\" exited with code 60")
[ERROR] Initial download of repository failed.
What can I do to facilitate successful connection to the repository and initialise opam?
This error message indicates that curl is unable to establish the authenticity of the peer, i.e., https://opam.ocaml.org
This could happen because the certificates on either side are outdated. We can easily check if opam.ocaml.org is up-to-date, using one of the available online SSL checkers, e.g., this one says that they are OK. So it looks like that the problem is on your side.
First of all, you should try using your operating system upgrading options to get everything up-to-date.
If it is not an option, then you can use the --insecure option that you can pass using the OPAMFETCH environment variables. Or you can download the corresponding certificates and store a path to them in the ~/.curlrc, look here for more information.
I had the same problem and solved it by first running brew install wget and then opam init, which suddenly worked.
I ran into the same issue and I found a workaround on the OCaml forum: here. (Credits to UnixJunkie)
You can run:
opam init github git+https://github.com/ocaml/opam-repository.git
This should avoid the certificate issues.
I tried to use ivg's solution but must have made a mistake in moving the .pem files, so I couldn't get that solution to work. The workaround was quick.
Update
The reason opam init failed for me was because curl was installed with snap on my system.
Try to run opam init -verbose and that could reveal more about why you ran into an error.
In my case I needed to install other things with opam and it kept failing every time. So snap uninstall curl and then sudo apt install curl fixed things. (Was only able to figure this out with help from my professor)
Install curl first.
On MacOS: brew install curl
On Debian/Ubuntu Linux (and derivations): sudo apt-get install curl
I encounter the following error when I run the script stack.sh:
Using python 3.6 to install setuptools!=24.0.0,!=34.0.0,!=34.0.1,!=34.0.2,!=34.0.3,!=34.1.0,!=34.1.1,!=34.2.0,!=34.3.0,!=34.3.1,!=34.3.2,!=36.2.0,!=48.0.0,!=49.0.0
+ inc/python:pip_install:187 : sudo -H LC_ALL=en_US.UTF-8 http_proxy= https_proxy= no_proxy= PIP_FIND_LINKS= SETUPTOOLS_SYS_PATH_TECHNIQUE=rewrite python3.6 -m pip install -c /opt/stack/requirements/upper-constraints.txt --ignore-installed 'setuptools!=24.0.0,!=34.0.0,!=34.0.1,!=34.0.2,!=34.0.3,!=34.1.0,!=34.1.1,!=34.2.0,!=34.3.0,!=34.3.1,!=34.3.2,!=36.2.0,!=48.0.0,!=49.0.0'
DEPRECATION: Constraints are only allowed to take the form of a package name and a version specifier. Other forms were originally permitted as an accident of the implementation, but were undocumented. The new implementation of the resolver no longer supports these forms. A possible replacement is replacing the constraint with a requirement.. You can find discussion regarding this at https://github.com/pypa/pip/issues/8210.
ERROR: Editable requirements are not allowed as constraints
++./stack.sh:main:752 err_trap
++./stack.sh:err_trap:530 local r=1
stack.sh failed: full log in /opt/stack/logs/stack.sh.log.2021-05-10-115040
Error on exit
And a little higher I have this warning:
Attempting uninstall: pip
Found existing installation: pip 21.1.1
Uninstalling pip-21.1.1:
Successfully uninstalled pip-21.1.1
Successfully installed pip-21.1.1
WARNING: Running pip as root will break packages and permissions. You
should install packages reliably by using venv:
https://pip.pypa.io/warnings/venv
Any idea why?
Thanks
I built MonetDB from source. After I unpack the tarball, I followed these steps:
mkdir build
cd build
cmake ..
make
sudo make install
I was able to install monetdbd and mclient, and they are both at version 11.39.7.
However, when I follow the tutorial to create a new database, mclient cannot authenticate even the default user (monetdb):
$> mclient -u monetdb -d imdb
password: (I entered 'monetdb')
server requires unknown hash 'SHA512'
What does this "server requires unknown hash 'SHA512'" mean? How can I resolve this?
p.s. I also tried to change the configuration so that it only uses MD5, but I then get a similar message: "server requires unknown hash 'MD5'".
You need to install the "openssl" library on your system. Which OS are you using?
You need the development packages: openssl-devel on RPM-based systems, libssl-dev on Debian like systems. Look also in debian/control inside the tar ball to see what is required
FYI, since the Oct2020, MonetDB/e (i.e. MonetDB embedded) doesn't require openssl, so MonetDB has dropped this requirement. However, when you use the MonetDB client-server, you need this library.
I have an old Mac mini 2006 with the following characteristics:
System Version: Mac OS X 10.5.8 (9L31a)
Kernel Version: Darwin 9.8.0
Boot Volume: Macintosh HD
on which I need to install some tools.
First of all note that I cannot use the browser because out of date and there are no software updates available from the Menu.
I need to install an old version of openCV and NodeJS tools such as nvm npm nodeExpress and few others.
However wget is not recognized as command and curl returns an error suggesting to use curl --insecure.
The command curl --insecure returns the error
curl: (35) error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
While for openCV I could download the source code in another computer and then copy it there, I cannot think of any workaround for installing the other tools (directly or with brew since the installation is done with curl).
So my question is: how to make curl work on this OSX version or at least how to update it?
EDIT1: Trying to install homebrew I first downloaded the command, copied the file in the minimac and try to execute it. The error is:
We (and Apple) do not provide support for this old version.
This installation may not succeed.
After installation, you will encounter build failures and other breakages.
Please create pull-requests instead of asking for help on Homebrew's
GitHub, Discourse, Twitter or IRC. As you are running this old version,
you are responsible for resolving any issues you experience.
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
Press RETURN to continue or any other key to abort
==> Downloading and installing Homebrew...
curl: (35) error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
gzip: stdin: unexpected end of file
/usr/bin/tar: Child returned status 1
/usr/bin/tar: Error exit delayed from previous errors
Failed during: /bin/bash -o pipefail -c '/usr/bin/curl -fsSLk https://github.com/Homebrew/brew/tarball/master | /usr/bin/tar xz -m --strip 1'
I haven't tested this, but you might be able to run a web proxy that'd accept old-version TLS (https) connections (like v10.5's curl knows how to do) and then make newer-version TLS connections out to the web server. See the question Can I use Squid to upgrade client TLS connections? for info on how to configure squid's settings to do this. Squidman is downloadable with plain http, and includes a prebuilt copy of squid (along with a GUI setup/wrapper application). Squidman v3.1 was the last to support OS X v10.5, and I don't know what versions of TLS that'll support.
In OS X, there are sort of two different ways to configure client software to use a proxy. For GUI apps (browsers, etc), you make the relevant settings in System Preferences -> Network pane -> select the relevant service/interface -> Advanced button -> Proxy tab. For CLI tools like curl, you can generally either pass explicit options to them (probably won't work here), or set environment variables e.g. export HTTPS_PROXY=https://127.0.0.1:8080.
If you can upgrade OS X to v10.6, the builtin version of curl is still pretty limited, but you'll be able to run newer version of Squidman (though not necessarily the latest -- it supports v10.6, but only 64-bit Intel CPUs). Apple apparently still sells OS X v10.6 on DVD through their online store. Note that they also list newer versions, but all they get you is a download code to use in the App Store... which wasn't added until v10.6.6.
I am running OSX Sierra 10.12.6 on a macbook pro
There's known bug in pip 10.0.0b1 that causes a Trap: 5 when you try to install anything. This also prevents you from updating pip itself to 10.0.0b2, which supposedly fixes this bug.
So - I uninstalled pip, thinking I'd go back to easy_install to get the latest - BUT NOOOO! (sound of grinding teeth here ...)
This is what I get:
(** start console output)
sudo easy_install pip
Password:
Searching for pip
Reading https://pypi.python.org/simple/pip/
Download error on https://pypi.python.org/simple/pip/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) -- Some packages may not be found!
Couldn't find index page for 'pip' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) -- Some packages may not be found!
No local packages or download links found for pip
error: Could not find suitable distribution for Requirement.parse('pip')**
(** end console output)
I'm trying to avoid uninstalling and reinstalling everything pythonic.
The output above seems to indicate a problem with SSL/TLS versions, but it doesn't tell me enough to figure what.
Any help? I can't believe that MAC OSX doesn't support the proper SSL/TLS versions. I think that message is a red herring (or a 'frog with no legs' if you get that reference)
TIA
It's because of the deprecated TLSv1; so you have to install pip in a more round-abount way.
#You may need to do this as user root:
curl https://bootstrap.pypa.io/get-pip.py | python
#to confirm it is working:
pip install --upgrade pip
This is based on the solution in Not able to install Python packages [SSL: TLSV1_ALERT_PROTOCOL_VERSION]