SimpleITK python 2.7.12 installation issue - python

So... I'm trying to install SimpleITK on Python 2.7.12 and I tried several ways which none is giving me satisfatory result.
1) by simply using
pip install SimpleITK
I get "No matching distribution found for SimpleITK" (my pip version is 9.0.1)
2) tar file (available here: https://sourceforge.net/projects/simpleitk/files/SimpleITK/1.0.0/Python/): when I run the command
python setup.py install
I get:
Download error on https://pypi.python.org/simple/scikit-build/: [SSL:
CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) -- Some
packages may not be found!
Couldn't find index page for 'scikit-build' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [SSL:
CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) -- Some
packages may not be found!
No local packages or download links found for scikit-build>=0.5
Traceback (most recent call last):
File "setup.py", line 50, in <module>
zip_safe=False
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 269, in
__init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 313, in
fetch_build_eggs
replace_conflicting=True,
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line
826, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line
1092, in best_match
return self.obtain(req, installer)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1
104, in obtain
return installer(requirement)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 380, in
fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python2.7/dist-
packages/setuptools/command/easy_install.py",
line 657, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for
Requirement.parse('scikit-build>=0.5')
I don't understand what is missing and why I can't use the pratical way (with pip)... =( I also didn't try Python 3 (but I would rather use Python 2.7 as I'm more familiarized with it).
Thank you in advance!
EDIT: FINALLY GOT IT TO WORK!
Here: sudo easy_install for SimpleITK not that easy

Related

Can't install python 3.8.1 scrapy in venv on windows 10 64 bits

I tried to install scrapy on my windows machine by using pip install scrapy and pip3 install scrapy but it is showing me the following error:
File "<string>", line 1, in <module>
File "C:\Users\ASUS\AppData\Local\Temp\pip-install-8lbz4g3u\Twisted\setup.py", line 20, in <module>
setuptools.setup(**_setup["getSetupArgs"]())
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\__init__.py", line 144, in setup
_install_setup_requires(attrs)
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\__init__.py", line 139, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\dist.py", line 716, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "c:\users\asus\desktop\utube\venv\lib\site-packages\pkg_resources\__init__.py", line 780, in resolve
dist = best[req.key] = env.best_match(
File "c:\users\asus\desktop\utube\venv\lib\site-packages\pkg_resources\__init__.py", line 1065, in best_match
return self.obtain(req, installer)
File "c:\users\asus\desktop\utube\venv\lib\site-packages\pkg_resources\__init__.py", line 1077, in obtain
return installer(requirement)
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\dist.py", line 786, in fetch_build_egg
return cmd.easy_install(req)
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\command\easy_install.py", line 665, in easy_install
dist = self.package_index.fetch_distribution(
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\package_index.py", line 655, in fetch_distribution
dist = find(requirement)
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\package_index.py", line 635, in find
loc = self.download(dist.location, tmpdir)
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\package_index.py", line 579, in download
found = self._download_url(scheme.group(1), spec, tmpdir)
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\package_index.py", line 824, in _download_url
return self._attempt_download(url, filename)
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\package_index.py", line 830, in _attempt_download
headers = self._download_to(url, filename)
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\package_index.py", line 729, in _download_to
fp = self.open_url(url)
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\package_index.py", line 779, in open_url
raise DistutilsError("Download error for %s: %s"
distutils.errors.DistutilsError: Download error for https://files.pythonhosted.org/packages/f5/1d/c98a587dc06e107115cf4a58b49de20b19222c83d7533
5a192052af4c4b7/incremental-17.5.0-py2.py3-none-any.whl#sha256=717e12246dddf231a349175f48d74d93e2897244939173b01974ab6661406b9f: _ssl.c:1091: The h
andshake operation timed out
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
So help me out how to fix this problem.
I have tried to install from pycharm also but it can't install there also
Based on the traceback you provided and this Github Issue the issue appears to be the "incremental" package dependency. You can try installing incremental (17.5.0) using pip install incremental==17.5.0 before installing scrapy.
Note that in the scrapy documentation installation guide it says:
"Though it’s possible to install Scrapy on Windows using pip, we
recommend you to install Anaconda or Miniconda and use the package
from the conda-forge channel, which will avoid most installation
issues."
So you could follow the steps in the documentation if installing incremental doesn't resolve your issues.

issue in installing packages using pip install

I need to install pyspark. It has a dependency on pypandoc. So I first do pip install pypandoc and then pip install pyspark and everything looks fine. However, based on some requirements I need to install my dependencies using a requirements.txt file. So I put both pypandoc and pyspark in the requirements.txt file and then I do pip install -r requirements.txt (pypandoc comes first in the file followed by pyspark), however this time the installation file with the following error
Complete output from command python setup.py egg_info:
Could not import pypandoc - required to package PySpark
Download error on https://pypi.org/simple/pypandoc/: [Errno 97] Address family not supported by protocol -- Some packages may not be found!
Couldn't find index page for 'pypandoc' (maybe misspelled?)
Download error on https://pypi.org/simple/: [Errno 97] Address family not supported by protocol -- Some packages may not be found!
No local packages or working download links found for pypandoc
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-6vmbjchu/pyspark/setup.py", line 224, in <module>
'Programming Language :: Python :: Implementation :: PyPy']
File "/usr/local/lib/python3.6/site-packages/setuptools/__init__.py", line 144, in setup
_install_setup_requires(attrs)
File "/usr/local/lib/python3.6/site-packages/setuptools/__init__.py", line 139, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/usr/local/lib/python3.6/site-packages/setuptools/dist.py", line 724, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 782, in resolve
replace_conflicting=replace_conflicting
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1065, in best_match
return self.obtain(req, installer)
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1077, in obtain
return installer(requirement)
File "/usr/local/lib/python3.6/site-packages/setuptools/dist.py", line 791, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 673, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pypandoc')
So it looks like when I do it in this way, the pypandoc is not properly installed when it tries to install pyspark. How can I fix this issue?

How to install virtualenvwrapper-win on windows 10 without internet access?

I need to install virtualenvwrapper-win on windows 10 . But that machine doesn't have access to internet. Is there anyway I can download and install it instead of pip install virtualenvwrapper ?
I already tried downloading virtualenvwrapper-4.8.4.tar.gz and
pip install /PATH/TO/FILE/virtualenvwrapper-4.8.4.tar.gz
But I get
Complete output from command python setup.py egg_info:
Download error on https://pypi.python.org/simple/pbr/: [Errno 11001] getaddrinfo failed -- Some packages may not be found!
Couldn't find index page for 'pbr' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [Errno 11001] getaddrinfofailed -- Some packages may not be found!
No local packages or working download links found for pbr
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\n2007107\AppData\Local\Temp\2\pip-_4e665tg-build\setup.py", line 7, in <module>
pbr=True,
File "c:\users\n2007107\appdata\local\programs\python\python36\lib\distutils\core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "c:\users\n2007107\appdata\local\programs\python\python36\lib\site-packages\setuptools\dist.py", line 315, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "c:\users\n2007107\appdata\local\programs\python\python36\lib\site-packages\setuptools\dist.py", line 361, in fetch_build_eggs
replace_conflicting=True,
File "c:\users\n2007107\appdata\local\programs\python\python36\lib\site-packages\pkg_resources\__init__.py", line 850, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "c:\users\n2007107\appdata\local\programs\python\python36\lib\site-packages\pkg_resources\__init__.py", line 1122, in best_match
return self.obtain(req, installer)
File "c:\users\n2007107\appdata\local\programs\python\python36\lib\site-packages\pkg_resources\__init__.py", line 1134, in obtain
return installer(requirement)
File "c:\users\n2007107\appdata\local\programs\python\python36\lib\site-packages\setuptools\dist.py", line 429, in fetch_build_egg
return cmd.easy_install(req)
File "c:\users\n2007107\appdata\local\programs\python\python36\lib\site-packages\setuptools\command\easy_install.py", line 659, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pbr')
On an Internet-connected host run
pip download virtualenvwrapper-win
pip downloads the package and all its dependencies. Move all downloaded files to the offline (non-connected) host and run
pip install --no-index --find-links=\path\to\downloads virtualenvwrapper-win
Replace \path\to\downloads with the path to the directory where you moved downloaded installation files.
But I don't see pbr as a dependency. If you still cannot install or run virtualenvwrapper-win scripts download and install pbr separately.

Command "python setup.py egg_info" failed, setup.py not found

i started to learn python, i using pycharm, mac, and i'm trying to import mate expansion package.. i add this line at the head of my python file: "from mate import *" and it doesn't work, i try to install the mate package and every time i do it i get this error,
i also put this line in terminal "python setup.py install" but setup.py isn't found...
need some help, thanks :)
Collecting mate
Using cached https://files.pythonhosted.org/packages/ee/fd/1089e5b33e0590f6201c3c9b50014dabf9ccaeb2e2546c29cc4abf06e425/mate-0.2.0.tar.gz
Complete output from command python setup.py egg_info:
Download error on https://pypi.org/simple/vcversioner/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1051) -- Some packages may not be found!
Couldn't find index page for 'vcversioner' (maybe misspelled?)
Download error on https://pypi.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1051) -- Some packages may not be found!
No local packages or working download links found for vcversioner>=2.16.0.0
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/m3/2d4zt3717c11xbz6fr5ghfkr0000gn/T/pycharm-packaging/mate/setup.py", line 39, in <module>
classifiers=classifiers,
File "/Users/Daniel/Developer/Python/PythonFundamentals/venv/lib/python3.7/site-packages/setuptools/__init__.py", line 142, in setup
_install_setup_requires(attrs)
File "/Users/Daniel/Developer/Python/PythonFundamentals/venv/lib/python3.7/site-packages/setuptools/__init__.py", line 137, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/Users/Daniel/Developer/Python/PythonFundamentals/venv/lib/python3.7/site-packages/setuptools/dist.py", line 586, in fetch_build_eggs
replace_conflicting=True,
File "/Users/Daniel/Developer/Python/PythonFundamentals/venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 780, in resolve
replace_conflicting=replace_conflicting
File "/Users/Daniel/Developer/Python/PythonFundamentals/venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1063, in best_match
return self.obtain(req, installer)
File "/Users/Daniel/Developer/Python/PythonFundamentals/venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1075, in obtain
return installer(requirement)
File "/Users/Daniel/Developer/Python/PythonFundamentals/venv/lib/python3.7/site-packages/setuptools/dist.py", line 653, in fetch_build_egg
return cmd.easy_install(req)
File "/Users/Daniel/Developer/Python/PythonFundamentals/venv/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 673, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('vcversioner>=2.16.0.0')
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/m3/2d4zt3717c11xbz6fr5ghfkr0000gn/T/pycharm-packaging/mate/
Try to install the dependency using pip.
mate is on PyPi repositories (link), so you can install it using pip install mate
I found a solution to my case, appear to be
that I was needed to download a package call "vcversioner" that was missed.
https://pypi.org/project/vcversioner/
without this package i could'nt download new packages to pycharm
i used this commend line to download vcversioner -> pip install vcversioner
and it solved the problem

Trying to install django-haystack

Hello I'm trying to install django-haystack on a Debian 7 x86 but it is impossible to install, this Debian is fresh installation, I compiled python 3.6, I am little disappointed, this the error I get
100% |ââââââââââââââââââââââââââââââââ| 389kB 9.0kB/s
Complete output from command python setup.py egg_info:
Download error on https://pypi.python.org/simple/setuptools_scm/: [Errno -2] Name or service not known -- Some packages may not be found!
Download error on https://pypi.python.org/simple/setuptools-scm/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or working download links found for setuptools_scm
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-sc1wwqz8/django-haystack/setup.py", line 68, in <module>
setup_requires=['setuptools_scm'],
File "/usr/local/opt/python-3.6.1/lib/python3.6/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/root/cubapk/lib/python3.6/site-packages/setuptools/dist.py", line 315, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/root/cubapk/lib/python3.6/site-packages/setuptools/dist.py", line 361, in fetch_build_eggs
replace_conflicting=True,
File "/root/cubapk/lib/python3.6/site-packages/pkg_resources/__init__.py", line 850, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/root/cubapk/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1122, in best_match
return self.obtain(req, installer)
File "/root/cubapk/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1134, in obtain
return installer(requirement)
File "/root/cubapk/lib/python3.6/site-packages/setuptools/dist.py", line 429, in fetch_build_egg
return cmd.easy_install(req)
File "/root/cubapk/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 659, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools_scm')
#RaminNietzsche, after few days I figured out the way out to fix this trouble, what did was to install by hand this setuptools_scm, I do not know why pip did not find any suitable distribution as the error message say.
What I did was this:
pip install setuptools_scm
Take another look at the OSError: Name or service not known.
This means your fresh install didn't have a proper resolver yet. Probably fixed itself a few days later, because you fixed your resolver.
In my case I was seeing the following error:
Could not find suitable distribution for Requirement.parse('setuptools_scm<4,>=3.2')
I tried to run pip install setuptools_scm but it didn't work as package was already installed.
What worked for me is installing the exact version setuptools_scm is asking.
pip install setuptools_scm==3.2

Categories