How to install tensorflow on python installed in linuxbrew (libstdc++.so.6 not found)? - python-2.7

I have the following version of Python installed via linuxbrew on Ubuntu 14.04. But pip gives me the following error when I tried to install tensorflow. Does anybody know whether there is a way to fix the problem?
$ python --version
Python 2.7.14
$ pip install tensorflow
Collecting tensorflow
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
I use Python 2 instead of 3. The previous question is about Python 3.
I have also tried this. But it does not work.
$ pip install https://storage.googleapis.com/tensorflow/linux/cpu/debian/jessie/tensorflow-1.9.0rc2-cp27-none-linux_x86_64.whl
Collecting tensorflow==1.9.0rc2 from https://storage.googleapis.com/tensorflow/linux/cpu/debian/jessie/tensorflow-1.9.0rc2-cp27-none-linux_x86_64.whl
Downloading https://storage.googleapis.com/tensorflow/linux/cpu/debian/jessie/tensorflow-1.9.0rc2-cp27-none-linux_x86_64.whl (51.6MB)
100% |████████████████████████████████| 51.6MB 320kB/s
Collecting astor>=0.6.0 (from tensorflow==1.9.0rc2)
Downloading https://files.pythonhosted.org/packages/35/6b/11530768cac581a12952a2aad00e1526b89d242d0b9f59534ef6e6a1752f/astor-0.7.1-py2.py3-none-any.whl
Requirement already satisfied: setuptools<=39.1.0 in ./.linuxbrew/lib/python2.7/site-packages (from tensorflow==1.9.0rc2) (36.5.0)
Collecting gast>=0.2.0 (from tensorflow==1.9.0rc2)
Downloading https://files.pythonhosted.org/packages/5c/78/ff794fcae2ce8aa6323e789d1f8b3b7765f601e7702726f430e814822b96/gast-0.2.0.tar.gz
Collecting protobuf>=3.4.0 (from tensorflow==1.9.0rc2)
Downloading https://files.pythonhosted.org/packages/77/78/a7f1ce761e2c738e209857175cd4f90a8562d1bde32868a8cd5290d58926/protobuf-3.6.1-py2.py3-none-any.whl (390kB)
100% |████████████████████████████████| 399kB 5.1MB/s
Requirement already satisfied: six>=1.10.0 in ./.linuxbrew/lib/python2.7/site-packages (from tensorflow==1.9.0rc2) (1.11.0)
Collecting enum34>=1.1.6 (from tensorflow==1.9.0rc2)
Downloading https://files.pythonhosted.org/packages/c5/db/e56e6b4bbac7c4a06de1c50de6fe1ef3810018ae11732a50f15f62c7d050/enum34-1.1.6-py2-none-any.whl
Collecting absl-py>=0.1.6 (from tensorflow==1.9.0rc2)
Downloading https://files.pythonhosted.org/packages/a7/86/67f55488ec68982270142c340cd23cd2408835dc4b24bd1d1f1e114f24c3/absl-py-0.4.1.tar.gz (88kB)
100% |████████████████████████████████| 92kB 5.1MB/s
Collecting backports.weakref>=1.0rc1 (from tensorflow==1.9.0rc2)
Downloading https://files.pythonhosted.org/packages/88/ec/f598b633c3d5ffe267aaada57d961c94fdfa183c5c3ebda2b6d151943db6/backports.weakref-1.0.post1-py2.py3-none-any.whl
Requirement already satisfied: wheel in ./.linuxbrew/lib/python2.7/site-packages (from tensorflow==1.9.0rc2) (0.30.0)
Collecting tensorboard<1.10.0,>=1.9.0 (from tensorflow==1.9.0rc2)
Downloading https://files.pythonhosted.org/packages/d5/98/e2e9d5afbc86cef0b2dd0f4ab791519b9bd305ea207e1e5c2f9a9f2f6da6/tensorboard-1.9.0-py2-none-any.whl (3.3MB)
100% |████████████████████████████████| 3.3MB 3.3MB/s
Requirement already satisfied: numpy>=1.13.3 in ./.linuxbrew/lib/python2.7/site-packages (from tensorflow==1.9.0rc2) (1.14.0)
Collecting mock>=2.0.0 (from tensorflow==1.9.0rc2)
Downloading https://files.pythonhosted.org/packages/e6/35/f187bdf23be87092bd0f1200d43d23076cee4d0dec109f195173fd3ebc79/mock-2.0.0-py2.py3-none-any.whl (56kB)
100% |████████████████████████████████| 61kB 4.5MB/s
Requirement already satisfied: termcolor>=1.1.0 in ./.linuxbrew/lib/python2.7/site-packages (from tensorflow==1.9.0rc2) (1.1.0)
Collecting grpcio>=1.8.6 (from tensorflow==1.9.0rc2)
Downloading https://files.pythonhosted.org/packages/99/ec/8545ffc34b5d0dca66261dabaa8bc44b93e8e1df3549792d9a5649f507cf/grpcio-1.14.2-cp27-cp27m-manylinux1_x86_64.whl (9.2MB)
100% |████████████████████████████████| 9.2MB 1.7MB/s
Collecting markdown>=2.6.8 (from tensorboard<1.10.0,>=1.9.0->tensorflow==1.9.0rc2)
Downloading https://files.pythonhosted.org/packages/6d/7d/488b90f470b96531a3f5788cf12a93332f543dbab13c423a5e7ce96a0493/Markdown-2.6.11-py2.py3-none-any.whl (78kB)
100% |████████████████████████████████| 81kB 5.0MB/s
Requirement already satisfied: futures>=3.1.1; python_version < "3" in ./.linuxbrew/lib/python2.7/site-packages (from tensorboard<1.10.0,>=1.9.0->tensorflow==1.9.0rc2) (3.2.0)
Collecting werkzeug>=0.11.10 (from tensorboard<1.10.0,>=1.9.0->tensorflow==1.9.0rc2)
Downloading https://files.pythonhosted.org/packages/20/c4/12e3e56473e52375aa29c4764e70d1b8f3efa6682bef8d0aae04fe335243/Werkzeug-0.14.1-py2.py3-none-any.whl (322kB)
100% |████████████████████████████████| 327kB 5.3MB/s
Collecting funcsigs>=1; python_version < "3.3" (from mock>=2.0.0->tensorflow==1.9.0rc2)
Downloading https://files.pythonhosted.org/packages/69/cb/f5be453359271714c01b9bd06126eaf2e368f1fddfff30818754b5ac2328/funcsigs-1.0.2-py2.py3-none-any.whl
Collecting pbr>=0.11 (from mock>=2.0.0->tensorflow==1.9.0rc2)
Downloading https://files.pythonhosted.org/packages/69/1c/98cba002ed975a91a0294863d9c774cc0ebe38e05bbb65e83314550b1677/pbr-4.2.0-py2.py3-none-any.whl (100kB)
100% |████████████████████████████████| 102kB 6.5MB/s
Building wheels for collected packages: gast, absl-py
Running setup.py bdist_wheel for gast ... done
Stored in directory: /home/py/.cache/pip/wheels/9a/1f/0e/3cde98113222b853e98fc0a8e9924480a3e25f1b4008cedb4f
Running setup.py bdist_wheel for absl-py ... done
Stored in directory: /home/py/.cache/pip/wheels/78/a3/a3/689120b95c26b9a21be6584b4b482b0fda0a1b60efd30af558
Successfully built gast absl-py
Installing collected packages: astor, gast, protobuf, enum34, absl-py, backports.weakref, markdown, werkzeug, tensorboard, funcsigs, pbr, mock, grpcio, tensorflow
Successfully installed absl-py-0.4.1 astor-0.7.1 backports.weakref-1.0.post1 enum34-1.1.6 funcsigs-1.0.2 gast-0.2.0 grpcio-1.14.2 markdown-2.6.11 mock-2.0.0 pbr-4.2.0 protobuf-3.6.1 tensorboard-1.9.0 tensorflow-1.9.0rc2 werkzeug-0.14.1
$ python
Python 2.7.14 (default, Feb 25 2018, 06:50:45)
[GCC 5.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/py/.linuxbrew/lib/python2.7/site-packages/tensorflow/__init__.py", line 22, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/home/py/.linuxbrew/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/py/.linuxbrew/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/py/.linuxbrew/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/py/.linuxbrew/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/py/.linuxbrew/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
>>>
But the file is available.
$ ls ~/.linuxbrew/lib/libstdc++.so.6
.linuxbrew/lib/libstdc++.so.6

Related

Heroku reject push project

i try to publish my python project but i have some issues can you help me ? i have requirements.txt also i add my git profile this is my first time with heroku i don't understand what is wrong i add my project on git repository and main branch i use python 3 this is my python project my project files and git files are in same level i tried something is i found on internet but it not worked for me
and this is heroku error :
-----> Building on the Heroku-20 stack
-----> Using buildpack: heroku/python
-----> Python app detected
-----> No Python version was specified. Using the buildpack default: python-3.10.4
To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
-----> Installing python-3.10.4
-----> Installing pip 22.0.4, setuptools 60.10.0 and wheel 0.37.1
-----> Installing SQLite3
-----> Installing requirements with pip
Collecting APScheduler==3.9.1
Downloading APScheduler-3.9.1-py2.py3-none-any.whl (59 kB)
Collecting asgiref==3.5.0
Downloading asgiref-3.5.0-py3-none-any.whl (22 kB)
Collecting beautifulsoup4==4.10.0
Downloading beautifulsoup4-4.10.0-py3-none-any.whl (97 kB)
Collecting bs4==0.0.1
Downloading bs4-0.0.1.tar.gz (1.1 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting certifi==2021.10.8
Downloading certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting cffi==1.15.0
Downloading cffi-1.15.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (446 kB)
Collecting charset-normalizer==2.0.12
Downloading charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting cryptography==36.0.1
Downloading cryptography-36.0.1-cp36-abi3-manylinux_2_24_x86_64.whl (3.6 MB)
Collecting distlib==0.3.4
Downloading distlib-0.3.4-py2.py3-none-any.whl (461 kB)
Collecting Django==2.2.27
Downloading Django-2.2.27-py3-none-any.whl (7.5 MB)
Collecting django-filter==21.1
Downloading django_filter-21.1-py3-none-any.whl (81 kB)
Collecting django-js-asset==2.0.0
Downloading django_js_asset-2.0.0-py3-none-any.whl (4.9 kB)
Collecting django-mptt==0.13.4
Downloading django_mptt-0.13.4-py3-none-any.whl (137 kB)
Collecting djangorestframework==3.13.1
Downloading djangorestframework-3.13.1-py3-none-any.whl (958 kB)
Collecting drf-flex-fields==0.9.7
Downloading drf-flex-fields-0.9.7.tar.gz (28 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting drf-renderer-xlsx==0.4.5
Downloading drf_renderer_xlsx-0.4.5-py3-none-any.whl (11 kB)
Collecting et-xmlfile==1.1.0
Downloading et_xmlfile-1.1.0-py3-none-any.whl (4.7 kB)
Collecting filelock==3.6.0
Downloading filelock-3.6.0-py3-none-any.whl (10.0 kB)
Collecting gunicorn==20.1.0
Downloading gunicorn-20.1.0-py3-none-any.whl (79 kB)
Collecting idna==3.3
Downloading idna-3.3-py3-none-any.whl (61 kB)
Collecting ldap3==2.9.1
Downloading ldap3-2.9.1-py2.py3-none-any.whl (432 kB)
Collecting openpyxl==3.0.9
Downloading openpyxl-3.0.9-py2.py3-none-any.whl (242 kB)
Collecting Pillow==9.0.1
Downloading Pillow-9.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB)
Collecting platformdirs==2.5.1
Downloading platformdirs-2.5.1-py3-none-any.whl (14 kB)
Collecting pyasn1==0.4.8
Downloading pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Collecting pycparser==2.21
Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting python-dateutil==2.8.2
Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting pytz==2022.1
Downloading pytz-2022.1-py2.py3-none-any.whl (503 kB)
Collecting pytz-deprecation-shim==0.1.0.post0
Downloading pytz_deprecation_shim-0.1.0.post0-py2.py3-none-any.whl (15 kB)
Collecting requests==2.27.1
Downloading requests-2.27.1-py2.py3-none-any.whl (63 kB)
Collecting six==1.16.0
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting soupsieve==2.3.1
Downloading soupsieve-2.3.1-py3-none-any.whl (37 kB)
Collecting sqlparse==0.4.2
Downloading sqlparse-0.4.2-py3-none-any.whl (42 kB)
Collecting tzdata==2022.1
Downloading tzdata-2022.1-py2.py3-none-any.whl (339 kB)
Collecting tzlocal==4.1
Downloading tzlocal-4.1-py3-none-any.whl (19 kB)
Collecting urllib3==1.26.9
Downloading urllib3-1.26.9-py2.py3-none-any.whl (138 kB)
Collecting virtualenv==20.14.0
Downloading virtualenv-20.14.0-py2.py3-none-any.whl (8.8 MB)
Collecting whitenoise==6.0.0
Downloading whitenoise-6.0.0-py3-none-any.whl (19 kB)
Building wheels for collected packages: bs4, drf-flex-fields
Building wheel for bs4 (setup.py): started
Building wheel for bs4 (setup.py): finished with status 'done'
Created wheel for bs4: filename=bs4-0.0.1-py3-none-any.whl size=1272 sha256=1b9aa0ae1eb53ab61439cc713b4cd3634e11eacadde3f580901099bdff9485c5
Stored in directory: /tmp/pip-ephem-wheel-cache-n0iong8p/wheels/25/42/45/b773edc52acb16cd2db4cf1a0b47117e2f69bb4eb300ed0e70
Building wheel for drf-flex-fields (setup.py): started
Building wheel for drf-flex-fields (setup.py): finished with status 'done'
Created wheel for drf-flex-fields: filename=drf_flex_fields-0.9.7-py3-none-any.whl size=14682 sha256=83b04e19d2af8aa588e19a76d2d51e53fd5e0ae3b91972f0bf96dc98ffa3c4b6
Stored in directory: /tmp/pip-ephem-wheel-cache-n0iong8p/wheels/d1/ae/ef/2a1b188db93bb648757e281df437793c2a389ae01ef599effb
Successfully built bs4 drf-flex-fields
Installing collected packages: pytz, pyasn1, drf-flex-fields, distlib, certifi, whitenoise, urllib3, tzdata, sqlparse, soupsieve, six, pycparser, platformdirs, Pillow, ldap3, idna, gunicorn, filelock, et-xmlfile, charset-normalizer, asgiref, virtualenv, requests, pytz-deprecation-shim, python-dateutil, openpyxl, Django, cffi, beautifulsoup4, tzlocal, djangorestframework, django-js-asset, django-filter, cryptography, bs4, drf-renderer-xlsx, django-mptt, APScheduler
Successfully installed APScheduler-3.9.1 Django-2.2.27 Pillow-9.0.1 asgiref-3.5.0 beautifulsoup4-4.10.0 bs4-0.0.1 certifi-2021.10.8 cffi-1.15.0 charset-normalizer-2.0.12 cryptography-36.0.1 distlib-0.3.4 django-filter-21.1 django-js-asset-2.0.0 django-mptt-0.13.4 djangorestframework-3.13.1 drf-flex-fields-0.9.7 drf-renderer-xlsx-0.4.5 et-xmlfile-1.1.0 filelock-3.6.0 gunicorn-20.1.0 idna-3.3 ldap3-2.9.1 openpyxl-3.0.9 platformdirs-2.5.1 pyasn1-0.4.8 pycparser-2.21 python-dateutil-2.8.2 pytz-2022.1 pytz-deprecation-shim-0.1.0.post0 requests-2.27.1 six-1.16.0 soupsieve-2.3.1 sqlparse-0.4.2 tzdata-2022.1 tzlocal-4.1 urllib3-1.26.9 virtualenv-20.14.0 whitenoise-6.0.0
-----> $ python manage.py collectstatic --noinput
Traceback (most recent call last):
File "/tmp/build_94cceabe/manage.py", line 21, in <module>
main()
File "/tmp/build_94cceabe/manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/app/.heroku/python/lib/python3.10/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/app/.heroku/python/lib/python3.10/site-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/app/.heroku/python/lib/python3.10/site-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/app/.heroku/python/lib/python3.10/site-packages/django/core/management/base.py", line 364, in execute
output = self.handle(*args, **options)
File "/app/.heroku/python/lib/python3.10/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 188, in handle
collected = self.collect()
File "/app/.heroku/python/lib/python3.10/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 114, in collect
handler(path, prefixed_path, storage)
File "/app/.heroku/python/lib/python3.10/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 342, in copy_file
if not self.delete_file(path, prefixed_path, source_storage):
File "/app/.heroku/python/lib/python3.10/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 249, in delete_file
if self.storage.exists(prefixed_path):
File "/app/.heroku/python/lib/python3.10/site-packages/django/core/files/storage.py", line 324, in exists
return os.path.exists(self.path(name))
File "/app/.heroku/python/lib/python3.10/site-packages/django/contrib/staticfiles/storage.py", line 44, in path
raise ImproperlyConfigured("You're using the staticfiles app "
django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path.
! Error while running '$ python manage.py collectstatic --noinput'.
See traceback above for details.
You may need to update application code to resolve this error.
Or, you can disable collectstatic for this application:
$ heroku config:set DISABLE_COLLECTSTATIC=1
https://devcenter.heroku.com/articles/django-assets
! Push rejected, failed to compile Python app.
! Push failed
You must setting the STATIC_ROOT when the DEBUG=False or when production step in the settings.py
example
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
and make sure to put Procfile in the root of project
for completed step you can access here
Procfile contain
web: gunicorn <yourapp>.wsgi --log-file -
Good luck and keep coding

Installing tensorflow 1.14.0 on python2.7 on Ubuntu 20.04

I'm trying to install tensorflow 1.14.0 on my Ubuntu (20.04 LTS) machine.
I need the python version 2.7.
The cmd line I'm trying to execute is
$ sudo python2.7 -m pip install tensorflow==1.14.0
but it seems there is an issue with "grpcio". The output is the following one:
Collecting tensorflow==1.14.0
Using cached tensorflow-1.14.0-cp27-cp27mu-manylinux1_x86_64.whl (109.2 MB)
Collecting backports.weakref>=1.0rc1
Using cached backports.weakref-1.0.post1-py2.py3-none-any.whl (5.2 kB)
Requirement already satisfied: keras-preprocessing>=1.0.5 in /usr/local/lib/python2.7/dist-packages (from tensorflow==1.14.0) (1.1.2)
Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow==1.14.0) (1.16.0)
Collecting gast>=0.2.0
Using cached gast-0.5.3.tar.gz (23 kB)
Collecting grpcio>=1.8.6
Using cached grpcio-1.41.1.tar.gz (21.2 MB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python2.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0d4Nnx/grpcio/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0d4Nnx/grpcio/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 /tmp/pip-pip-egg-info-zkUeEF
cwd: /tmp/pip-install-0d4Nnx/grpcio/
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-0d4Nnx/grpcio/setup.py", line 256, in <module>
if check_linker_need_libatomic():
File "/tmp/pip-install-0d4Nnx/grpcio/setup.py", line 206, in check_linker_need_libatomic
stderr=PIPE)
File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I have already tried to upgrade pip (20.3.4) and setuptools (44.1.1).
I also tried to install grpcio from a repository by following this guide https://pypi.org/project/grpcio/, but I get the same error.
Do you have any suggestion?
Thank you!
I had the same exat issue as you, upgrading pip wouldn't work in my case either.
I was able to install tensorboard on my platform by installing an older version of grpcio (in my case pip install grpcio==1.20.1).
You will see some warnings on execution about some missing dynamic libraries which are ok for me, but you might want to try other grpcio version.

Getting an error while trying to install robotframework-appiumlibrary

Mac OS - 10.15.7
Python - 2.7.18
I used the command to install "pip install robotframework-appiumlibrary" and following is the error i get.
#Amiths-MacBook-Pro ~ % pip install robotframework-appiumlibrary
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Collecting robotframework-appiumlibrary
Using cached robotframework_appiumlibrary-1.5.0.7-py2.py3-none-any.whl (49 kB)
Collecting docutils>=0.8.1
Using cached docutils-0.17.1-py2.py3-none-any.whl (575 kB)
Collecting six>=1.10.0
Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting decorator>=3.3.2
Using cached decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
Collecting kitchen>=1.2.4
Using cached kitchen-1.2.6.tar.gz (255 kB)
Collecting selenium>=2.47.1
Using cached selenium-3.141.0-py2.py3-none-any.whl (904 kB)
Requirement already satisfied: robotframework>=2.6.0 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from robotframework-appiumlibrary) (4.0.1)
Collecting Appium-Python-Client>=0.28
Using cached Appium-Python-Client-1.1.0.tar.gz (53 kB)
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/xn/c052lddx4qz1lm8h6thg0w_h0000gn/T/pip-install-IQfrSA/appium-python-client/setup.py'"'"'; __file__='"'"'/private/var/folders/xn/c052lddx4qz1lm8h6thg0w_h0000gn/T/pip-install-IQfrSA/appium-python-client/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/xn/c052lddx4qz1lm8h6thg0w_h0000gn/T/pip-pip-egg-info-AVKVXp
cwd: /private/var/folders/xn/c052lddx4qz1lm8h6thg0w_h0000gn/T/pip-install-IQfrSA/appium-python-client/
Complete output (8 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/xn/c052lddx4qz1lm8h6thg0w_h0000gn/T/pip-install-IQfrSA/appium-python-client/setup.py", line 19, in <module>
from appium.common.helper import library_version
File "appium/common/helper.py", line 20
def extract_const_attributes(cls: type) -> Dict[str, Any]:
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
#Amiths-MacBook-Pro ~ % python setup.py egg_info
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file 'setup.py': [Errno 2] No such file or directory

How can I solve this error when install jupyter with python 2.7 in my Windows 10

I installed python 2.7 in Windows 10, and set HOME, PATH environment variables.
Then typed
pip install jupyter
The result is like this:
Collecting jupyter
Using cached jupyter-1.0.0-py2.py3-none-any.whl
Collecting ipykernel (from jupyter)
Using cached ipykernel-4.5.2-py2.py3-none-any.whl
Collecting jupyter-console (from jupyter)
Using cached jupyter_console-5.0.0-py2.py3-none-any.whl
Collecting ipywidgets (from jupyter)
Using cached ipywidgets-5.2.2-py2.py3-none-any.whl
Collecting nbconvert (from jupyter)
Using cached nbconvert-5.0.0-py2.py3-none-any.whl
Collecting notebook (from jupyter)
Using cached notebook-4.3.1-py2.py3-none-any.whl
Collecting qtconsole (from jupyter)
Using cached qtconsole-4.2.1-py2.py3-none-any.whl
Collecting tornado>=4.0 (from ipykernel->jupyter)
Using cached tornado-4.4.2.tar.gz
Collecting jupyter-client (from ipykernel->jupyter)
Using cached jupyter_client-4.4.0-py2.py3-none-any.whl
Collecting ipython>=4.0.0 (from ipykernel->jupyter)
Using cached ipython-5.1.0-py2-none-any.whl
Collecting traitlets>=4.1.0 (from ipykernel->jupyter)
Using cached traitlets-4.3.1-py2.py3-none-any.whl
Collecting prompt-toolkit<2.0.0,>=1.0.0 (from jupyter-console->jupyter)
Using cached prompt_toolkit-1.0.9-py2-none-any.whl
Collecting pygments (from jupyter-console->jupyter)
Using cached Pygments-2.1.3-py2.py3-none-any.whl
Collecting widgetsnbextension>=1.2.6 (from ipywidgets->jupyter)
Using cached widgetsnbextension-1.2.6-py2.py3-none-any.whl
Collecting testpath (from nbconvert->jupyter)
Using cached testpath-0.3-py2.py3-none-any.whl
Collecting pandocfilters>=1.4.1 (from nbconvert->jupyter)
Using cached pandocfilters-1.4.1.tar.gz
Collecting jinja2 (from nbconvert->jupyter)
Using cached Jinja2-2.9.4-py2.py3-none-any.whl
Collecting jupyter-core (from nbconvert->jupyter)
Using cached jupyter_core-4.2.1-py2.py3-none-any.whl
Collecting bleach (from nbconvert->jupyter)
Using cached bleach-1.5.0-py2.py3-none-any.whl
Collecting mistune!=0.6 (from nbconvert->jupyter)
Using cached mistune-0.7.3-py2.py3-none-any.whl
Collecting nbformat (from nbconvert->jupyter)
Using cached nbformat-4.2.0-py2.py3-none-any.whl
Collecting entrypoints>=0.2.2 (from nbconvert->jupyter)
Using cached entrypoints-0.2.2-py2.py3-none-any.whl
Collecting ipython-genutils (from notebook->jupyter)
Using cached ipython_genutils-0.1.0-py2.py3-none-any.whl
Collecting singledispatch (from tornado>=4.0->ipykernel->jupyter)
Using cached singledispatch-3.4.0.3-py2.py3-none-any.whl
Collecting certifi (from tornado>=4.0->ipykernel->jupyter)
Using cached certifi-2016.9.26-py2.py3-none-any.whl
Collecting backports_abc>=0.4 (from tornado>=4.0->ipykernel->jupyter)
Using cached backports_abc-0.5-py2.py3-none-any.whl
Collecting pyzmq>=13 (from jupyter-client->ipykernel->jupyter)
Using cached pyzmq-16.0.2-cp27-cp27m-win32.whl
Collecting win-unicode-console>=0.5; sys_platform == "win32" (from ipython>=4.0.0->ipykernel->jupyter)
Using cached win_unicode_console-0.5.zip
Collecting pickleshare (from ipython>=4.0.0->ipykernel->jupyter)
Using cached pickleshare-0.7.4-py2.py3-none-any.whl
Collecting decorator (from ipython>=4.0.0->ipykernel->jupyter)
Using cached decorator-4.0.10-py2.py3-none-any.whl
Collecting backports.shutil-get-terminal-size; python_version == "2.7" (from ipython>=4.0.0->ipykernel->jupyter)
Using cached backports.shutil_get_terminal_size-1.0.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools>=18.5 in c:\python27\lib\site-packages (from ipython>=4.0.0->ipykernel->jupyter)
Collecting pathlib2; python_version == "2.7" or python_version == "3.3" (from ipython>=4.0.0->ipykernel->jupyter)
Using cached pathlib2-2.2.0-py2.py3-none-any.whl
Collecting simplegeneric>0.8 (from ipython>=4.0.0->ipykernel->jupyter)
Using cached simplegeneric-0.8.1.zip
Collecting colorama; sys_platform == "win32" (from ipython>=4.0.0->ipykernel->jupyter)
Using cached colorama-0.3.7-py2.py3-none-any.whl
Collecting enum34; python_version == "2.7" (from traitlets>=4.1.0->ipykernel->jupyter)
Using cached enum34-1.1.6-py2-none-any.whl
Collecting six (from traitlets>=4.1.0->ipykernel->jupyter)
Using cached six-1.10.0-py2.py3-none-any.whl
Collecting wcwidth (from prompt-toolkit<2.0.0,>=1.0.0->jupyter-console->jupyter)
Using cached wcwidth-0.1.7-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from jinja2->nbconvert->jupyter)
Using cached MarkupSafe-0.23.tar.gz
Collecting html5lib!=0.9999,!=0.99999,<0.99999999,>=0.999 (from bleach->nbconvert->jupyter)
Using cached html5lib-0.9999999.tar.gz
Collecting jsonschema!=2.5.0,>=2.4 (from nbformat->nbconvert->jupyter)
Using cached jsonschema-2.5.1-py2.py3-none-any.whl
Collecting configparser>=3.5; python_version == "2.7" (from entrypoints>=0.2.2->nbconvert->jupyter)
Using cached configparser-3.5.0.tar.gz
Collecting scandir (from pathlib2; python_version == "2.7" or python_version == "3.3"->ipython>=4.0.0->ipykernel->jupyter)
Using cached scandir-1.4.zip
Exception:
Traceback (most recent call last):
File "c:\python27\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\python27\lib\site-packages\pip\commands\install.py", line 324, in run
requirement_set.prepare_files(finder)
File "c:\python27\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "c:\python27\lib\site-packages\pip\req\req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "c:\python27\lib\site-packages\pip\download.py", line 821, in unpack_url
hashes=hashes
File "c:\python27\lib\site-packages\pip\download.py", line 663, in unpack_http_url
unpack_file(from_path, location, content_type, link)
File "c:\python27\lib\site-packages\pip\utils\__init__.py", line 599, in unpack_file
flatten=not filename.endswith('.whl')
File "c:\python27\lib\site-packages\pip\utils\__init__.py", line 499, in unzip_file
fp = open(fn, 'wb')
IOError: [Errno 22] invalid mode ('wb') or filename: 'c:\\users\\wonhee\\appdata\\local\\temp\\pip-build-o9imsa\\scandir\\test/testdir/subdir/unicod\xc6\x8f.txt
I don't know about the errno 22.
Please give me some solutions for this problem. Thank you
I think your main problem is of 'scandir' package.
Actually, I had same problem as you, and I solved that the way as below.
you need to install 'scandir' package manually.
go to here: https://pypi.python.org/pypi/scandir
and download 'scandir-1.4.zip (md5)', and unzip it
open cmd, and go to directory where 'scandir-1.4' folder is
type 'python setup.py install'
after finishing install, try again to install jupyter
cheers.
In my case, the scandir install was failing because I hadn't installed python dev tools
sudo apt-get install python-dev
To install scandir without a binary package, use an official binary package of scandir from http://www.lfd.uci.edu/~gohlke/
Then run (e.g.)
pip install scandir‑1.5‑cp27‑cp27m‑win32.whl

Install h5py without sudo

I'm trying to install h5py package via pip for python 2.7, I can't use sudo and I have python 3.2 installed too.
Here is my attemp:
I have installed pip:
curl -O https://bootstrap.pypa.io/get-pip.py
python2.7 get-pip.py --user
then I installed wheel
~/.local/bin/pip2.7 install --user wheel
Collecting wheel
/home/myuser/.local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/home/myuser/.local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:120: 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
Using cached wheel-0.29.0-py2.py3-none-any.whl
Installing collected packages: wheel
Successfully installed wheel-0.29.0
Then installed h5py, seems it failed.
~/.local/bin/pip2.7 install --user h5py
Collecting h5py
Using cached h5py-2.5.0.tar.gz
/usr/lib/python2.7/dist-packages/setuptools/command/install_scripts.py:3: UserWarning: Module pip was already imported from /home/myuser/.local/lib/python2.7/site-packages/pip/__init__.pyc, but /usr/lib/python2.7/dist-packages is being added to sys.path
from pkg_resources import Distribution, PathMetadata, ensure_directory
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.6.1 in /usr/lib/python2.7/dist-packages (from h5py)
Requirement already satisfied (use --upgrade to upgrade): Cython>=0.17 in /home/myuser/.local/lib/python2.7/site-packages (from h5py)
Requirement already satisfied (use --upgrade to upgrade): six in /home/myuser/.local/lib/python2.7/site-packages (from h5py)
Building wheels for collected packages: h5py
Running setup.py bdist_wheel for h5py ... error
Complete output from command /usr/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-7KTR1Y/h5py/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpE1KVSupip-wheel- --python-tag cp27:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for h5py
Running setup.py clean for h5py
Failed to build h5py
Installing collected packages: h5py
Running setup.py install for h5py ... done
Successfully installed h5py-2.5.0
run python via python2.7
Python 2.7.3 (default, Feb 27 2014, 19:58:35)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import h5py
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/myuser/.local/lib/python2.7/site-packages/h5py/__init__.py", line 23, in <module>
from . import _conv
File "h5py/h5r.pxd", line 21, in init h5py._conv (/tmp/pip-build-7KTR1Y/h5py/h5py/_conv.c:7356)
File "h5py/_objects.pxd", line 12, in init h5py.h5r (/tmp/pip-build-7KTR1Y/h5py/h5py/h5r.c:2941)
File "h5py/_objects.pyx", line 1, in init h5py._objects (/tmp/pip-build-7KTR1Y/h5py/h5py/_objects.c:7226)
ImportError: /home/myuser/.local/lib/python2.7/site-packages/h5py/defs.so: undefined symbol: H5Oexists_by_name
What I'm doing wrong?
Update:
~/.local/bin/pip2.7 show h5py
---
Metadata-Version: 1.1
Name: h5py
Version: 2.5.0
Summary: Read and write HDF5 files from Python
Home-page: http://www.h5py.org
Author: Andrew Collette
Author-email: andrew dot collette at gmail dot com
License: UNKNOWN
Location: /home/myuser/.local/lib/python2.7/site-packages
Requires: numpy, Cython, six
My OS is Ubuntu 12.04.1 LTS.
So there's a few things happening here:
Missing SSL certificate problems (see the urllib3 link)
setuptools not finding wheel, meaning a wheel isn't built, so pip calls python setup.py install directly
h5py is trying to use a function in HDF5 which does not exist in the version of HDF5 that's on your system.
1 and 2 are worth fixing (as they may be symptoms of other problems with the system), but 3 is the reason h5py isn't working for you.
h5py is trying to access H5Oexists_by_name. According to https://www.hdfgroup.org/HDF5/doc/RM/RM_H5O.html#Object-ExistsByName, this first appeared in version 1.8.5 of HDF5. According to http://packages.ubuntu.com/source/precise/hdf5, the version of HDF5 on your system is 1.8.4 (but you need to check this!). Somehow h5py thinks the HDF5 library on you system is 1.8.5 or higher (see https://github.com/h5py/h5py/blob/4ee8f89b6dc658fdea5dc62d0f29058121928cfe/h5py/h5o.pyx#L172)
It looks like someone else has run into a similar problem, and filed https://bugs.launchpad.net/ubuntu/+source/hdf5/+bug/1418220. You probably want to inform them of your problem, so that they can produce a bug fix.