Can't install bob package by pip - python

I am on Windows 7 with python 3.6. I am trying to install bob package by typing pip install bob in the command window. But I get the following error:
C:\Users\azhidinov_37005\AppData\Local\Programs\boost_1_66_0\boost_1_66_0\libs\p
ython\example\quickstart>C:\Users\azhidinov_37005\AppData\Local\Programs\Python\
Python36\Scripts\pip.exe install bob
Collecting bob
Using cached bob-3.0.0.zip
Requirement already satisfied: setuptools in c:\users\azhidinov_37005\appdata\lo
cal\programs\python\python36\lib\site-packages (from bob)
Requirement already satisfied: bob.extension==2.4.5 in c:\users\azhidinov_37005\
appdata\local\programs\python\python36\lib\site-packages (from bob)
Collecting bob.blitz==2.0.14 (from bob)
Using cached bob.blitz-2.0.14.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\AZHIDI~1\AppData\Local\Temp\pip-build-hpictomi\bob.blitz\se
tup.py", line 70, in <module>
system_include_dirs=system_include_dirs,
File "c:\users\azhidinov_37005\appdata\local\programs\python\python36\lib\
site-packages\bob\extension\__init__.py", line 356, in __init__
boost_pkg = boost(boost_req.replace('boost', '').strip())
File "c:\users\azhidinov_37005\appdata\local\programs\python\python36\lib\
site-packages\bob\extension\boost.py", line 69, in __init__
raise RuntimeError("could not find boost's `version.hpp' - have you inst
alled Boost on this machine?")
RuntimeError: could not find boost's `version.hpp' - have you installed Boos
t on this machine?
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\AZHIDI~1
\AppData\Local\Temp\pip-build-hpictomi\bob.blitz\
After that I downloaded boost from here http://www.boost.org/users/history/version_1_66_0.html
Unziped and built it. Then built separetely boost.python. Now I have all of them in root directory. But when type pip install bob stil get the same error. I think python can't locate the boost directory. What should I do? Please help!

Try:
sudo apt-get install libboost-all-dev
or
https://sourceforge.net/projects/boost/files/boost-binaries/1.53.0/

From: https://www.idiap.ch/software/bob/install
Bob does not work on Windows and hence no conda packages are available
for it. It will not work even if you install it from source. If you
are an experienced user and manage to make Bob work on Windows, please
let us know through our mailing list.
There is already some effort to make Bob work on Windows:
https://github.com/bioidiap/bob.extension/pull/1
https://github.com/bioidiap/bob.blitz/pull/1
https://github.com/bioidiap/bob.core/pull/1
If you are interested and experienced, you can contribute.

Related

awscli not working on OS X, keep getting ImportError: No module named awscli_plugin_endpoint

I recently broke my awscli installation by doing a brew upgrade. I keep getting
ImportError: No module named awscli_plugin_endpoint
regardless of what python version I use.
Here's what I've tried already:
current python version coming with brew using brew install awscli,
pyenv with 2.7.14 and 3.6.4,
virtualenv using this gist,
pyenv with this other gist.
install the tarballs manually from 1.14.65 - to 1.14.62.
No matter what I do, it always complains about
No module named awscli_plugin_endpoint
I've already wiped the complete brew install, wiped all pyenvs, removed dot dirs .local, .pyenv. The only thing that is still there is the system install python coming with OS X.
Running OS X 10.13.3, using zsh.
What is wrong here?
Example stacktrace from Python 2.7:
$ aws --version
Traceback (most recent call last):
File "/Users/dhiller/pyenvs/aws/bin/aws", line 27, in <module>
sys.exit(main())
File "/Users/dhiller/pyenvs/aws/bin/aws", line 23, in main
return awscli.clidriver.main()
File "/Users/dhiller/pyenvs/aws/lib/python2.7/site-packages/awscli/clidriver.py", line 58, in main
driver = create_clidriver()
File "/Users/dhiller/pyenvs/aws/lib/python2.7/site-packages/awscli/clidriver.py", line 69, in create_clidriver
event_hooks=emitter)
File "/Users/dhiller/pyenvs/aws/lib/python2.7/site-packages/awscli/plugin.py", line 44, in load_plugins
modules = _import_plugins(plugin_mapping)
File "/Users/dhiller/pyenvs/aws/lib/python2.7/site-packages/awscli/plugin.py", line 58, in _import_plugins
plugins.append(__import__(path))
ImportError: No module named awscli_plugin_endpoint
The solution was simple - just use the pip that's matching the python installation to install the endpoint manually:
# this also installs python as a dependency
$ brew install awscli
$ /usr/local/opt/awscli/libexec/bin/pip install awscli-plugin-endpoint
$ aws --version
aws-cli/1.14.60 Python/3.6.4 Darwin/17.4.0 botocore/1.9.13
Or remove the plugin entry in ~/.aws/config:
[plugins]
endpoint = awscli_plugin_endpoint
I have to admit, this took me longer than it should have, and this is probably not the best way to go about it, but my version of aws doesn't have pip, so I just copied over the plugin (needed admin priviledges to do this)
C:\Users\blackstrype>pip install awscli-plugin-endpoint
Requirement already satisfied: awscli-plugin-endpoint in *__c:\users\blackstrype\appdata\local\programs\python\python38-32\lib\site-packages__* (0.4)
Requirement already satisfied: awscli>=1.11.0 in c:\users\blackstrype\appdata\local\programs\python\python38-32\lib\site-packages (from awscli-plugin-endpoint) (1.18.138)
Requirement already satisfied: docutils<0.16,>=0.10 in c:\users\blackstrype\appdata\local\programs\python\python38-32\lib\site-packages (from awscli>=1.11.0->awscli-plugin-endpoint) (0.15.2)
Requirement already satisfied: colorama<0.4.4,>=0.2.5; python_version != "3.4" in c:\users\blackstrype\appdata\local\programs\python\python38-32\lib\site-packages (from awscli>=1.11.0->awscli-plugin-endpoint) (0.4.3)
Copy
C:\users\blackstrype\appdata\local\programs\python\python38-32\lib\site-packages\awscli-plugin-endpoint*
to
C:\Program Files\Amazon\AWSCLI\runtime\Lib\site-packages

Install failed with Django-Chronograph by pip in django 1.10

Similar to this question but i got a different error.
I'm try to installing via pip with:
pip install django-chronograph
I'm using python 2.7 and a virtualenv
pip freeze
Django==1.10
django-backbone==0.2.3
django-jstemplate==1.1.1
gunicorn==18.0
MySQL-python==1.2.5
six==1.10.0
South==0.7.6
unicodecsv==0.9.4
Error:
pip install django-chronograph
Collecting django-chronograph
Using cached django-chronograph-0.3.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/87/h3ltndc5279cknk_vn9nzjjc0000gn/T/pip-build-_JDRxl/django-chronograph/setup.py", line 32, in <module>
setup_distribute()
File "/private/var/folders/87/h3ltndc5279cknk_vn9nzjjc0000gn/T/pip-build-_JDRxl/django-chronograph/setup.py", line 18, in setup_distribute
distribute_setup = __import__('distribute_setup')
File "distribute_setup.py", line 1
<html>
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/87/h3ltndc5279cknk_vn9nzjjc0000gn/T/pip-build-_JDRxl/django-chronograph/
The problem is with the installation script provided by django-chronograph.
In line 16 of setup.py, it tries to download a script:
https://bitbucket.org/wnielson/django-chronograph/src/f561106f6aaab62f2817e08e51c799320fd916d9/setup.py?at=default&fileviewer=file-view-default#setup.py-16
in this code block:
try:
import distribute_setup
except:
# Make sure we have Distribute
if not os.path.exists('distribute_setup'):
urllib.urlretrieve('http://nightly.ziade.org/distribute_setup.py',
'./distribute_setup.py')
However, when you visit the URL at http://nightly.ziade.org/distribute_setup.py, it gives a 404 error, thus the returned html in the error.
It looks like you might be able to get distribute here: https://pypi.python.org/pypi/distribute/0.7.3
Or try doing this before you install django-chronograph:
pip install distribute
Good luck!
django-chronograph is unmaintained. Its fork is doing much better and has support for Django 2.0 and Django 2.1: https://github.com/chrisspen/django-chroniker

Syntax error when installing csc-pysparse

I am new to Python and I am trying to install recsys package.
http://ocelma.net/software/python-recsys/build/html/installation.html
For this i need to install some pre-requiste packages, so i have to run this using pip
pip install csc-pysparse networkx divisi2
But whenever i run this i get the following in logs
Collecting csc-pysparse
Using cached csc-pysparse-1.1.1.4.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\64\AppData\Local\Temp\pip-build-wn7_65_9\csc-pysparse\
setup.py", line 33
print 'setuptools module not found.'
^
SyntaxError: Missing parentheses in call to 'print'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\i054564\
AppData\Local\Temp\pip-build-wn7_65_9\csc-pysparse\
I checked that setuptools exist in my python installation here
C:\Python34\lib\site-packages
I have ran everything from unstinalling setuptools to install it again, upgrade command, but it does not work.
Not able to figure out why setuptools is not found. Is it not found in the path of where pip resolves it from ?
cheers,
Saurav
The code triggering the error is Python 2-specific and is illegal in Python 3.
Apparently, csc-pysparse doesn't support Python 3 (its README only mentions 2.6) and looks abandoned (6 years since last commit).
Some guys out there suggest replacing it with SciPy.
The error is coming from the installation code of recsys package. In order to avoid this error, you need to install setuptools separately.
For debian machines, the below command will work.
sudo apt-get install python3-setuptools
For other machines, please checkout installation instructions at the link
Once setuptools package is installed, you can proceed with csc-pysparse installation.

pip wont install .WHL files

When I try to install any .WHL from gohike by typing into the cmd C:\Users\owner\Downloads>pip install TA_Lib-0.4.9-cp27-none-win_amd64.WHLI get this print out:
`Processing c:\users\owner\downloads\ta_lib-0.4.9-cp27-none-win_amd64.whl
Complete output from command python setup.py egg_info:
Traceback <most recent call last>:
File "<string>", line 1, in <module>
IOError: [Errno 2] No such file or directory:'c:\\users\\owner\\appdata\\lo
cal\\temp\\pip-9gwk2c-build\\setup.py'
-----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\owner\ap
pdata\local\temp\pip-9gwk2c-build\`
The part between pip- and -build inpip-9gwk2c-build is always different even on the same file.
I asked this Python 2.7.11 Pip 8.0.3 can't install gohike WHL of TA-Lib 0.4.9 a few days ago and decided to ask differently. Thanks to anyone who can help me!
You have an outdated pip which does not understand wheels. Wheels are not even supposed to have a setup.py inside.
Try upgrading pip with pip install --upgrade pip and then running the command again.
Well, I didn't fix pip but I found out that if I use 7zip to open/unpack the wheel file and drag drop the 2 folders in it into C:\Python27\Lib\site-packages that it works!

installing ggplot for python on windows10 64

I am using python 2.7 and installed the anaconda installations too.
although I am novice user, but everything is working fine.
Then I decided to use the ggplot. (yhat package for python)
instructions says
pip install -U ggplot
I had problem that it started to install many packages including ggplot but then it halt during the statsmodels package giving the following message:
c:\Python27\Scripts>pip install -U ggplot
Collecting ggplot
Using cached ggplot-0.6.8.tar.gz
Requirement already up-to-date: six in c:\python27\lib\site-packages (from ggplot)
Collecting statsmodels (from ggplot)
Using cached statsmodels-0.6.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "c:\users\appdata\local\temp\pip-build-8ce3lv\statsmodels\setup.py", line 393, in <module>
install_requires) = check_dependency_versions(min_versions)
File "c:\users\appdata\local\temp\pip-build-8ce3lv\statsmodels\setup.py", line 119, in check_dependency_versions
if not (StrictVersion(strip_rc(npversion)) >= min_versions['numpy']):
File "C:\Python27\lib\distutils\version.py", line 40, in __init__
self.parse(vstring)
File "C:\Python27\lib\distutils\version.py", line 107, in parse
raise ValueError, "invalid version number '%s'" % vstring
ValueError: invalid version number '1.10.0.post2'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\appdata\local\temp\pip-build-8ce3lv\statsmodels
I read in SO and on gitHub many questions but nothing is clear except that it is versioning problem
I tried to upgrade the packages but I failed.
any help is appreciated.
use conda install statsmodels. works for me on Windows 10 64bit
numpy 1.10 will soon be available without the post in the version number, based on the discussion on the numpy mailing list and numpy issue tracker.
The version scanning of statsmodels cannot handle the post part since it has never been used in the past by any science or data analysis related package.
The only solution right now is to edit the setup.py of statsmodels, or switch to a numpy version that doesn't have the post version number, or edit the version number in numpy.
https://github.com/statsmodels/statsmodels/issues/2645
https://github.com/numpy/numpy/issues/6431

Categories