I am working on a fork of a google hangout bot (https://github.com/hangoutsbot/hangoutsbot), and everything was working great, and one day it just broke now whenever I do pip3 install -r requirements.txt I get the this response:
Collecting git+https://github.com/tdryer/hangups.git#84c6a20a24bede2fa41ffd54fda510e453f080dc (from -r requirements.txt (line 1))
Cloning https://github.com/tdryer/hangups.git (to 84c6a20a24bede2fa41ffd54fda510e453f080dc) to /var/folders/x7/cr79fr9n0hs3n7bl5vxyz0s00000gn/T/pip-u4xqord7-build
Could not find a tag or branch '84c6a20a24bede2fa41ffd54fda510e453f080dc', assuming commit.
Collecting git+https://github.com/loisaidasam/pyslack.git (from -r requirements.txt (line 11))
Cloning https://github.com/loisaidasam/pyslack.git to /var/folders/x7/cr79fr9n0hs3n7bl5vxyz0s00000gn/T/pip-h_umecx8-build
Collecting git+https://github.com/carpedm20/emoji (from -r requirements.txt (line 12))
Cloning https://github.com/carpedm20/emoji to /var/folders/x7/cr79fr9n0hs3n7bl5vxyz0s00000gn/T/pip-pfzs28ru-build
Collecting appdirs (from -r requirements.txt (line 2))
Using cached appdirs-1.4.0-py2.py3-none-any.whl
Collecting asyncio (from -r requirements.txt (line 3))
Using cached asyncio-3.4.3-py3-none-any.whl
Collecting jsonrpclib-pelix (from -r requirements.txt (line 4))
Using cached jsonrpclib_pelix-0.2.6-py2.py3-none-any.whl
Collecting pushbullet.py (from -r requirements.txt (line 5))
Using cached pushbullet.py-0.8.1-py2.py3-none-any.whl
Collecting beautifulsoup4 (from -r requirements.txt (line 6))
Using cached beautifulsoup4-4.4.1-py3-none-any.whl
Collecting goslate (from -r requirements.txt (line 7))
Using cached goslate-1.5.0.tar.gz
Collecting wikipedia (from -r requirements.txt (line 8))
Using cached wikipedia-1.4.0.tar.gz
Collecting wolframalpha (from -r requirements.txt (line 9))
Using cached wolframalpha-1.2.zip
Complete output from command python setup.py egg_info:
Download error on https://pypi.python.org/simple/pytest-runner/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:646) -- Some packages may not be found!
Couldn't find index page for 'pytest-runner' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:646) -- Some packages may not be found!
No local packages or download links found for pytest-runner
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/private/var/folders/x7/cr79fr9n0hs3n7bl5vxyz0s00000gn/T/pip-build-9h1wp8sf/wolframalpha/setup.py", line 30, in <module>
setuptools.setup(**setup_params)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/setuptools/dist.py", line 268, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/setuptools/dist.py", line 313, in fetch_build_eggs
replace_conflicting=True,
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/__init__.py", line 836, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1081, in best_match
return self.obtain(req, installer)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1093, in obtain
return installer(requirement)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/setuptools/dist.py", line 380, in fetch_build_egg
return cmd.easy_install(req)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 632, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pytest-runner')
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/x7/cr79fr9n0hs3n7bl5vxyz0s00000gn/T/pip-build-9h1wp8sf/wolframalpha
I am new to Python and have no idea what is going on. Thanks in advance for the help
The problem is for date to RPI try to raspberrypi:
$ sudo date -s "2016-11-02 $(date +%H:%M:%S)"
Related
I have my lib which has setup as
setup.py
from setuptools import setup
setup(
setup_requires=['pbr>=0.11.0'],
pbr=True
)
setup.cfg
[metadata]
name = MyLib
[options]
zip_safe = False
include_package_data = True
install_requires =
cython
pyrex
pymssql
elementtree
bleach
BeautifulSoup4
pytz
MySQL_python
retry
elementtree
Pyrex
dependency_links =
https://pypi.mydomain.com/packages/
[files]
packages =
MyLib
MyLib.package1
MyLib.package1.new1
[tool:wheel]
universal = 1
[flake8]
exclude =
venv,
.tox,
.git,
__pycache__,
*.pyc,
*.egg-info,
.cache,
.eggs,
max-line-length = 80
[tool:pytest]
testpaths=MyLib/tests
ignore=
.tox
.cache
docs
config.py
venv
[coverage:run]
omit=
MyLib/config.py
I am using this MyLib in my application requirements.txt
myapp/requirements.txt
...
...
MyLib==1.2.3
...
...
When I installed, with /usr/local/pyenv/versions/myapp/bin/pip install -i https://pypi.mydomain.com --trusted-host pypi.mydomain.com -r /opt/school/apps/myapp/requirements.txt, it was redirecting to pypi.python.org. Then I get that easy_install is using another config as ~/.pydistutils.cfg. I added as
~/.pydistutils.cfg
[easy_install]
index_url=https://pypi.mydomain.com/
find_links = https://pypi.mydomain.com/simple/
allow_hosts = pypi.mydomain.com
Now its not redirecting to pypi.python.org but it gives error for SSL.
/usr/local/pyenv/versions/myapp/bin/pip install -i https://pypi.mydomain.com --trusted-host pypi.mydomain.com -r /opt/school/apps/myapp/requirements.txt
Requirement already satisfied: appdirs==1.4.3 in /usr/local/pyenv/versions/2.7.13/envs/myapp/lib/python2.7/site-packages (from -r /opt/school/apps/myapp/requirements.txt (line 1))
Requirement already satisfied: beautifulsoup4 in /usr/local/pyenv/versions/2.7.13/envs/myapp/lib/python2.7/site-packages (from -r /opt/school/apps/myapp/requirements.txt (line 2))
Requirement already satisfied: bleach==2.0.0 in /usr/local/pyenv/versions/2.7.13/envs/myapp/lib/python2.7/site-packages (from -r /opt/school/apps/myapp/requirements.txt (line 3))
Requirement already satisfied: click==6.7 in /usr/local/pyenv/versions/2.7.13/envs/myapp/lib/python2.7/site-packages (from -r /opt/school/apps/myapp/requirements.txt (line 4))
Collecting MyLib==1.2.3 (from -r /opt/school/apps/myapp/requirements.txt (line 5))
Downloading https://pypi.mydomain.com/packages/MyLib-1.2.3.tar.gz (221kB)
100% |████████████████████████████████| 225kB 31.8MB/s
Complete output from command python setup.py egg_info:
Download error on https://pypi.mydomain.com/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661) -- Some packages may not be found!
Download error on https://pypi.mydomain.com/pbr/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661) -- Some packages may not be found!
Couldn't find index page for 'pbr' (maybe misspelled?)
Download error on https://pypi.mydomain.com/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661) -- Some packages may not be found!
No local packages or working download links found for pbr>=0.11.0
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-Lsc4UJ/MyLib/setup.py", line 5, in <module>
pbr=True
File "/usr/local/pyenv/versions/2.7.13/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/pyenv/versions/2.7.13/envs/myapp/lib/python2.7/site-packages/setuptools/dist.py", line 315, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/local/pyenv/versions/2.7.13/envs/myapp/lib/python2.7/site-packages/setuptools/dist.py", line 361, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/pyenv/versions/2.7.13/envs/myapp/lib/python2.7/site-packages/pkg_resources/__init__.py", line 850, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/local/pyenv/versions/2.7.13/envs/myapp/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1122, in best_match
return self.obtain(req, installer)
File "/usr/local/pyenv/versions/2.7.13/envs/myapp/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1134, in obtain
return installer(requirement)
File "/usr/local/pyenv/versions/2.7.13/envs/myapp/lib/python2.7/site-packages/setuptools/dist.py", line 429, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/pyenv/versions/2.7.13/envs/myapp/lib/python2.7/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>=0.11.0')
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-Lsc4UJ/MyLib/
Is there any way to force dependency_links not to use ~/.pydistutils.cfg ?
If answer of 1 is NO, then how to ignore SSL for my pypi server?
Tried the solution given below.
# /usr/local/pyenv/versions/myapp/bin/python get-pip.py
Collecting pip
Using cached https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 9.0.1
Uninstalling pip-9.0.1:
Successfully uninstalled pip-9.0.1
Successfully installed pip-18.0
/usr/local/pyenv/versions/myapp/bin/pip install -i https://pypi.mydomain.com --trusted-host pypi.mydomain.com -r /opt/school/apps/myapp/requirements.txt
Looking in indexes: https://pypi.mydomain.com
Collecting MyLib==1.2.3 (from -r /opt/school/apps/myapp/requirements.txt (line 1))
Downloading https://pypi.mydomain.com/packages/MyLib-1.2.3.tar.gz (221kB)
100% |████████████████████████████████| 225kB 21.2MB/s
Complete output from command python setup.py egg_info:
Download error on https://pypi.mydomain.com/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661) -- Some packages may not be found!
Download error on https://pypi.mydomain.com/pbr/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661) -- Some packages may not be found!
Couldn't find index page for 'pbr' (maybe misspelled?)
Download error on https://pypi.mydomain.com/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661) -- Some packages may not be found!
No local packages or working download links found for pbr>=0.11.0
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-JD4AuE/MyLib/setup.py", line 5, in <module>
pbr=True
File "/usr/local/pyenv/versions/2.7.13/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/pyenv/versions/cvcollect/lib/python2.7/site-packages/setuptools/dist.py", line 315, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/local/pyenv/versions/cvcollect/lib/python2.7/site-packages/setuptools/dist.py", line 361, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/pyenv/versions/cvcollect/lib/python2.7/site-packages/pkg_resources/__init__.py", line 850, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/local/pyenv/versions/cvcollect/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1122, in best_match
return self.obtain(req, installer)
File "/usr/local/pyenv/versions/cvcollect/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1134, in obtain
return installer(requirement)
File "/usr/local/pyenv/versions/cvcollect/lib/python2.7/site-packages/setuptools/dist.py", line 429, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/pyenv/versions/cvcollect/lib/python2.7/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>=0.11.0')
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-JD4AuE/MyLib/
The issue, as mentioned here is,
setuptools is trying to talk to PyPI, not pip,
and that 3.6.0 on macOS does not have access to a CA Bundle by default
and setuptools doesn't bundle one like pip does. You'll need to
install something like certifi or raise an issue with setuptools.
You can force install new version of pip,
curl 'https://bootstrap.pypa.io/get-pip.py' > get-pip.py
sudo python get-pip.py
You can also try installing certifi as mentioned in the above issue,
pip install certifi
Certifi is a carefully curated collection of Root Certificates for
validating the trustworthiness of SSL certificates while verifying the
identity of TLS hosts. It has been extracted from the Requests
project.
TLS can be disabled using --trusted-host, but it is dangerous and not recommend at all.
pip install --trusted-host pypi.python.org pip --upgrade
I'm trying to install channels_redis and got following error.
pip install channels_redis
Collecting channels_redis
Using cached https://files.pythonhosted.org/packages/63/ae/adea3b1913aebb84ec6b6f3c30ba81b8bef79f99b51c7240810284152df4/channels_redis-2.2.1-py2.py3-none-any.whl
Requirement already satisfied: channels~=2.0 in ./env/lib/python3.6/site-packages (from channels_redis) (2.1.1)
Requirement already satisfied: asgiref~=2.1 in ./env/lib/python3.6/site-packages (from channels_redis) (2.3.2)
Collecting msgpack~=0.5.0 (from channels_redis)
Using cached https://files.pythonhosted.org/packages/22/4e/dcf124fd97e5f5611123d6ad9f40ffd6eb979d1efdc1049e28a795672fcd/msgpack-0.5.6-cp36-cp36m-manylinux1_x86_64.whl
Collecting aioredis~=1.0 (from channels_redis)
Using cached https://files.pythonhosted.org/packages/83/4f/fb41fd054522b2f15cf8c9a0b119096a3f2e4db41c9cd7c114da8de742b1/aioredis-1.1.0-py3-none-any.whl
Requirement already satisfied: daphne~=2.1 in ./env/lib/python3.6/site-packages (from channels~=2.0->channels_redis) (2.1.2)
Requirement already satisfied: Django>=1.11 in ./env/lib/python3.6/site-packages (from channels~=2.0->channels_redis) (2.0.6)
Requirement already satisfied: async-timeout<4.0,>=2.0 in ./env/lib/python3.6/site-packages (from asgiref~=2.1->channels_redis) (2.0.1)
Collecting hiredis (from aioredis~=1.0->channels_redis)
Using cached https://files.pythonhosted.org/packages/1b/98/4766d85124b785ff1989ee1c79631a1b6ecfcb444ff39999a87877b2027e/hiredis-0.2.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-aqp5bl02/hiredis/setup.py", line 81, in <module>
'Topic :: Software Development',
File "/usr/lib/python3.6/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/home/danil/projects/python/collann/env/lib/python3.6/site-packages/setuptools/dist.py", line 364, in __init__
self.patch_missing_pkg_info(attrs)
File "/home/danil/projects/python/collann/env/lib/python3.6/site-packages/setuptools/dist.py", line 346, in patch_missing_pkg_info
key = pkg_resources.safe_name(str(attrs['name'])).lower()
AttributeError: module 'pkg_resources' has no attribute 'safe_name'
---------------
This answer doesn't work for me
pip --version
pip 10.0.1 from project/env/lib/python3.6/site-packages/pip (python 3.6)
only full removing of environment helped.
deactivate
rm -rf env/
virtualenv env -p python3
. env/bin/activate
pip install -r requirements.txt
pip install channels_redis
I'm unable to install new tools like Fabric and Virtualenvwrapper. Any suggestions? I was having the same issue before I started using the virtualenv delivery -- tried that as a solution. Here's the error that I got when trying to install Fabric:
^C(delivery) Bryans-MacBook-Pro:skyway bryanaltman$
(delivery) Bryans-MacBook-Pro:skyway bryanaltman$ pip install fabric
Collecting fabric
Using cached Fabric-1.13.1-py2-none-any.whl
Collecting paramiko<3.0,>=1.10 (from fabric)
Using cached paramiko-2.1.1-py2.py3-none-any.whl
Requirement already satisfied: pyasn1>=0.1.7 in /Library/Python/2.7/site-packages (from paramiko<3.0,>=1.10->fabric)
Collecting cryptography>=1.1 (from paramiko<3.0,>=1.10->fabric)
Using cached cryptography-1.7.1-cp27-cp27m-macosx_10_10_intel.whl
Requirement already satisfied: cffi>=1.4.1 in /Library/Python/2.7/site-packages (from cryptography>=1.1->paramiko<3.0,>=1.10->fabric)
Collecting setuptools>=11.3 (from cryptography>=1.1->paramiko<3.0,>=1.10->fabric)
Using cached setuptools-33.1.1-py2.py3-none-any.whl
Requirement already satisfied: six>=1.4.1 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from cryptography>=1.1->paramiko<3.0,>=1.10->fabric)
Collecting idna>=2.0 (from cryptography>=1.1->paramiko<3.0,>=1.10->fabric)
Using cached idna-2.2-py2.py3-none-any.whl
Collecting ipaddress (from cryptography>=1.1->paramiko<3.0,>=1.10->fabric)
Using cached ipaddress-1.0.18-py2-none-any.whl
Collecting enum34 (from cryptography>=1.1->paramiko<3.0,>=1.10->fabric)
Using cached enum34-1.1.6-py2-none-any.whl
Requirement already satisfied: pycparser in /Library/Python/2.7/site-packages (from cffi>=1.4.1->cryptography>=1.1->paramiko<3.0,>=1.10->fabric)
Installing collected packages: setuptools, idna, ipaddress, enum34, cryptography, paramiko, fabric
Found existing installation: setuptools 1.1.6
Uninstalling setuptools-1.1.6:
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 299, in move
copytree(src, real_dst, symlinks=True)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 208, in copytree
raise Error, errors
Error: [('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py', '/var/folders/0j/zlx16g516yn1_228k12dbrl00000gn/T/pip-KdYiO4-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py', "[Errno 1] Operation not permitted: '/var/folders/0j/zlx16g516yn1_228k12dbrl00000gn/T/pip-KdYiO4-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc', '/var/folders/0j/zlx16g516yn1_228k12dbrl00000gn/T/pip-KdYiO4-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc', "[Errno 1] Operation not permitted: '/var/folders/0j/zlx16g516yn1_228k12dbrl00000gn/T/pip-KdYiO4-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', '/var/folders/0j/zlx16g516yn1_228k12dbrl00000gn/T/pip-KdYiO4-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', "[Errno 1] Operation not permitted: '/var/folders/0j/zlx16g516yn1_228k12dbrl00000gn/T/pip-KdYiO4-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', '/var/folders/0j/zlx16g516yn1_228k12dbrl00000gn/T/pip-KdYiO4-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', "[Errno 1] Operation not permitted: '/var/folders/0j/zlx16g516yn1_228k12dbrl00000gn/T/pip-KdYiO4-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', '/var/folders/0j/zlx16g516yn1_228k12dbrl00000gn/T/pip-KdYiO4-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', "[Errno 1] Operation not permitted: '/var/folders/0j/zlx16g516yn1_228k12dbrl00000gn/T/pip-KdYiO4-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib'")]
(delivery) Bryans-MacBook-Pro:skyway bryanaltman$
It looks like your virtualenv might be corrupted. The easiest thing is to delete the following files and then recreate it. You’ll also want to make sure that you have the latest python 2.7 installed using brew. You’ll want to verify that you have checked in all your work so far in case you have any files of your own located in the bin, lib or include directories.
brew install python
cd /path/to/skyway
deactivate # if you are already in a virtualenv session
if [ -f './Python' ] ; then rm -f ./Python ; fi
rm -r bin lib include
virtualenv . -p /usr/local/bin/python
. bin/activate
pip install fabric
I'm following a tutorial to AWS and I need to install the AWS CLI on my Mac with the following result:
sisko$ pip install awscli
Collecting awscli
Using cached awscli-1.10.63-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): docutils>=0.10 in /Library/Python/2.7/site-packages (from awscli)
Requirement already satisfied (use --upgrade to upgrade): rsa<=3.5.0,>=3.1.2 in /Library/Python/2.7/site-packages (from awscli)
Collecting s3transfer<0.2.0,>=0.1.0 (from awscli)
Using cached s3transfer-0.1.3-py2.py3-none-any.whl
Collecting botocore==1.4.53 (from awscli)
Using cached botocore-1.4.53-py2.py3-none-any.whl
Collecting colorama<=0.3.7,>=0.2.5 (from awscli)
Using cached colorama-0.3.7-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.3 in /Library/Python/2.7/site-packages (from rsa<=3.5.0,>=3.1.2->awscli)
Requirement already satisfied (use --upgrade to upgrade): futures<4.0.0,>=2.2.0; python_version == "2.6" or python_version == "2.7" in /Library/Python/2.7/site-packages (from s3transfer<0.2.0,>=0.1.0->awscli)
Collecting python-dateutil<3.0.0,>=2.1 (from botocore==1.4.53->awscli)
Using cached python_dateutil-2.5.3-py2.py3-none-any.whl
Collecting jmespath<1.0.0,>=0.7.1 (from botocore==1.4.53->awscli)
Using cached jmespath-0.9.0-py2.py3-none-any.whl
Collecting six>=1.5 (from python-dateutil<3.0.0,>=2.1->botocore==1.4.53->awscli)
Using cached six-1.10.0-py2.py3-none-any.whl
Installing collected packages: six, python-dateutil, jmespath, botocore, s3transfer, colorama, awscli
Found existing installation: six 1.4.1
DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling six-1.4.1:
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/commands/install.py", line 317, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_set.py", line 736, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_install.py", line 742, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
copy2(src, real_dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
copystat(src, dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/var/folders/s4/snsk01z551qdj37bpj3dtzpm0000gn/T/pip-38wpB3-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
The last section of the output complains about an exception which I know nothing on how to resolve.
I downloaded and installed Python-3.5.2 but when I execute python --version my commandline reports Python 2.7.10
I just realised there is provision to surpress that exception with the following:
$ sudo pip install awscli --ignore-installed six
Issue resolved. Hope this helps others
This is totally bizarre, because this worked previously on my machine. I forked a repo from github, created a new virtualenv, and tried
pip install -r requirements.txt
I received the following error:
Downloading/unpacking Flask==0.10.1 (from -r requirements.txt (line 1))
Could not find any downloads that satisfy the requirement Flask==0.10.1 (from -r requirements.txt (line 1))
Cleaning up...
No distributions at all found for Flask==0.10.1 (from -r requirements.txt (line 1))
Storing debug log for failure in /home/michael/.pip/pip.log
And the following was stored in my debug log:
/home/michael/git/blueprint_ex/env/bin/pip run on Thu Dec 24 09:57:08 2015
Downloading/unpacking Flask==0.10.1 (from -r requirements.txt (line 1))
Getting page https://pypi.python.org/simple/Flask/
URLs to search for versions for Flask==0.10.1 (from -r requirements.txt (line 1)):
* https://pypi.python.org/simple/Flask/0.10.1
* https://pypi.python.org/simple/Flask/
Getting page https://pypi.python.org/simple/Flask/0.10.1
Could not fetch URL https://pypi.python.org/simple/Flask/0.10.1: 404 Client Error: Not Found
Will skip URL https://pypi.python.org/simple/Flask/0.10.1 when looking for download links for Flask==0.10.1 (from -r requirements.txt (line 1))
Analyzing links from page https://pypi.python.org/simple/flask/
Could not find any downloads that satisfy the requirement Flask==0.10.1 (from -r requirements.txt (line 1))
Cleaning up...
No distributions at all found for Flask==0.10.1 (from -r requirements.txt (line 1))
Exception information:
Traceback (most recent call last):
File "/home/michael/git/blueprint_ex/env/local/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/home/michael/git/blueprint_ex/env/local/lib/python2.7/site-packages/pip/commands/install.py", line 304, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/home/michael/git/blueprint_ex/env/local/lib/python2.7/site-packages/pip/req.py", line 1178, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "/home/michael/git/blueprint_ex/env/local/lib/python2.7/site-packages/pip/index.py", line 277, in find_requirement
raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for Flask==0.10.1 (from -r requirements.txt (line 1))
My requirements.txt file looks like
Flask==0.10.1
Flask-SQLAlchemy==2.0
Flask-WTF==0.11
Jinja2==2.8
MarkupSafe==0.23
SQLAlchemy==1.0.10
WTForms==2.1
Werkzeug==0.11.3
argparse==1.2.1
coverage==3.7.1
itsdangerous==0.24
nose==1.3.4
wsgiref==0.1.2
Does anyone have any idea what the problem is? I was previously able to install Flask on a different virtualenv on the same machine, so this is particularly frustrating. Moreover, I tried
pip install SQLAlchemy
and this worked fine.
pip install Flask
or
pip install Flask==0.10.1
give me the same error messages as above.
Any ideas?
Thanks!
Pls test whether you can access "https://pypi.python.org/simple/Flask/". Maybe you need to set proxy for https.