find_circ软件所需要的是python2.7,numpy,pysam
sudo apt-get install python2.7
安装软件时出现
(base) lchen@lchen-Vostro-5460:~/miniconda3/lib/python3.7$ sudo pip install numpy
The directory '/home/lchen/.cache/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 '/home/lchen/.cache/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 numpy
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)",)': /simple/numpy/
Downloading https://files.pythonhosted.org/packages/3a/5f/47e578b3ae79e2624e205445ab77a1848acdaa2929a00eeef6b16eaaeb20/numpy-1.16.6-cp27-cp27mu-manylinux1_x86_64.whl (17.0MB)
22% |███████ | 3.7MB 10kB/s eta 0:20:41Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 342, in run
requirement_set.prepare_files(finder)
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 821, in unpack_url
hashes=hashes
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 659, in unpack_http_url
hashes)
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 882, in _download_http_url
_download_url(resp, link, content_file, hashes)
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 603, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "/usr/lib/python2.7/dist-packages/pip/utils/hashes.py", line 46, in check_against_chunks
for chunk in chunks:
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 571, in written_chunks
for chunk in chunks:
File "/usr/lib/python2.7/dist-packages/pip/utils/ui.py", line 139, in iter
for x in it:
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 560, in resp_read
decode_content=False):
File "/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/response.py", line 436, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/response.py", line 401, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/response.py", line 316, in _error_catcher
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
你可以更换安装源:
pip install --index-url https://pypi.tuna.tsinghua.edu.cn/simple/ numpy
pip install --index-url https://pypi.tuna.tsinghua.edu.cn/simple/ pysam
(base) lchen@lchen-Vostro-5460:~$ pip install --index-url https://pypi.tuna.tsinghua.edu.cn/simple/ numpy
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Collecting numpy
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/63/0c/0261693cc3ad8e2b66e66dc2d2676a2cc17d3efb1c58a70db73754320e47/numpy-1.18.1-cp37-cp37m-manylinux1_x86_64.whl (20.1MB)
|████████████████████████████████| 20.1MB 3.5MB/s
Installing collected packages: numpy
Successfully installed numpy-1.18.1
(base) lchen@lchen-Vostro-5460:~$ pip install --index-url https://pypi.tuna.tsinghua.edu.cn/simple/ numpy
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Requirement already satisfied: numpy in ./miniconda3/lib/python3.7/site-packages (1.18.1)
(base) lchen@lchen-Vostro-5460:~$ pip install --index-url https://pypi.tuna.tsinghua.edu.cn/simple/ pysam
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Collecting pysam
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/63/ee/2c5dacd21d02d3bb7c7baf03dba8f42bc4af8b02370b7e52b6e5425d2366/pysam-0.15.4-cp37-cp37m-manylinux2010_x86_64.whl (10.7MB)
|████████████████████████████████| 10.7MB 3.7MB/s
Installing collected packages: pysam
Successfully installed pysam-0.15.4
(base) lchen@lchen-Vostro-5460:~$ sudo apt-get install python2.7
[sudo] password for lchen:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python2.7 is already the newest version (2.7.17-1~18.04).
python2.7 set to manually installed.
The following packages were automatically installed and are no longer required:
cdbs debhelper dh-autoreconf dh-strip-nondeterminism dh-translations
efibootmgr gir1.2-geocodeglib-1.0 gir1.2-harfbuzz-0.0 icu-devtools intltool
jq libarchive-cpio-perl libblas-dev libbz2-dev
libfile-stripnondeterminism-perl libfile-which-perl libfwup1 libglib2.0-dev
libglib2.0-dev-bin libgraphite2-dev libharfbuzz-dev libharfbuzz-gobject0
libicu-dev libicu-le-hb-dev libicu-le-hb0 libiculx60 libjpeg-dev
libjpeg-turbo8-dev libjpeg8-dev libjq1 liblapack-dev liblzma-dev
libmail-sendmail-perl libncurses5-dev libonig4 libpcre16-3 libpcre3-dev
libpcre32-3 libpcrecpp0v5 libpng-dev libpng-tools libsys-hostname-long-perl
pkg-config po-debconf python3-distutils python3-lib2to3 python3-scour scour
ubuntu-web-launchers
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
————————————————
参考:枫-凡
方案一:对于比较小的库,可以延时处理
-------- pip --default-timeout=100 install -U pip
-------- pip --default-timeout=100 install 第三方库名
方案二:更换安装源
------------网上可以查找很多豆瓣源
如https://pypi.tuna.tsinghua.edu.cn/simple/
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyecharts
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple 库名
出错使用这种 :pip install --index-url https://pypi.tuna.tsinghua.edu.cn/simple/ lightgbm
方案三:下载离线包
python所有库:(https://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml)
---------然后通过pip install 保存路径/加上下载的文件名 进行安装
(如pip install C:\Users\HP\Desktop\scikit_image-0.14.1-cp37-cp37m-win32.whl)
网友评论