error in installing the python packages in caffe installing - python

Im installing caffe using this instructers (link) and refer to this i use this command for install all of requirments:
sudo pip install -r $CAFFE_ROOT/python/requirements.txt
but, unfortuantly i got this error:
Command "/usr/bin/python -u -c "import setuptools,
tokenize;__file__='/tmp/pip-build-
jseAuV/leveldb/setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n',
'\n');f.close();exec(compile(code, __file__, 'exec'))" install --
record
/tmp/pip-brJMTP-record/install-record.txt --single-version-externally-
managed --compile" failed with error code 1 in /tmp/pip-build-
jseAuV/leveldb/
Im searched for solving this problem , somone said this error will solve by this command:
pip install --upgrade setuptools
and other commands related to upgrade setuptools ... .
can , anyone help me?
I use Jetson TX2 GPU.

after search i found that causes this problem is from leveldb library.
leveldb version requirment that wroted ir requirements.txt was leveldb>=0.19,
and according to this github page this version of leveldb not supported my architecture (ARM 64 , aarch64) , but leveldb v1.2 support this architecture , for solving this problem firs i modified requirements.txt leveldb version according this:
leveldb>=0.20
then tried installation but unfortunatly it doesnt work.
refer to this page of nvidia , digits couldent be installed on jetson tx2 , but refer to this comment:
https://devtalk.nvidia.com/default/topic/1007431/jetson-tx2/issues-installing-digits-on-tx2/post/5203559/#5203559
my problem solved!
i'm happy (:
by.

Related

Brew install python3 cannot on macOS 10.9

I tried to use brew install python3 on macOS 10.9, but I got error as below, what can I do? Can you help me? By the way, I am using a macmini 2009 late, do I have upgrade my MacOS to 10.10 or 10.11, I am not sure what is the highest version for my macmini...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
==> Installing dependencies for python: sphinx-doc, gdbm, makedepend, openssl, readline, sqlite, xz
==> Installing python dependency: sphinx-doc
==> Downloading https://files.pythonhosted.org/packages/ac/54/4ef326d0c654da1ed91341a7a1f43efc18a8c770ddd2b8e45df97cb79d82/Sphinx-1.7.8.tar.gz
Already downloaded: /Users/mi/Library/Caches/Homebrew/downloads/7724e7147d6bde066d1f33877c84313f0022f9e968578891746ce90feb85f567--Sphinx-1.7.8.tar.gz
==> Downloading https://files.pythonhosted.org/packages/ef/1d/201c13e353956a1c840f5d0fbf041bd45bbd678ea4843ebf25924e8984c/setuptools-40.2.0.zip
Already downloaded: /Users/mi/Library/Caches/Homebrew/downloads/16d798a247946c3552651aa8f309c94303bdc666a9598610c65187e5da345a77--setuptools-40.2.0.zip
==> python -c import setuptools... --no-user-cfg install --prefix=/usr/local/Cellar/sphinx-doc/1.7.8/libexec/vendor --single-version-externally-managed --record=installed.txt
Last 15 lines from /Users/mi/Library/Logs/Homebrew/sphinx-doc/01.python: 2018-09-05 22:19:48 +0900
python
-c
import setuptools, tokenize
__file__ = 'setup.py'
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec')) --no-user-cfg install
--prefix=/usr/local/Cellar/sphinx-doc/1.7.8/libexec/vendor
--single-version-externally-managed
--record=installed.txt
Do not report this issue to Homebrew/brew or Homebrew/core!
Error: You are using macOS 10.9.
We (and Apple) do not provide support for this old version.
You will encounter build failures and other breakages.
Please create pull-requests instead of asking for help on Homebrew's
GitHub, Discourse, Twitter or IRC. As you are running this old version,
you are responsible for resolving any issues you experience.

pip install scikit-learn error

the error is
Command "c:\users\samuel\appdata\local\programs\python\python37\python.exe -
u -c "import setuptools,
tokenize;__file__='C:\\Users\\Samuel\\AppData\\Local\\Temp\\pip-install-
bnoak8r5\\scikit-learn\\setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code,
__file__, 'exec'))" install --record C:\Users\Samuel\AppData\Local\Temp\pip-
record-4yww_x3p\install-record.txt --single-version-externally-managed --
compile" failed with error code 1 in C:\Users\Samuel\AppData\Local\Temp\pip-
install-bnoak8r5\scikit-learn\
on the website its says this
Python (>= 2.7 or >= 3.3),
NumPy (>= 1.8.2),
SciPy (>= 0.13.3).
i have python 3.7
numpy 1.14.3 and scipy 1.1.0
so is my python version to new along with my scipy version?
when i download the file and try to install it i get this error
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Samuel\AppData\Local\Temp\pip-req-build-6eptglns\
I suggest you download Anaconda and use conda install as your package manager for numpy, scipy, scikit-learn, etc. I can't guarantee it will fix this problem but it most certainly will be better at what you are using scikit-learn for. It would certainly change this error because it downloads a new installation of python somewhere else within anaconda's directories. Doing this has fixed this same problem for some people in the past.
I hope this helps.

Why is pip install mysql-connector fail?

I'm just trying to simply install python-myconnector using the very simple instructions provided here.
But it is failing. Here is the error I get:
(my_virtual_env) [my.username#my_machine ~]$ pip install mysql-connector
...
Command "/home/my.username/my_virtual_env/bin/python2.7 -u -c
"import setuptools, tokenize;
__file__='/tmp/pip-build-rLJbLN/mysql-connector/setup.py';
f=getattr(tokenize, 'open', open)(__file__);
code=f.read().replace('\r\n', '\n');f.close();
exec(compile(code, __file__, 'exec'))" install
--record /tmp/pip-mFh5Pg-record/install-record.txt
--single-version-externally-managed
--compile
--install-headers
/home/me/my_virtual_env/include/site/python2.7/mysql-connector"
failed with error code 1 in /tmp/pip-build-rLJbLN/mysql-connector/```
The full error log can be found here if you need to see it (but I doubt you will)
Why is this happening and how can I fix it?? Also, FYI, I don't have sudo access on this machine. So that's why I am installing it into a virtual environment..
FYI, it seems like it was supposed write something into /tmp/pip-build-rLJbLN/ but didn't and then it blows up later on when it tries to read from what it was supposed to have written there earlier. So how do I fix this bug??
I have read other solutions to other similar problem here. But I couldn't get any of them to work for me.
The mysql-connector clearly states that it requires protobuf
mysql-connector (version >= 2.2.3) requires Protobuf C++ (version >= 2.6.0)
Just as I commented, your error log insists the same:
Line 81, 165: Unable to find Protobuf include directory.
Based on your platform, follow this protobuf C++ installaion instruction, and export the protobuf path so that pip can refer that path

Scipy Python wheel

I have got a problem with installing Scipy on my Python 2.7 , Windows in IPython.
When I enter "pip install scipy", I have one first error message:
"Failed building wheel for scipy" and then at the end
"
Command "c:\python27\python.exe -c "import setuptools,tokenize;__file__='c:\\us
ers\\admini~1\\appdata\\local\\temp\\pip-build-e3yebj\\scipy\\setup.py';exec(com
pile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __f
ile__, 'exec'))" install --record c:\users\admini~1\appdata\local\temp\pip-mwhxl
d-record\install-record.txt --single-version-externally-managed --compile" faile
d with error code 1 in c:\users\admini~1\appdata\local\temp\pip-build-e3yebj\sci
py
"
I do not know how to solve that problem, thanks if you have any ideas
You can download the wheel from this web site:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
You need to pick the right one. So, for
scipy‑0.19.0‑cp34‑cp34m‑win32.whl
cp34 means it will work with python 3.4
make sure you go with this one in your case:
scipy‑0.19.0‑cp27‑cp27m‑win32.whl and whatever your windows is (32 or 64).
once downloaded, go to the command line and put:
python -m pip install scipy‑0.19.0‑cp27‑cp27m‑win32.whl (making sure it is sitting in the right directory).
That should solve the problem.
I also met this problem and I then installed a Python distribution like Anaconda instead!

Installing NumPy on Windows 8.1 with Python 2.7.x

I'm very new to Python and programming world and has been going along with tutorials from newcoder.io This Here! I have been doing as per the instructions but when I try to install NumPy I get an error.
"
error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat). Get it from http://aka.ms/vcpython27
Command "C:\Users\HP.virtualenvs\DataVizProj\Scripts\python.exe -c "import setuptools, tokenize;file='c:\users
\appdata\local\temp\pip-build-lsj5sj\numpy\setup.py';exec(compile(getattr(tokenize, 'open', open)(file).re
.replace('\r\n', '\n'), file, 'exec'))" install --record c:\users\hp\appdata\local\temp\pip-6jei4k-record\instal
cord.txt --single-version-externally-managed --compile --install-headers C:\Users\HP.virtualenvs\DataVizProj\includ
te\python2.7" failed with error code 1 in c:\users\hp\appdata\local\temp\pip-build-lsj5sj\numpy
"
But that's not enough, I tried to install VCForPython27.msi from the given link. But still, gets the same error.
Please Help!
I recommend installing the Anaconda distribution of Python. It contains more packages than you can dream of, including numpy of course: http://continuum.io/downloads
The installation is as straightforward as installing the usual Python, no matter what OS you are on.
A good solution is to download the wheel file which match your Python version here:unofficial python binaries
And then go to the folder where the .whl file is present using the command prompt and unpack the wheel file xxxxx.whl with:
>python -m pip install xxxxx.whl
This will install the library in the Lib\site-packages folder, you can check it afterwards.

Categories