Unable to install dlib in anaconda - python-3.x

I am trying to install dlib in Anaconda so as to use it inside jupyter-notebook.
I tried using conda install -c menpo dlib and then dlib doesn't get installed rather it then says :
Downloading and Extracting Packages
py-boost-1.67.0 | 318 KB | ################################################################# | 100%
widgetsnbextension-1 | 1.1 MB | | 0%
ipywidgets-5.1.5 | 61 KB | | 0%
boost-1.59.0 | 11.9 MB | | 0%
dlib-19.9 | 2.3 MB | | 0%
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/menpo/osx-64/widgetsnbextension-1.2.3-py35_1.tar.bz2>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/menpo/osx-64/ipywidgets-5.1.5-py35_0.tar.bz2>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/menpo/osx-64/boost-1.59.0-py35_0.tar.bz2>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/menpo/osx-64/dlib-19.9-py35_0.tar.bz2>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
Then, I downloaded the dlib-19.16.0.tar.gz from here and saved it in /anaconda3/lib/python3.6/site-packages and then ran conda install -c conda-forge dlib-19.16.0.tar.gz but it shows :
PackagesNotFoundError: The following packages are not available from current channels:
- dlib-19.16.0.tar.gz
Current channels:
- https://conda.anaconda.org/conda-forge/osx-64
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/osx-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/free/osx-64
- https://repo.anaconda.com/pkgs/free/noarch
- https://repo.anaconda.com/pkgs/r/osx-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/pro/osx-64
- https://repo.anaconda.com/pkgs/pro/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.

The first error is just saying you are not able to connect to the menpo repository of libraries. I recommend to check your proxy/internet connection.
In the second case you are trying to install a tar.gz file, that's a compressed file. Decompressed it(unzip it) first and then try to install it.

Related

poetry install - ConnectionError | Failed to establish a new connection: [Errno 101] Network is unreachable'

I am using Poetry version 1.1.7.
Running poetry install yields this error.
Can this be resolved through bash or is this explicitly to do with my network? Note: Internet connectivity it perfectly fine in browsers.
me#LAPTOP-G1DAPU88:~/.ssh/workers-python/workers/CompositeKey/CompositeKey$ poetry install
Updating dependencies
Resolving dependencies... (225.5s)
ConnectionError
HTTPSConnectionPool(host='pkgs.dev.azure.com', port=443): Max retries exceeded with url: <CENSORED> (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f53950c3ee0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))
at ~/.poetry/lib/poetry/_vendor/py3.8/requests/adapters.py:516 in send
512│ if isinstance(e.reason, _SSLError):
513│ # This branch is for urllib3 v1.22 and later.
514│ raise SSLError(e, request=request)
515│
→ 516│ raise ConnectionError(e, request=request)
517│
518│ except ClosedPoolError as e:
519│ raise ConnectionError(e, request=request)
520│
A 401 Unauthorized Error is thrown when pasting the URL into my browser.
I did:
poetry self update 1.0.10
poetry install
Terminal is giving me installs now, as it should.
me#LAPTOP-G1DAPU88:~/.ssh/workers-python/workers/CompositeKey/CompositeKey$ poetry self update 1.0.10
Updating to 1.0.10
- Downloading poetry-1.0.10-linux.tar.gz 100%
Poetry (1.0.10) is installed now. Great!
me#LAPTOP-G1DAPU88:~/.ssh/workers-python/workers/CompositeKey/CompositeKey$ poetry install
Updating dependencies
Resolving dependencies... (101.5s)
Writing lock file
Package operations: 167 installs, 0 updates, 0 removals
- Installing six (1.16.0)
...
I have the same issue and it turns out to be connection refused by server due to exceeding the max connections limit of the mirror repo.
By default poetry's max installer.max-workers is set to number_of_cores + 4. This would be a problem when you run poetry on a server with like 24 cores and it is reasonable for the server side to refuse that many of connections.
The work around is to config this value manually before executing poetry install, you can use the following command to do limit the max connections:
poetry config installer.max-workers 4

Failed to create Conda environment status : 143

I am trying to run a nexflow pipeline on some data via the Linux command line, but when I do so, it fails because it fails to create the Conda environment.
It looks like it tries to run the pipeline anyway, despite the environment not being set up properly, and so generates an error message. Any help would be much appreciated. Here is the error message:
Error executing process > 'my_process (1)'
Caused by:
Failed to create Conda environment
command: conda env create --prefix /my_file_path-6bf38a923b48a255f96ea3d66d372e6c --file /my_file_path/environment.yml
status : 143
message:
Here is my environment.yml file:
name: pipeline_name
channels:
- bioconda
- conda-forge
- defaults
dependencies:
- filtlong
- blast==2.5
- minimap2
- samtools
- pysam
- pandas
- matplotlib
- pysamstats
- seaborn
- medaka
- bedtools
- bedops
- seqtk
- bioawk
- sniffles
Not an answer to this question, but if you get a similar failure with a different exit status (120, not 143), try the fix in this thread. Reposting it here:
conda environment from file not working using nextflow · Issue #1081 · nextflow-io/nextflow: https://github.com/nextflow-io/nextflow/issues/1081
pditommaso commented on Mar 18, 2019
The 120 exit status signals that
it was reached the creation timeout. Try increasing it, eg.
conda.createTimeout = '1 h'

RobotFramework (python 3): AppiumLibrary : Open application > InsecureRequestWarning

I'm trying (successfuly) to connect to a remote server where my device is connected.
But, despite my effort and researchs, I always have InsecureRequestWarning warning showing up...
The code :
*** Settings ***
Library AppiumLibrary
*** Test Cases ***
First run wizard - Connect to Remote
[Setup] Install and open app
[Teardown] Close all applications
Log Hello World WARN
Sleep 10
*** Keywords ***
Install and open app
open application ${Grid} &{MyDevice} &{UserCredential} &{Android_app}
*** Variables ***
${Grid} http://xxx/appium
&{Huawei_P20_Pro} uuid=xxx relaxed-security=True
&{UserCredential} Username=xx ApiKey=xxxx
&{Android_app} appPackage=xxx appActivity=xxx appWaitActivity=xxx
The output :
First run wizard - Connect to Remote
C:\Users\xxx\AppData\Local\Programs\Python37-32\Lib\site-packages\urllib3\connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
[ WARN ] Hello World
C:\Users\xxx\AppData\Local\Programs\Python37-32\Lib\site-packages\urllib3\connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
| PASS |
------------------------------------------------------------------------------
InsecureRequestWarning)
test :: Android template to connect to Remote | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
Output: C:\Projects\RF\test\output.xml
Log: C:\Projects\RF\test\log.html
Report: C:\Projects\RF\test\report.html
Process finished with exit code 0
I've tried to put the capability relaxed-security it didn't work.
I've found some similar case with Create Session Keyword and the parameter verify=True, but it doesn't work on Open Application either.
Currently, I'm about to modify the source code of the urllib3 library to prevent this anoying warning, but this is not a proper solution.
Thus I was wondering if someone could have a clue arround here !
(using http or https makes no difference in the output)
[Partial answere here Suppress InsecureRequestWarning: Unverified HTTPS request is being made in Python2.6 :
It's just a workaround, it shows how to disable the warning, not how to prevent it (== make the things right) such as enable the certificate verification]

Unable to install ntfs-fuse on RHEL 5.2, missing dependency error

I have a rhel 5.2 machine and I am trying to mount a ntfs file system harddisk. I know that we need ntfs and fuse rpms to mount it. By installing those rpms I mounted it in my rhel 5.4 machine. But in 5.2 I followed the same steps but failed to mount. Then after googling I found that 5.2 kernel doesn't support or have fuse kernel by default and then I followed this link.
Below is the output after doing the steps said in this link.
[root#racdb1 ~]# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0. 3.6-1.el5.rf.i386.rpm
--14:14:20-- http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el 5.rf.i386.rpm
Resolving packages.sw.be... 78.46.17.228
Connecting to packages.sw.be|78.46.17.228|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.3.6-1.el 5.rf.i386.rpm [following]
--14:14:32-- http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.3.6- 1.el5.rf.i386.rpm
Resolving pkgs.repoforge.org... 78.46.17.228
Connecting to pkgs.repoforge.org|78.46.17.228|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://rpmforge.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-releas e-0.3.6-1.el5.rf.i386.rpm [following]
--14:14:39-- http://rpmforge.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-re lease-0.3.6-1.el5.rf.i386.rpm
Resolving rpmforge.sw.be... 78.46.17.228
Connecting to rpmforge.sw.be|78.46.17.228|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://tree.repoforge.org/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-re lease-0.3.6-1.el5.rf.i386.rpm [following]
--14:14:51-- http://tree.repoforge.org/redhat/el5/en/i386/rpmforge/RPMS/rpmforg e-release-0.3.6-1.el5.rf.i386.rpm
Resolving tree.repoforge.org... 78.46.17.228
Connecting to tree.repoforge.org|78.46.17.228|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3 .6-1.el5.rf.i386.rpm [following]
--14:14:59-- http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release -0.3.6-1.el5.rf.i386.rpm
Resolving apt.sw.be... 193.1.193.67
Connecting to apt.sw.be|193.1.193.67|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16698 (16K) [application/x-redhat-package-manager]
Saving to: `rpmforge-release-0.3.6-1.el5.rf.i386.rpm'
100%[=======================================>] 16,698 14.4K/s in 1.1s
14:15:09 (14.4 KB/s) - `rpmforge-release-0.3.6-1.el5.rf.i386.rpm' saved [16698/1 6698]
[root#racdb1 ~]# rpm -Uhv rpmforge-release-0.3.6-1.el5.rf.i386.rpm
warning: rpmforge-release-0.3.6-1.el5.rf.i386.rpm: Header V3 DSA signature: NOKE Y, key ID 6b8d79e6
Preparing... ########################################### [100%]
1:rpmforge-release ########################################### [100%]
[root#racdb1 ~]# yum install fuse fuse-ntfs-3g dkms dkms-fuse
Loading "security" plugin
Loading "rhnplugin" plugin
This system is not registered with RHN.
RHN support will be disabled.
rpmforge 100% |=========================| 1.9 kB 00:00
primary.sqlite.bz2 100% |=========================| 7.3 MB 01:20
Setting up Install Process
Parsing package install arguments
No package fuse available.
No package dkms-fuse available.
Resolving Dependencies
--> Running transaction check
---> Package fuse-ntfs-3g.i386 0:2013.1.13-2.el5.rf set to be updated
--> Processing Dependency: fuse >= 2.6.3 for package: fuse-ntfs-3g
---> Package dkms.noarch 0:2.1.1.2-1.el5.rf set to be updated
--> Finished Dependency Resolution
**Error: Missing Dependency: fuse >= 2.6.3 is needed by package fuse-ntfs-3g**
I don't know what to do from the above error which I got. I searched in google but I didn't get the solution anywhere. How to solve the above issue?
I finally found the process to use ntfs file system in rhel 5.2. I followed the link.
http://oliphauntz.blogspot.in/2011/03/fix-how-to-mount-ntfs-filesystem-on.html#comment-form
In the above link the step " wget http://pbxinaflash.net/source/pogoplug/fuse-2.6.0.tar.gz" is not working. So I manually downloaded fuse-2.6.0 from internet and then installed and configured it. Try the same if anyone is facing the same problem which I faced.

Outputting text that auto updates to screen and file

I'm trying to take a script I have that updates my sytstem for me, and have it output it's text to a file, and the screen. This is fairly simple using tee, except my update manager, pacman, outputs the same kind of text like wget. Here's some sample output.
core 107.0 KiB 392K/s 00:00 [################################################################] 100%
extra 1531.8 KiB 719K/s 00:02 [################################################################] 100%
community 2.1 MiB 818K/s 00:03 [################################################################] 100%
When I try to redirect that kind of output to a file using tee, this is the output I get to my screen and file.
:: Synchronizing package databases...
downloading core.db...
downloading extra.db...
downloading community.db...
I understand this is because pacman uses a buffer to output to the screen, but I'm still hoping there's a way I can output the status to the screen and the file, and not just the "downloading xyz...".
Thank you in advance for any help.
Edit:
I have no current updates, but here's some sample output that's very similar of me installing the Opera browser. The lines with the percentages and the pound signs are buffers that update with the progress of the download.
resolving dependencies...
looking for inter-conflicts...
Packages (1): opera-12.16.1860-2
Total Download Size: 10.49 MiB
Total Installed Size: 45.03 MiB
:: Proceed with installation? [Y/n] y
:: Retrieving packages ...
opera-12.16.1860-2-x86_64 13.4 MiB 1151K/s 00:12 [################################################################] 100%
(1/1) checking keys in keyring [################################################################] 100%
(1/1) checking package integrity [################################################################] 100%
(1/1) loading package files [################################################################] 100%
(1/1) checking for file conflicts [################################################################] 100%
(1/1) checking available disk space [################################################################] 100%
(1/1) installing opera [################################################################] 100%
Optional dependencies for opera
gstreamer0.10-base-plugins: HTML5 Video support
gstreamer0.10-good: HTML5 Video support
This is what the above output looks like when redirected through tee.
warning: opera-12.16.1860-2 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...
Packages (1): opera-12.16.1860-2
Total Installed Size: 45.03 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n] y
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
checking available disk space...
reinstalling opera...
As you can see, the download progess isn't shown. Just three periods.
Note sure if I fully understand the question, but I think possibly your script outputs to both stdout and stderr and you want both to be captured to file as well displayed on the terminal. In which case, you could do this by redirecting stderr of your script to stderr, before piping the whole thing to tee:
./myscript.sh 2>&1 | tee output.log
So I think you also want all the output with respect to progress bars, etc. You can use the script command to get this:
script -e -q -c "./myscript.sh" output.log
This works for me with wget:
Terminal output:
ubuntu#ubuntu:~$ script -e -q -c "wget http://stackoverflow.com" output.log
--2014-02-21 20:01:31-- http://stackoverflow.com/
Resolving stackoverflow.com (stackoverflow.com)... 198.252.206.140
Connecting to stackoverflow.com (stackoverflow.com)|198.252.206.140|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 214108 (209K) [text/html]
Saving to: `index.html.5'
100%[======================================>] 214,108 7.59K/s in 38s
Last-modified header invalid -- time-stamp ignored.
2014-02-21 20:02:13 (5.55 KB/s) - `index.html.5' saved [214108/214108]
ubuntu#ubuntu:~$
Contents of output.log:
Script started on Fri 21 Feb 2014 08:01:31 PM PST
--2014-02-21 20:01:31-- http://stackoverflow.com/
Resolving stackoverflow.com (stackoverflow.com)... 198.252.206.140
Connecting to stackoverflow.com (stackoverflow.com)|198.252.206.140|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 214108 (209K) [text/html]
Saving to: `index.html.5'
0% [ ] 0 --.-K/s
1% [ ] 3,367 3.66K/s
2% [> ] 5,863 5.09K/s
3% [> ] 7,111 3.54K/s
5% [> ] 10,855 3.73K/s
### Output omitted - I have a slow connection right now ###
97% [=====================================> ] 209,806 7.84K/s eta 1s
99% [=====================================> ] 212,302 7.44K/s eta 1s
100%[======================================>] 214,108 7.59K/s in 38s
Last-modified header invalid -- time-stamp ignored.
2014-02-21 20:02:13 (5.55 KB/s) - `index.html.5' saved [214108/214108]

Resources