TensorFlow installation on Ubuntu - installation

When I try to install TensorFlow Machine Learning library on Ubunto (vmware image) using command :
$ pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
after downloading the package I got this error :
Traceback (most recent call last):
File "", line 14, in
IOError: [Errno 2] No such file or directory: '/tmp/pip-GgS7fR-build/setup.py'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 14, in
IOError: [Errno 2] No such file or directory:
'/tmp/pip-GgS7fR-build/setup.py'
I am using pip, python 2.7 and Ubuntu 12.04 LTS vmware image
Can anyone please help me to solve this error?
full pip.log file error :
------------------------------------------------------------
/usr/bin/pip run on Sun Nov 22 06:06:30 2015
Downloading/unpacking https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
Downloading from URL https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
Running setup.py egg_info for package from https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
Traceback (most recent call last):
File "<string>", line 14, in <module>
IOError: [Errno 2] No such file or directory: '/tmp/pip-GgS7fR-build/setup.py'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
IOError: [Errno 2] No such file or directory: '/tmp/pip-GgS7fR-build/setup.py'
----------------------------------------
Command python setup.py egg_info failed with error code 1
Exception information:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 126, in main
self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 223, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 980, in prepare_files
req_to_install.run_egg_info()
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 216, in run_egg_info
command_desc='python setup.py egg_info')
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 255, in call_subprocess
% (command_desc, proc.returncode))
InstallationError: Command python setup.py egg_info failed with error code 1

Try installing Ubuntu 14.04 in VMware and use the same command.

Related

problems installing pip3 install virtualenvwrapper

I am using ubuntu 16.04, what and installed for the first time and I try to install pip3 install virtualenvwrapper for it tells me to install first sudo apt install python3-pip once you install it I run the command pip3 install virtualenvwrapper but it generates the following error.
Collecting virtualenvwrapper
Downloading https://files.pythonhosted.org/packages/c1/6b/2f05d73b2d2f2410b48b90d3783a0034c26afa534a4a95ad5f1178d61191/virtualenvwrapper-4.8.4.tar.gz (334kB)
100% |████████████████████████████████| 337kB 233kB/s
Complete output from command python setup.py egg_info:
Couldn't find index page for 'pbr' (maybe misspelled?)
No local packages or download links found for pbr
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-xwa__f7e/virtualenvwrapper/setup.py", line 7, in <module>
pbr=True,
File "/usr/lib/python3.5/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 269, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 313, in fetch_build_eggs
replace_conflicting=True,
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 826, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1092, in best_match
return self.obtain(req, installer)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1104, in obtain
return installer(requirement)
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 380, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 657, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pbr')
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-xwa__f7e/virtualenvwrapper/

Lektor installation fails on Linux

Lektor crashes on installation on Linux (Mint 19 and Raspbian-armv7l 2018-10) with a 'File not found error'
Python 2.7 and 3.5 are installed.
sudo apt-get install python-dev libssl-dev libffi-dev OK
sudo apt-get install imagemagick OK
curl -sf https://www.getlektor.com/install.sh | sudo sh
This script will install Lektor on your computer.
Installing at:
bin: /usr/local/bin
app: /usr/local/lib/lektor
Continue? [Yn] y -> CRASH !
/usr/bin/python: can't open file './virtualenv.py': [Errno 2] No such file or directory
Traceback (most recent call last):
File "<stdin>", line 148, in <module>
File "<stdin>", line 143, in main
File "<stdin>", line 107, in install
File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
This is a known issue with your version of Lektor:
https://github.com/lektor/lektor/issues/619
WORKAROUND:
For my system, install.sh worked after changing line 124 to this:
Popen([sys.executable, './src/virtualenv.py', lib_dir], cwd=t).wait()

python - pip is not working after upgrade

I tried upgrade pip3 with this command:
sudo pip3 install --upgrade pip
but unfortunately it doesn't work anymore and shows this message:
pip3 --version
message:
Traceback (most recent call last):
File
"/usr/local/lib/python3.4/dist-packages/pkg_resources/init.py",
line 651, in _build_master
ws.require(requires)
File "/usr/local/lib/python3.4/dist-packages/pkg_resources/init.py",
line 952, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python3.4/dist-packages/pkg_resources/init.py",
line 844, in resolve
raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.VersionConflict: (pip 7.1.2
(/usr/local/lib/python3.4/dist-packages),
Requirement.parse('pip==1.5.6'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/pip3", line 5, in
from pkg_resources import load_entry_point
File "/usr/local/lib/python3.4/dist-packages/pkg_resources/init.py", line 3084, in
#_call_aside
File "/usr/local/lib/python3.4/dist-packages/pkg_resources/init.py", line 3070, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/pkg_resources/init.py", line 3097, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/lib/python3.4/dist-packages/pkg_resources/init.py", line 653, in _build_master
return cls._build_from_requirements(requires)
File "/usr/local/lib/python3.4/dist-packages/pkg_resources/init.py", line 666, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/local/lib/python3.4/dist-packages/pkg_resources/init.py", line 839, in resolve
raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'pip==1.5.6' distribution was
not found and is required by the application
How to fix it?
It seems like you don't use virtualenv and your pythons/paths are probably messed up.
I faced with similar problem with python-2.7 and -3.4 on Ubuntu 14.04. I tried
sudo python -m pip install --upgrade --force-reinstall pip
for 2.7 and it helped. Then I reinstalled pip for python-3.4 via easy_install3.

mitmproxy installation error

I trying to install mitmproxy on centos 6.4 with python 2.6.6, I am getting below error when execute install command.
#pip install mitmproxy
Downloading/unpacking mitmproxy
Running setup.py egg_info for package mitmproxy
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/tmp/pip-build-root/mitmproxy/setup.py", line 19
"netlib>=%s, <%s" % (version.MINORVERSION, version.NEXT_MINORVERSION),
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/tmp/pip-build-root/mitmproxy/setup.py", line 19
"netlib>=%s, <%s" % (version.MINORVERSION, version.NEXT_MINORVERSION),
^
SyntaxError: invalid syntax
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-root/mitmproxy
Storing complete log in /root/.pip/pip.log
That error seems to indicate that mitmproxy is not compatible with python 2.6.x. I assume that syntax is new for 2.7.x or something like that.
That line doesn't work for me in 2.4.3 or 2.6.6 but does in 2.7.8.

PyGreSQL on Heroku

Is PyGreSQL unsupported on Heroku, or am I doing something wrong in my requirements.txt file?
web.py==0.36
PyGreSQL
When I run pip locally, everything installs fine. When I try to deploy, I get the following error message.
-----> Installing dependencies using pip version 1.0.2
Requirement already satisfied (use --upgrade to upgrade): web.py==0.36 in ./.heroku/venv/lib/python2.7/site-packages (from -r requirements.txt (line 1))
Downloading/unpacking PyGreSQL (from -r requirements.txt (line 2))
Storing download in cache at /app/tmp/repo.git/.cache/pip_downloads/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FP%2FPyGreSQL%2FPyGreSQL-4.0.tar.gz
Running setup.py egg_info for package PyGreSQL
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/tmp/build_35fg1nd48mese/.heroku/venv/build/PyGreSQL/setup.py", line 98, in <module>
mk_include()
File "/tmp/build_35fg1nd48mese/.heroku/venv/build/PyGreSQL/setup.py", line 69, in mk_include
for f in os.listdir(pg_include_dir_server):
OSError: [Errno 2] No such file or directory: '/usr/include/postgresql/8.4/server'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/tmp/build_35fg1nd48mese/.heroku/venv/build/PyGreSQL/setup.py", line 98, in <module>
mk_include()
File "/tmp/build_35fg1nd48mese/.heroku/venv/build/PyGreSQL/setup.py", line 69, in mk_include
for f in os.listdir(pg_include_dir_server):
OSError: [Errno 2] No such file or directory: '/usr/include/postgresql/8.4/server'
----------------------------------------
Command python setup.py egg_info failed with error code 1
Storing complete log in /app/.pip/pip.log
! Heroku push rejected, failed to compile Python app
The PyGreSQL library does not support PostgreSQL 9.1 at the moment, and therefore is incompatible with Heroku.

Resources