I tried installing GraphLab Create through pip. Zipped through the steps until the final step stopped me in my tracks.
The final command:
pip install --upgrade --no-cache-dir https://get.dato.com/GraphLab-Create/1.7.1/email#gmail.com/*******license key****/GraphLab-Create-License.tar.gz
This gives the following output:
Collecting https://get.dato.com/GraphLab-Create/1.7.1/***************#gmail.com/********license***********/GraphLab-Create-License.tar.gz Downloading https://get.dato.com/GraphLab-Create/1.7.1/***************#gmail.com/*******license*************/GraphLab-Create-License.tar.gz Collecting graphlab-create>=1.7.1 (from GraphLab-Create-License==1.7.1) Downloading GraphLab_Create-1.7.1-cp27-none-win_amd64.whl (45.0MB) Requirement already up-to-date: boto==2.33.0 in c:\anaconda2\lib\site-packages (from graphlab-create>=1.7.1->GraphLab-Create-License==1.7.1) Requirement already up-to-date: prettytable==0.7.2 in c:\anaconda2\lib\site-packages (from graphlab-create>=1.7.1->GraphLab-Create-License==1.7.1) Requirement already up-to-date: decorator==3.4.0 in c:\anaconda2\lib\site-packages (from graphlab-create>=1.7.1->GraphLab-Create-License==1.7.1) Requirement already up-to-date: librato-metrics==0.4.9 in c:\anaconda2\lib\site-packages (from graphlab-create>=1.7.1->GraphLab-Create-License==1.7.1) Requirement already up-to-date: awscli==1.6.2 in c:\anaconda2\lib\site-packages (from graphlab-create>=1.7.1->GraphLab-Create-License==1.7.1) Requirement already up-to-date: multipledispatch>=0.4.7 in c:\anaconda2\lib\site-packages (from graphlab-create>=1.7.1->GraphLab-Create-License==1.7.1) Collecting sseclient==0.0.8 (from graphlab-create>=1.7.1->GraphLab-Create-License==1.7.1) Downloading sseclient-0.0.8.tar.gz Collecting certifi==2015.04.28 (from graphlab-create>=1.7.1->GraphLab-Create-License==1.7.1) Downloading certifi-2015.04.28-py2.py3-none-any.whl (373kB) Requirement already up-to-date: requests==2.3.0 in c:\anaconda2\lib\site-packages (from graphlab-create>=1.7.1->GraphLab-Create-License==1.7.1) Requirement already up-to-date: mixpanel-py==3.1.1 in c:\anaconda2\lib\site-packages (from graphlab-create>=1.7.1->GraphLab-Create-License==1.7.1) Requirement already up-to-date: tornado==4.1 in c:\anaconda2\lib\site-packages (from graphlab-create>=1.7.1->GraphLab-Create-License==1.7.1) Requirement already up-to-date: six in c:\anaconda2\lib\site-packages (from librato-metrics==0.4.9->graphlab-create>=1.7.1->GraphLab-Create-License==1.7.1) Requirement already up-to-date: rsa==3.1.2 in c:\anaconda2\lib\site-packages (from awscli==1.6.2->graphlab-create>=1.7.1->GraphLab-Create-License==1.7.1) Requirement already up-to-date: botocore<0.74.0,>=0.73.0 in c:\anaconda2\lib\site-packages (from awscli==1.6.2->graphlab-create>=1.7.1->GraphLab-Create-License==1.7.1) Requirement already up-to-date: docutils>=0.10 in c:\anaconda2\lib\site-packages (from awscli==1.6.2->graphlab-create>=1.7.1->GraphLab-Create-License==1.7.1) Requirement already up-to-date: colorama==0.2.5 in c:\anaconda2\lib\site-packages (from awscli==1.6.2->graphlab-create>=1.7.1->GraphLab-Create-License==1.7.1) Requirement already up-to-date: bcdoc<0.13.0,>=0.12.0 in c:\anaconda2\lib\site-packages (from awscli==1.6.2->graphlab-create>=1.7.1->GraphLab-Create-License==1.7.1) Requirement already up-to-date: backports.ssl-match-hostname in c:\anaconda2\lib\site-packages (from tornado==4.1->graphlab-create>=1.7.1->GraphLab-Create-License==1.7.1) Requirement already up-to-date: pyasn1>=0.1.3 in c:\anaconda2\lib\site-packages (from rsa==3.1.2->awscli==1.6.2->graphlab-create>=1.7.1->GraphLab-Create-License==1.7.1) Requirement already up-to-date: jmespath==0.5.0 in c:\anaconda2\lib\site-packages (from botocore<0.74.0,>=0.73.0->awscli==1.6.2->graphlab-create>=1.7.1->GraphLab-Create-License==1.7.1) Requirement already up-to-date: python-dateutil>=2.1 in c:\anaconda2\lib\site-packages (from botocore<0.74.0,>=0.73.0->awscli==1.6.2->graphlab-create>=1.7.1->GraphLab-Create-License==1.7.1) Installing collected packages: sseclient, certifi, graphlab-create, GraphLab-Create-License Running setup.py install for sseclient Found existing installation: certifi 2015.11.20.1
Uninstalling certifi-2015.11.20.1:
Successfully uninstalled certifi-2015.11.20.1 Running setup.py install for GraphLab-Create-License
Complete output from command C:\Anaconda2\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\abhish~1\\appdata\\local\\temp\\pip-7mleag-build\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\abhish~1\appdata\local\temp\pip-bv7hrn-record\install-record.txt
--single-version-externally-managed --compile:
running install
running build
running install_egg_info
running egg_info
writing requirements to GraphLab_Create_License.egg-info\requires.txt
writing GraphLab_Create_License.egg-info\PKG-INFO
writing top-level names to GraphLab_Create_License.egg-info\top_level.txt
writing dependency_links to GraphLab_Create_License.egg-info\dependency_links.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'GraphLab_Create_License.egg-info\SOURCES.txt'
writing manifest file 'GraphLab_Create_License.egg-info\SOURCES.txt'
Copying GraphLab_Create_License.egg-info to C:\Anaconda2\Lib\site-packages\GraphLab_Create_License-1.7.1-py2.7.egg-info
running install_scripts
writing list of installed files to 'c:\users\abhish~1\appdata\local\temp\pip-bv7hrn-record\install-record.txt'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\abhish~1\appdata\local\temp\pip-7mleag-build\setup.py", line 61, in <module>
cmdclass=dict(install=SetLicense)
File "C:\Anaconda2\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "C:\Anaconda2\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Anaconda2\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "c:\users\abhish~1\appdata\local\temp\pip-7mleag-build\setup.py", line 41, in run
config.read(config_filename)
File "C:\Anaconda2\lib\ConfigParser.py", line 305, in read
self._read(fp, filename)
File "C:\Anaconda2\lib\ConfigParser.py", line 512, in _read
raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: C:\Users\abhish**\.graphlab\config, line: 1
'\x00\***lots of hex code***x00'
----------------------------------------
What is wrong and how do I fix it?
The config file seems corrupted, possibly due to a previous failed installation; it should always contain section headers.
Try deleting the config file (C:\Users\abhish**\.graphlab\config) and re-installing, which will re-create it.
Related
Lets start with I am a noob to Python.
I am trying to install osmnx on a Mac using Terminal - but getting the following error. Any idea on a resolution to this?
I have independently installed rtree successfully, so not sure what else to try?
pip3 install mysql-connector-python
Requirement already satisfied: mysql-connector-python in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (8.0.21)
Requirement already satisfied: protobuf>=3.0.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from mysql-connector-python) (3.12.4)
Requirement already satisfied: six>=1.9 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from protobuf>=3.0.0->mysql-connector-python) (1.15.0)
Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from protobuf>=3.0.0->mysql-connector-python) (49.6.0)
familys-imac:~ markhowman$ pip3 install osmnx
Collecting osmnx
Using cached osmnx-0.15.1-py2.py3-none-any.whl (84 kB)
Collecting matplotlib>=3.2
Using cached matplotlib-3.3.1-cp38-cp38-macosx_10_9_x86_64.whl (8.5 MB)
Requirement already satisfied: networkx>=2.4 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from osmnx) (2.4)
Collecting descartes>=1.1
Using cached descartes-1.1.0-py3-none-any.whl (5.8 kB)
Collecting requests>=2.23
Using cached requests-2.24.0-py2.py3-none-any.whl (61 kB)
Requirement already satisfied: numpy>=1.18 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from osmnx) (1.19.1)
Requirement already satisfied: pyproj>=2.6 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from osmnx) (2.6.1.post1)
Requirement already satisfied: pandas>=1.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from osmnx) (1.1.0)
Requirement already satisfied: Shapely>=1.7 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from osmnx) (1.7.0)
Collecting Rtree>=0.9
Using cached Rtree-0.9.4.tar.gz (62 kB)
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ck/8_3lww7j31xdm3m91c417x_c0000gn/T/pip-install-oy9i8ju5/rtree/setup.py'"'"'; __file__='"'"'/private/var/folders/ck/8_3lww7j31xdm3m91c417x_c0000gn/T/pip-install-oy9i8ju5/rtree/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/ck/8_3lww7j31xdm3m91c417x_c0000gn/T/pip-pip-egg-info-k40std78
cwd: /private/var/folders/ck/8_3lww7j31xdm3m91c417x_c0000gn/T/pip-install-oy9i8ju5/rtree/
Complete output (15 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/ck/8_3lww7j31xdm3m91c417x_c0000gn/T/pip-install-oy9i8ju5/rtree/setup.py", line 3, in <module>
import rtree
File "/private/var/folders/ck/8_3lww7j31xdm3m91c417x_c0000gn/T/pip-install-oy9i8ju5/rtree/rtree/__init__.py", line 1, in <module>
from .index import Rtree
File "/private/var/folders/ck/8_3lww7j31xdm3m91c417x_c0000gn/T/pip-install-oy9i8ju5/rtree/rtree/index.py", line 6, in <module>
from . import core
File "/private/var/folders/ck/8_3lww7j31xdm3m91c417x_c0000gn/T/pip-install-oy9i8ju5/rtree/rtree/core.py", line 143, in <module>
rt.Error_GetLastErrorNum.restype = ctypes.c_int
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ctypes/__init__.py", line 386, in __getattr__
func = self.__getitem__(name)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ctypes/__init__.py", line 391, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(RTLD_DEFAULT, Error_GetLastErrorNum): symbol not found
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Make sure you install OSMnx according to its installation instructions.
OSMnx is pure Python and thus its installation alone is trivial, but, it depends on geopandas which itself has tricky dependencies (like rtree) to install. If you follow OSMnx's documented installation instructions, it should all be smooth and seamless.
See also this related answer.
When trying to install the Textract package in pycharm on Windows 10, the package installer returns a UnicodeDecodeError for EbookLib 0.15 in the README.md.
I have attempted the solutions provided at: https://github.com/deanmalmgren/textract/issues/194
and the solutions provided almost worked for EbookLib except running pip install textract
in terminal does not seem to install the actual module.
E:\Main>pip install textract
Requirement already satisfied: textract in e:\conda\lib\site-packages (1.6.1)
Requirement already satisfied: EbookLib==0.15 in e:\ebooklib-0.15 (from textract) (0.15)
Requirement already satisfied: python-pptx==0.6.5 in e:\conda\lib\site-packages (from textract) (0.6.5)
Requirement already satisfied: argcomplete==1.8.2 in e:\conda\lib\site-packages (from textract) (1.8.2)
Requirement already satisfied: docx2txt==0.6 in e:\conda\lib\site-packages (from textract) (0.6)
Requirement already satisfied: SpeechRecognition==3.6.3 in e:\conda\lib\site-packages (from textract) (3.6.3)
Requirement already satisfied: xlrd==1.0.0 in e:\conda\lib\site-packages (from textract) (1.0.0)
Requirement already satisfied: six==1.10.0 in e:\conda\lib\site-packages (from textract) (1.10.0)
Requirement already satisfied: chardet==2.3.0 in e:\conda\lib\site-packages (from textract) (2.3.0)
Requirement already satisfied: beautifulsoup4==4.5.3 in e:\conda\lib\site-packages (from textract) (4.5.3)
Requirement already satisfied: pocketsphinx==0.1.3 in e:\conda\lib\site-packages (from textract) (0.1.3)
Requirement already satisfied: lxml in e:\conda\lib\site-packages (from EbookLib==0.15->textract) (4.3.3)
Requirement already satisfied: XlsxWriter>=0.5.7 in e:\conda\lib\site-packages (from python-pptx==0.6.5->textract)
(1.1.8)
Requirement already satisfied: Pillow>=2.6.1 in e:\conda\lib\site-packages (from python-pptx==0.6.5->textract) (6.0
.0)
>>>import textract
Traceback (most recent call last):
File "E:/Main/Main.py", line 22, in <module>
import textract
ModuleNotFoundError: No module named 'textract'
The installer should properly receive the EbookLib version and run its setup.py but it ends up using the flawed version that has been cached rather than the local file I have decoded.
Collecting EbookLib==0.15 (from textract)
Using cached https://files.pythonhosted.org/packages/04/30/2cbf65fa9587a1ecc66a78eea91f9189ead8fdadd5e009115bce34529aa6/EbookLib-0.15.tar.gz
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Feraz\AppData\Local\Temp\pycharm-packaging\EbookLib\setup.py", line 13, in <module>
long_description = open('README.md').read(),
File "E:\Python37\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 1671: character maps to <undefined>
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in C:\Users\Feraz\AppData\Local\Temp\pycharm-packaging\EbookLib\
I am using a python package patroni version 1.0 on Ubuntu 14. On doing ls -lrt /usr/local/lib/python2.7/dist-packages/ I am seeing the permission like below
But once I upgrade the patroni via the command sudo pip install patroni --upgrade I am seeing the permission of the patroni changes after upgrade
The installation output is -
sudo pip install patroni --upgrade
The directory '/home/ubuntu/.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/ubuntu/.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.
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Collecting patroni
Requirement already up-to-date: requests in /usr/local/lib/python2.7/dist-packages (from patroni)
Collecting cdiff (from patroni)
Requirement already up-to-date: six>=1.7 in /usr/local/lib/python2.7/dist-packages (from patroni)
Collecting python-etcd<0.5,>=0.4.3 (from patroni)
Requirement already up-to-date: prettytable>=0.7 in /usr/local/lib/python2.7/dist-packages (from patroni)
Requirement already up-to-date: tzlocal in /usr/local/lib/python2.7/dist-packages (from patroni)
Requirement already up-to-date: boto in /usr/local/lib/python2.7/dist-packages (from patroni)
Collecting python-consul>=0.7.0 (from patroni)
Downloading python_consul-0.7.2-py2.py3-none-any.whl
Requirement already up-to-date: psycopg2>=2.6.1 in /usr/local/lib/python2.7/dist-packages (from patroni)
Requirement already up-to-date: kazoo==2.2.1 in /usr/local/lib/python2.7/dist-packages (from patroni)
Requirement already up-to-date: urllib3>=1.9 in /usr/local/lib/python2.7/dist-packages (from patroni)
Requirement already up-to-date: click>=4.1 in /usr/local/lib/python2.7/dist-packages (from patroni)
Requirement already up-to-date: python-dateutil in /usr/local/lib/python2.7/dist-packages (from patroni)
Collecting psutil (from patroni)
Requirement already up-to-date: PyYAML in /usr/local/lib/python2.7/dist-packages (from patroni)
Requirement already up-to-date: certifi>=2017.4.17 in /usr/local/lib/python2.7/dist-packages (from requests->patroni)
Requirement already up-to-date: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python2.7/dist-packages (from requests->patroni)
Requirement already up-to-date: idna<2.7,>=2.5 in /usr/local/lib/python2.7/dist-packages (from requests->patroni)
Requirement already up-to-date: dnspython>=1.13.0 in /usr/local/lib/python2.7/dist-packages (from python-etcd<0.5,>=0.4.3->patroni)
Requirement already up-to-date: pytz in /usr/local/lib/python2.7/dist-packages (from tzlocal->patroni)
Installing collected packages: cdiff, python-etcd, python-consul, psutil, patroni
Found existing installation: python-etcd 0.4.3
Uninstalling python-etcd-0.4.3:
Successfully uninstalled python-etcd-0.4.3
Found existing installation: python-consul 0.6.0
Uninstalling python-consul-0.6.0:
Successfully uninstalled python-consul-0.6.0
Found existing installation: patroni 1.0
Uninstalling patroni-1.0:
Successfully uninstalled patroni-1.0
Successfully installed cdiff-1.0 patroni-1.3.6 psutil-5.4.1 python-consul-0.7.2 python-etcd-0.4.5
You are using pip version 7.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
I had to use sudo if I do just pip install patroni --upgrade then it is failing with the below error:-
pip install patroni --upgrade
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Collecting patroni
Downloading patroni-1.3.6.tar.gz (90kB)
100% |████████████████████████████████| 94kB 1.0MB/s
Requirement already up-to-date: urllib3>=1.9 in /usr/local/lib/python2.7/dist-packages (from patroni)
Requirement already up-to-date: boto in /usr/local/lib/python2.7/dist-packages (from patroni)
Requirement already up-to-date: psycopg2>=2.6.1 in /usr/local/lib/python2.7/dist-packages (from patroni)
Requirement already up-to-date: PyYAML in /usr/local/lib/python2.7/dist-packages (from patroni)
Requirement already up-to-date: requests in /usr/local/lib/python2.7/dist-packages (from patroni)
Requirement already up-to-date: six>=1.7 in /usr/local/lib/python2.7/dist-packages (from patroni)
Requirement already up-to-date: kazoo==2.2.1 in /usr/local/lib/python2.7/dist-packages (from patroni)
Collecting python-etcd<0.5,>=0.4.3 (from patroni)
Downloading python-etcd-0.4.5.tar.gz
Collecting python-consul>=0.7.0 (from patroni)
Downloading python_consul-0.7.2-py2.py3-none-any.whl
Requirement already up-to-date: click>=4.1 in /usr/local/lib/python2.7/dist-packages (from patroni)
Requirement already up-to-date: prettytable>=0.7 in /usr/local/lib/python2.7/dist-packages (from patroni)
Requirement already up-to-date: tzlocal in /usr/local/lib/python2.7/dist-packages (from patroni)
Requirement already up-to-date: python-dateutil in /usr/local/lib/python2.7/dist-packages (from patroni)
Collecting psutil (from patroni)
Downloading psutil-5.4.1.tar.gz (408kB)
100% |████████████████████████████████| 409kB 1.1MB/s
Collecting cdiff (from patroni)
Downloading cdiff-1.0.tar.gz
Requirement already up-to-date: certifi>=2017.4.17 in /usr/local/lib/python2.7/dist-packages (from requests->patroni)
Requirement already up-to-date: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python2.7/dist-packages (from requests->patroni)
Requirement already up-to-date: idna<2.7,>=2.5 in /usr/local/lib/python2.7/dist-packages (from requests->patroni)
Requirement already up-to-date: dnspython>=1.13.0 in /usr/local/lib/python2.7/dist-packages (from python-etcd<0.5,>=0.4.3->patroni)
Requirement already up-to-date: pytz in /usr/local/lib/python2.7/dist-packages (from tzlocal->patroni)
Building wheels for collected packages: patroni, python-etcd, psutil, cdiff
Running setup.py bdist_wheel for patroni
Stored in directory: /home/ubuntu/.cache/pip/wheels/86/5a/e3/cb4ac4ecf20bc7a2956062d3c3ad15c660a993a0cc3aa23d35
Running setup.py bdist_wheel for python-etcd
Stored in directory: /home/ubuntu/.cache/pip/wheels/d1/79/df/26facc508cdb5fefaf3d574fb634d848754a7e69d95f53f056
Running setup.py bdist_wheel for psutil
Stored in directory: /home/ubuntu/.cache/pip/wheels/05/a2/2a/2015d6af91fb5a4cc5bcdfa9699034e2f624fc9cc5acde7ab9
Running setup.py bdist_wheel for cdiff
Stored in directory: /home/ubuntu/.cache/pip/wheels/d9/67/dc/d53a3cfea638a5652d0d2054b447d67a7d2a2bdebf0f67765e
Successfully built patroni python-etcd psutil cdiff
Installing collected packages: python-etcd, python-consul, psutil, cdiff, patroni
Found existing installation: python-etcd 0.4.3
Uninstalling python-etcd-0.4.3:
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 211, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 311, in run
root=options.root_path,
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 640, in install
requirement.uninstall(auto_confirm=True)
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 716, in uninstall
paths_to_remove.remove(auto_confirm)
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_uninstall.py", line 125, in remove
renames(path, new_path)
File "/usr/local/lib/python2.7/dist-packages/pip/utils/__init__.py", line 315, in renames
shutil.move(old, new)
File "/usr/lib/python2.7/shutil.py", line 303, in move
os.unlink(src)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/etcd/__init__.py'
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
You are using pip version 7.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Can someone let me know
Why is the permission changing after upgrade?
How can I have the same permission even after the upgrade?
I'm sure the problem is in sudo. sudo runs a new shell under root user and the new shell reads configuration files from /root/ directory. It seems /root/.bash_profile has a command umask 027 in it. Change it to 022 and the problem should be fixed.
I'm trying to install shub, the Scrapinghub command line tool in OSX 10.11.6 (El Capitan) via pip. The installation script downloads the required modules and at some point returns the following error:
OSError: [Errno 1] Operation not permitted: '/System/Library/Frameworks/Python.framework/Versions/2.7/man'
I used the following command:
$ sudo -H pip install shub --ignore-installed six
and received the following traceback:
Collecting shub
Using cached shub-2.7.0-py2.py3-none-any.whl
Collecting six
Using cached six-1.11.0-py2.py3-none-any.whl
Collecting retrying (from shub)
Using cached retrying-1.3.3.tar.gz
Collecting tqdm (from shub)
Using cached tqdm-4.19.2-py2.py3-none-any.whl
Collecting pip (from shub)
Using cached pip-9.0.1-py2.py3-none-any.whl
Collecting PyYAML (from shub)
Using cached PyYAML-3.12.tar.gz
Collecting docker-py (from shub)
Using cached docker_py-1.10.6-py2.py3-none-any.whl
Collecting click (from shub)
Using cached click-6.7-py2.py3-none-any.whl
Collecting requests (from shub)
Using cached requests-2.18.4-py2.py3-none-any.whl
Collecting scrapinghub>=1.9.0 (from shub)
Using cached scrapinghub-2.0.1-py2.py3-none-any.whl
Collecting backports.ssl-match-hostname>=3.5; python_version < "3.5" (from docker-py->shub)
Using cached backports.ssl_match_hostname-3.5.0.1.tar.gz
Collecting ipaddress>=1.0.16; python_version < "3.3" (from docker-py->shub)
Using cached ipaddress-1.0.18-py2-none-any.whl
Collecting docker-pycreds>=0.2.1 (from docker-py->shub)
Using cached docker_pycreds-0.2.1-py2.py3-none-any.whl
Collecting websocket-client>=0.32.0 (from docker-py->shub)
Using cached websocket_client-0.44.0-py2.py3-none-any.whl
Collecting urllib3<1.23,>=1.21.1 (from requests->shub)
Using cached urllib3-1.22-py2.py3-none-any.whl
Collecting idna<2.7,>=2.5 (from requests->shub)
Using cached idna-2.6-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests->shub)
Using cached chardet-3.0.4-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests->shub)
Using cached certifi-2017.7.27.1-py2.py3-none-any.whl
Installing collected packages: six, retrying, tqdm, pip, PyYAML, urllib3, idna, chardet, certifi, requests, backports.ssl-match-hostname, ipaddress, docker-pycreds, websocket-client, docker-py, click, scrapinghub, shub
Running setup.py install for retrying ... done
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 784, in install
**kwargs
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 377, in move_wheel_files
clobber(source, dest, False, fixer=fixer, filter=filter)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 316, in clobber
ensure_dir(destdir)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/utils/__init__.py", line 83, in ensure_dir
os.makedirs(path)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 1] Operation not permitted: '/System/Library/Frameworks/Python.framework/Versions/2.7/man'
Any thoughts as to what is causing this problem? Thanks in advance.
EDIT:
The problem was solved by installing Homebrew. The instructions are on this link: https://docs.scrapy.org/en/latest/intro/install.html#mac-os-x
After Homebrew was installed, I installed shub with the following command:
pip install shub and received the following:
Collecting shub
Using cached shub-2.7.0-py2.py3-none-any.whl
Requirement already satisfied: retrying in /Library/Python/2.7/site-packages (from shub)
Collecting click (from shub)
Using cached click-6.7-py2.py3-none-any.whl
Requirement already satisfied: requests in /Library/Python/2.7/site-packages (from shub)
Collecting scrapinghub>=1.9.0 (from shub)
Using cached scrapinghub-2.0.1-py2.py3-none-any.whl
Requirement already satisfied: pip in /usr/local/lib/python2.7/site-packages (from shub)
Collecting docker-py (from shub)
Using cached docker_py-1.10.6-py2.py3-none-any.whl
Requirement already satisfied: PyYAML in /Library/Python/2.7/site-packages (from shub)
Requirement already satisfied: tqdm in /Library/Python/2.7/site-packages (from shub)
Requirement already satisfied: six>=1.7.0 in /Library/Python/2.7/site-packages (from shub)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /Library/Python/2.7/site-packages (from requests->shub)
Requirement already satisfied: idna<2.7,>=2.5 in /Library/Python/2.7/site-packages (from requests->shub)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /Library/Python/2.7/site-packages (from requests->shub)
Requirement already satisfied: certifi>=2017.4.17 in /Library/Python/2.7/site-packages (from requests->shub)
Requirement already satisfied: backports.ssl-match-hostname>=3.5; python_version < "3.5" in /Library/Python/2.7/site-packages (from docker-py->shub)
Requirement already satisfied: ipaddress>=1.0.16; python_version < "3.3" in /Library/Python/2.7/site-packages (from docker-py->shub)
Collecting docker-pycreds>=0.2.1 (from docker-py->shub)
Using cached docker_pycreds-0.2.1-py2.py3-none-any.whl
Collecting websocket-client>=0.32.0 (from docker-py->shub)
Using cached websocket_client-0.44.0-py2.py3-none-any.whl
Installing collected packages: click, scrapinghub, docker-pycreds, websocket-client, docker-py, shub
Successfully installed click-6.7 docker-py-1.10.6 docker-pycreds-0.2.1 scrapinghub-2.0.1 shub-2.7.0 websocket-client-0.44.0
Now shub is installed.
NEW PROBLEM:
shub has been installed, but none of the shub commands are returning data. When using the shub login command, I receive the following traceback:
Traceback (most recent call last):
File "/usr/local/bin/shub", line 7, in <module>
from shub.tool import cli
File "/usr/local/lib/python2.7/site-packages/shub/tool.py", line 57, in <module>
command_module = importlib.import_module(module_path)
File "/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/local/lib/python2.7/site-packages/shub/deploy.py", line 10, in <module>
import setuptools
File "/usr/local/lib/python2.7/site-packages/setuptools/__init__.py", line 10, in <module>
from setuptools.extern.six.moves import filter, map
File "/usr/local/lib/python2.7/site-packages/setuptools/setuptools/__init__.py", line 160, in <module>
monkey.patch_all()
File "/usr/local/lib/python2.7/site-packages/setuptools/setuptools/monkey.py", line 67, in patch_all
distutils.core.Command = setuptools.Command
AttributeError: 'module' object has no attribute 'Command'
I checked to see if there were any required version of packaging present that i needed, but everything is current.
Any help is greatly appreciated. Thanks in advance.
I'm new to machine learning, today I follow this tutorial:
https://codelabs.developers.google.com/codelabs/cpb102-txf-learning/index.html
But at step 5 I got an error
chuanman2707#transfer-learning-169510:~$ cd cloudml-samples/flowers
chuanman2707#transfer-learning-169510:~/cloudml-samples/flowers$
DICT_FILE=gs://cloud-ml-data/img/flower_photos/dict.txt
chuanman2707#transfer-learning-169510:~/cloudml-samples/flowers$
PROJECT=$(gcloud config list project --format "value(core.project)")
chuanman2707#transfer-learning-169510:~/cloudml-samples/flowers$
BUCKET="gs://${PROJECT}-flower"
chuanman2707#transfer-learning-169510:~/cloudml-samples/flowers$
GCS_PATH="${BUCKET}/${USER}"
chuanman2707#transfer-learning-169510:~/cloudml-samples/flowers$ gsutil mb
$BUCKET
Creating gs://transfer-learning-169510-flower/...
chuanman2707#transfer-learning-169510:~/cloudml-samples/flowers$ python
trainer/preprocess.py \
> --input_dict "$DICT_FILE" \
> --input_path "gs://cloud-ml-data/img/flower_photos/eval_set.csv" \
> --output_path "${GCS_PATH}/preproc/eval" \
> --cloud
Traceback (most recent call last):
File "trainer/preprocess.py", line 71, in <module>
import apache_beam as beam
ImportError: No module named apache_beam
Please help me go through this tutorial. Thank you.
edit
After I tried to install pip install apache-beam I got this:
chuanman2707#transfer-learning-169510:~/cloudml-samples/flowers$ pip install apache-beam
Collecting apache-beam
Collecting avro<2.0.0,>=1.8.1 (from apache-beam)
Requirement already satisfied: mock<3.0.0,>=1.0.1 in /usr/local/lib/python2.7/dist-packages (from apache-beam)
Requirement already satisfied: crcmod<2.0,>=1.7 in /usr/local/lib/python2.7/dist-packages (from apache-beam)
Requirement already satisfied: grpcio<2.0,>=1.0 in /usr/local/lib/python2.7/dist-packages (from apache-beam)
Collecting protobuf==3.2.0 (from apache-beam)
Using cached protobuf-3.2.0-cp27-cp27mu-manylinux1_x86_64.whl
Collecting oauth2client<4.0.0,>=2.0.1 (from apache-beam)
Collecting httplib2<0.10,>=0.8 (from apache-beam)
Requirement already satisfied: pyyaml<4.0.0,>=3.12 in /home/chuanman2707/.local/lib/python2.7/site-packages (from apache-beam)
Requirement already satisfied: dill==0.2.6 in /usr/local/lib/python2.7/dist-packages (from apache-beam)
Requirement already satisfied: funcsigs>=1; python_version < "3.3" in /usr/local/lib/python2.7/dist-packages (from mock<3.0.0,>=1.0.1->apache-beam)
Requirement already satisfied: six>=1.9 in /usr/local/lib/python2.7/dist-packages (from mock<3.0.0,>=1.0.1->apache-beam)
Requirement already satisfied: pbr>=0.11 in /usr/local/lib/python2.7/dist-packages (from mock<3.0.0,>=1.0.1->apache-beam)
Requirement already satisfied: enum34>=1.0.4 in /usr/local/lib/python2.7/dist-packages (from grpcio<2.0,>=1.0->apache-beam)
Requirement already satisfied: futures>=2.2.0 in /usr/local/lib/python2.7/dist-packages (from grpcio<2.0,>=1.0->apache-beam)
Requirement already satisfied: setuptools in /usr/local/lib/python2.7/dist-packages (from protobuf==3.2.0->apache-beam)
Requirement already satisfied: rsa>=3.1.4 in /usr/local/lib/python2.7/dist-packages (from oauth2client<4.0.0,>=2.0.1->apache-beam)
Requirement already satisfied: pyasn1>=0.1.7 in /usr/local/lib/python2.7/dist-packages (from oauth2client<4.0.0,>=2.0.1->apache-beam)
Requirement already satisfied: pyasn1-modules>=0.0.5 in /usr/local/lib/python2.7/dist-packages (from oauth2client<4.0.0,>=2.0.1->apache-beam)
Requirement already satisfied: packaging>=16.8 in /usr/local/lib/python2.7/dist-packages (from setuptools->protobuf==3.2.0->apache-beam)
Requirement already satisfied: appdirs>=1.4.0 in /usr/local/lib/python2.7/dist-packages (from setuptools->protobuf==3.2.0->apache-beam)
Requirement already satisfied: pyparsing in /usr/local/lib/python2.7/dist-packages (from packaging>=16.8->setuptools->protobuf==3.2.0->apache-beam)
Installing collected packages: avro, protobuf, httplib2, oauth2client, apache-beam
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 784, in install
**kwargs
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 316, in clobber
ensure_dir(destdir)
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/utils/init.py", line 83, in ensure_dir
os.makedirs(path)
File "/usr/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/avro-1.8.2.dist-info'
chuanman2707#transfer-learning-169510:~/cloudml-samples/flowers$
What should I do next? Thank you
If you look carefully at the line: OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/avro-1.8.2.dist-info', you'll see that you need sudo permissions.
Run the following:
sudo pip install apache-beam