PyVRML97 needs an older version of PyOpenGL - python

So I set up a virtualenv, with system-site-packages on, called vrmlmol. Inside the vrmlmol env I installed yolk with pip.
Here is the output-
(vrmlmol)debanjan#thinkpad:~/vrmlmol$ yolk -V PyOpenGL
PyOpenGL 3.1.0b1
PyOpenGL 3.0.2
PyOpenGL 3.0.1
(vrmlmol)debanjan#thinkpad:~/vrmlmol$ yolk -V PyVRML97
PyVRML97 2.3.0a4
As you see the 2.x versions of PyOpenGL do not exist in PyPI. when I try to install PyOpenGL and PyVRML I get the following dependency failure:
(vrmlmol)debanjan#thinkpad:~/vrmlmol$ pip install -I PyOpenGL PyVRML97
Downloading/unpacking PyOpenGL
Downloading PyOpenGL-3.0.2.tar.gz (891kB): 891kB downloaded
Running setup.py egg_info for package PyOpenGL
warning: no previously-included files matching '*.odt' found anywhere in distribution
warning: no previously-included files matching '*.odp' found anywhere in distribution
warning: no previously-included files matching '.cvsignore' found anywhere in distribution
warning: no previously-included files matching '*.diff' found anywhere in distribution
warning: no previously-included files found matching 'src/*.h'
warning: no previously-included files found matching 'src/*.xml'
warning: no previously-included files found matching 'src/*.zip'
warning: no previously-included files found matching 'src/*.pdf'
warning: no previously-included files found matching 'src/*.zip'
warning: no previously-included files found matching 'src/*.txt'
warning: no files found matching 'src/win32deps.py'
warning: no files found matching 'src/toglinstall/get_togl.py'
warning: no files found matching 'ChangeLog.txt'
warning: no previously-included files found matching 'OpenGL_accelerate'
Downloading/unpacking PyVRML97
Could not find a version that satisfies the requirement PyVRML97 (from versions: 2.2.0a4, 2.2.0a5, 2.2.0a5, 2.2.0a6, 2.2.0a6, 2.2.0a7, 2.2.0a7, 2.2.0a8, 2.2.0a8, 2.3.0a1, 2.3.0a1, 2.3.0a2, 2.3.0a2, 2.3.0a3, 2.3.0a3, 2.3.0a4, 2.3.0a4)
Cleaning up...
No distributions matching the version for PyVRML97
Storing complete log in /home/debanjan/.pip/pip.log
Since these packages aren't present I don't see any option of using pip to install a newer PyVRML or an older PyOpenGL. Any help there? I am trying to make it easy for some colleagues to get started on their own setups .. so pip would be nice to have for them.

This is a side-effect of the recent changes to PIP that disallow installation of alpha/beta release by default. The last "final" release of PyVRML97 is so old that it depended on PyOpenGL 2.x (which is long since obsolete, and no longer retrievable from SourceForge via automated tools).
Unfortunately I've been remiss in getting final releases of PyVRML97 and OpenGLContext out, as I often just treat them as my personal test environment for PyOpenGL. Until I get around to fixing that you'll need to explicitly specify the alpha releases.
To get past the particular issue, you will need to explicitly specify the PyVRML97 release:
$ pip install "PyVRML97==2.3.0a4"
To install a full, working PyVRML97/OpenGLContext environment with the currently-most-recently-released versions of all of the packages on Python 2.7 (on Linux), your command line would look like this:
$ virtualenv oglc-env
$ source oglc-env/bin/activate
(oglc-env)$ pip install PyOpenGL PyOpenGL_accelerate "PyVRML97==2.3.0a4" simpleparse numpy "OpenGLContext==2.2.0a3" pydispatcher pillow
You may find that pillow will require extra dependencies installed at the system level to get it installed (I already have those on my machine). I've just tested the install process on a Kubuntu 13.10 machine and run an OpenGLContext demo script with the resulting virtualenv.

Related

Issue Installing WISDEM using openmdao-0.7.0

Below is the log which I received when trying to install WISDEM using OpenMDAO-0.7.0. I know it's been a while but can anyone figure what went wrong in my installation process. I probably missed something that is important.
I think the issue lie in installing some libraries probably:
libzmq
or something related but am not sure.
But looking at the log -that's where the installation has started to converge. Do have a look.
Cheers!
(openmdao-0.7.0) C:\Python27\openmdao-0.7.0\WISDEM>python setup_all.py Searching for pandas
Best match: pandas 0.14.1
pandas 0.14.1 is already the active version in easy-install.pth
Using c:\python27\lib\site-packages
Processing dependencies for pandas
Finished processing dependencies for pandas
Searching for algopy
Best match: algopy 0.5.5
Processing algopy-0.5.5-py2.7.egg
algopy 0.5.5 is already the active version in easy-install.pth
Using c:\python27\openmdao-0.7.0\lib\site-packages\algopy-0.5.5-py2.7.egg
Processing dependencies for algopy
Finished processing dependencies for algopy
Searching for zope.interface
Best match: zope.interface 3.6.1
Processing zope.interface-3.6.1-py2.7-win32.egg
zope.interface 3.6.1 is already the active version in easy-install.pth
Using c:\python27\openmdao-0.7.0\lib\site-packages\zope.interface-3.6.1-py2.7-wi
n32.egg
Processing dependencies for zope.interface
Finished processing dependencies for zope.interface
Searching for sphinx
Best match: sphinx 1.6.3
Processing sphinx-1.6.3-py2.7.egg
sphinx 1.6.3 is already the active version in easy-install.pth
Installing sphinx-apidoc-script.py script to C:\Python27\openmdao-0.7.0\Scripts
Installing sphinx-apidoc.exe script to C:\Python27\openmdao-0.7.0\Scripts
Installing sphinx-apidoc.exe.manifest script to C:\Python27\openmdao-0.7.0\Scrip
ts
Installing sphinx-build-script.py script to C:\Python27\openmdao-0.7.0\Scripts
Installing sphinx-build.exe script to C:\Python27\openmdao-0.7.0\Scripts
Installing sphinx-build.exe.manifest script to C:\Python27\openmdao-0.7.0\Script
s
Installing sphinx-quickstart-script.py script to C:\Python27\openmdao-0.7.0\Scri
pts
Installing sphinx-quickstart.exe script to C:\Python27\openmdao-0.7.0\Scripts
Installing sphinx-quickstart.exe.manifest script to C:\Python27\openmdao-0.7.0\S
cripts
Installing sphinx-autogen-script.py script to C:\Python27\openmdao-0.7.0\Scripts
Installing sphinx-autogen.exe script to C:\Python27\openmdao-0.7.0\Scripts
Installing sphinx-autogen.exe.manifest script to C:\Python27\openmdao-0.7.0\Scri
pts
Using c:\python27\openmdao-0.7.0\lib\site-packages\sphinx-1.6.3-py2.7.egg
Processing dependencies for sphinx
Finished processing dependencies for sphinx
Searching for xlrd
Best match: xlrd 1.0.0
Processing xlrd-1.0.0-py2.7.egg
xlrd 1.0.0 is already the active version in easy-install.pth
Installing runxlrd.py script to C:\Python27\openmdao-0.7.0\Scripts
Using c:\python27\openmdao-0.7.0\lib\site-packages\xlrd-1.0.0-py2.7.egg
Processing dependencies for xlrd
Finished processing dependencies for xlrd
Searching for pyopt
Best match: pyopt 0.84
Processing pyopt-0.84-py2.7.egg
pyopt 0.84 is already the active version in easy-install.pth
Using c:\python27\openmdao-0.7.0\lib\site-packages\pyopt-0.84-py2.7.egg
Processing dependencies for pyopt
Finished processing dependencies for pyopt
Searching for py2exe
Best match: py2exe 0.9.2.2
Processing py2exe-0.9.2.2-py2.7-win32.egg
py2exe 0.9.2.2 is already the active version in easy-install.pth
Installing build_exe-script.py script to C:\Python27\openmdao-0.7.0\Scripts
Installing build_exe-script.pyc script to C:\Python27\openmdao-0.7.0\Scripts
Installing build_exe.exe script to C:\Python27\openmdao-0.7.0\Scripts
Installing build_exe.exe.manifest script to C:\Python27\openmdao-0.7.0\Scripts
Installing build_exe-script.py script to C:\Python27\openmdao-0.7.0\Scripts
Installing build_exe.exe script to C:\Python27\openmdao-0.7.0\Scripts
Installing build_exe.exe.manifest script to C:\Python27\openmdao-0.7.0\Scripts
Using c:\python27\openmdao-0.7.0\lib\site-packages\py2exe-0.9.2.2-py2.7-win32.eg
g
Processing dependencies for py2exe
Finished processing dependencies for py2exe
Searching for pyzmq
Reading https://pypi.python.org/simple/pyzmq/
Downloading https://pypi.python.org/packages/af/37/8e0bf3800823bc247c36715a52e92
4e8f8fd5d1432f04b44b8cd7a5d7e55/pyzmq-16.0.2.tar.gz#md5=9a8768b00a566a400d70318f
8c359cfe
Best match: pyzmq 16.0.2
Processing pyzmq-16.0.2.tar.gz
Writing c:\users\anur\appdata\local\temp\easy_install-6x9i5o\pyzmq-16.0.2\setup.
cfg
Running pyzmq-16.0.2\setup.py -q bdist_egg --dist-dir c:\users\anur\appdata\loca
l\temp\easy_install-6x9i5o\pyzmq-16.0.2\egg-dist-tmp-fszbbf
warning: no files found matching 'tox.ini'
no previously-included directories found matching 'docs\build'
no previously-included directories found matching 'docs\gh-pages'
warning: no previously-included files found matching 'bundled\zeromq\src\Makefil
e*'
warning: no previously-included files found matching 'bundled\zeromq\src\platfor
m.hpp'
warning: no previously-included files found matching 'zmq\libzmq*'
warning: no previously-included files matching '__pycache__\*' found anywhere in
distribution
warning: no previously-included files matching '.deps\*' found anywhere in distr
ibution
warning: no previously-included files matching '*.so' found anywhere in distribu
tion
warning: no previously-included files matching '*.pyd' found anywhere in distrib
ution
warning: no previously-included files matching '.git*' found anywhere in distrib
ution
warning: no previously-included files matching '.DS_Store' found anywhere in dis
tribution
warning: no previously-included files matching '.mailmap' found anywhere in dist
ribution
warning: no previously-included files matching 'Makefile.am' found anywhere in d
istribution
warning: no previously-included files matching 'Makefile.in' found anywhere in d
istribution
************************************************
Warning: Couldn't find an acceptable libzmq on the system.
If you expected pyzmq to link against an installed libzmq, please check to make
sure:
* You have a C compiler installed
* A development version of Python is installed (including headers)
* A development version of ZMQ >= 3.2 is installed (including headers)
* If ZMQ is not in a default location, supply the argument --zmq=<path>
* If you did recently install ZMQ to a default location,
try rebuilding the ld cache with `sudo ldconfig`
or specify zmq's location with `--zmq=/usr/local`
You can skip all this detection/waiting nonsense if you know
you want pyzmq to bundle libzmq as an extension by passing:
`--zmq=bundled`
I will now try to build libzmq as a Python extension
unless you interrupt me (^C) in the next 10 seconds...
1...
************************************************
Using bundled libzmq
already have bundled\zeromq
staging platform.hpp from: bundled\zeromq\builds\msvc
************************************************
In file included from zmq\utils/zmq_compat.h:16:0,
from zmq\devices\monitoredqueue.c:403:
bundled\zeromq\include/zmq.h:439:52: error: unknown type name 'uint8_t'
ZMQ_EXPORT char *zmq_z85_encode (char *dest, const uint8_t *data, size_t size);
^
bundled\zeromq\include/zmq.h:442:12: error: unknown type name 'uint8_t'
ZMQ_EXPORT uint8_t *zmq_z85_decode (uint8_t *dest, const char *string);
^
bundled\zeromq\include/zmq.h:442:37: error: unknown type name 'uint8_t'
ZMQ_EXPORT uint8_t *zmq_z85_decode (uint8_t *dest, const char *string);
^
In file included from zmq\devices\monitoredqueue.c:403:0:
zmq\devices\monitoredqueue.c: In function '__pyx_f_3zmq_7devices_14monitoredqueu
e__relay':
zmq\utils/zmq_compat.h:12:23: error: unknown type name 'int64_t'
#define pyzmq_int64_t int64_t
^
zmq\devices\monitoredqueue.c:1761:3: note: in expansion of macro 'pyzmq_int64_t'
pyzmq_int64_t __pyx_v_flag_2;
^
zmq\utils/zmq_compat.h:12:23: error: 'int64_t' undeclared (first use in this fun
ction)
#define pyzmq_int64_t int64_t
^
zmq\devices\monitoredqueue.c:1786:30: note: in expansion of macro 'pyzmq_int64_t
'
__pyx_v_flagsz = (sizeof(pyzmq_int64_t));
^
zmq\utils/zmq_compat.h:12:23: note: each undeclared identifier is reported only
once for each function it appears in
#define pyzmq_int64_t int64_t
^
zmq\devices\monitoredqueue.c:1786:30: note: in expansion of macro 'pyzmq_int64_t
'
__pyx_v_flagsz = (sizeof(pyzmq_int64_t));
^
zmq\devices\monitoredqueue.c: In function '__Pyx_RaiseArgtupleInvalid':
zmq\devices\monitoredqueue.c:5271:18: warning: unknown conversion type character
'z' in format [-Wformat=]
(num_expected == 1) ? "" : "s", num_found);
^
zmq\devices\monitoredqueue.c:5271:18: warning: format '%s' expects argument of t
ype 'char *', but argument 5 has type 'Py_ssize_t' [-Wformat=]
zmq\devices\monitoredqueue.c:5271:18: warning: unknown conversion type character
'z' in format [-Wformat=]
zmq\devices\monitoredqueue.c:5271:18: warning: too many arguments for format [-W
format-extra-args]
zmq\devices\monitoredqueue.c: In function '__Pyx_CyFunction_CallMethod':
zmq\devices\monitoredqueue.c:6537:17: warning: unknown conversion type character
'z' in format [-Wformat=]
f->m_ml->ml_name, size);
^
zmq\devices\monitoredqueue.c:6537:17: warning: too many arguments for format [-W
format-extra-args]
zmq\devices\monitoredqueue.c:6553:17: warning: unknown conversion type character
'z' in format [-Wformat=]
f->m_ml->ml_name, size);
^
zmq\devices\monitoredqueue.c:6553:17: warning: too many arguments for format [-W
format-extra-args]
zmq\devices\monitoredqueue.c: In function '__Pyx_ImportType':
zmq\devices\monitoredqueue.c:7390:13: warning: unknown conversion type character
'z' in format [-Wformat=]
module_name, class_name, basicsize, size);
^
zmq\devices\monitoredqueue.c:7390:13: warning: unknown conversion type character
'z' in format [-Wformat=]
zmq\devices\monitoredqueue.c:7390:13: warning: too many arguments for format [-W
format-extra-args]
zmq\devices\monitoredqueue.c:7396:13: warning: unknown conversion type character
'z' in format [-Wformat=]
module_name, class_name, basicsize, size);
^
zmq\devices\monitoredqueue.c:7396:13: warning: unknown conversion type character
'z' in format [-Wformat=]
zmq\devices\monitoredqueue.c:7396:13: warning: too many arguments for format [-W
format-extra-args]
error: Setup script exited with error: command 'c:\\Rtools\\mingw_32\\bin\\gcc.e
xe' failed with exit status 1
Searching for sphinxcontrib-bibtex
Best match: sphinxcontrib-bibtex 0.3.5
Processing sphinxcontrib_bibtex-0.3.5-py2.7.egg
sphinxcontrib-bibtex 0.3.5 is already the active version in easy-install.pth
Using c:\python27\openmdao-0.7.0\lib\site-packages\sphinxcontrib_bibtex-0.3.5-py
2.7.egg
Processing dependencies for sphinxcontrib-bibtex
Finished processing dependencies for sphinxcontrib-bibtex
Searching for sphinxcontrib-napoleon
Best match: sphinxcontrib-napoleon 0.6.1
Processing sphinxcontrib_napoleon-0.6.1-py2.7.egg
sphinxcontrib-napoleon 0.6.1 is already the active version in easy-install.pth
Using c:\python27\openmdao-0.7.0\lib\site-packages\sphinxcontrib_napoleon-0.6.1-
py2.7.egg
Processing dependencies for sphinxcontrib-napoleon
Finished processing dependencies for sphinxcontrib-napoleon
Searching for numpydoc
Best match: numpydoc 0.7.0
Processing numpydoc-0.7.0-py2.7.egg
numpydoc 0.7.0 is already the active version in easy-install.pth
Using c:\python27\openmdao-0.7.0\lib\site-packages\numpydoc-0.7.0-py2.7.egg
Processing dependencies for numpydoc
Finished processing dependencies for numpydoc
Searching for ipython
Reading https://pypi.python.org/simple/ipython/
Downloading https://pypi.python.org/packages/79/63/b671fc2bf0051739e87a7478a207b
beb45cfae3c328d38ccdd063d9e0074/ipython-6.1.0.tar.gz#md5=1e15e1ce3f3f722da6935d7
ac0e51346
Best match: ipython 6.1.0
Processing ipython-6.1.0.tar.gz
Writing c:\users\anur\appdata\local\temp\easy_install-k7ruj5\ipython-6.1.0\setup
.cfg
Running ipython-6.1.0\setup.py -q bdist_egg --dist-dir c:\users\anur\appdata\loc
al\temp\easy_install-k7ruj5\ipython-6.1.0\egg-dist-tmp-tkov77
IPython 6.0+ does not support Python 2.6, 2.7, 3.0, 3.1, or 3.2.
When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
Beginning with IPython 6.0, Python 3.3 and above is required.
See IPython `README.rst` file for more information:
https://github.com/ipython/ipython/blob/master/README.rst
Python sys.version_info(major=2, minor=7, micro=11, releaselevel='final', serial
=0) detected.
error: Setup script exited with 1
Searching for python-dateutil
Best match: python-dateutil 2.6.0
Processing python_dateutil-2.6.0-py2.7.egg
python-dateutil 2.6.0 is already the active version in easy-install.pth
Using c:\python27\openmdao-0.7.0\lib\site-packages\python_dateutil-2.6.0-py2.7.e
gg
Processing dependencies for python-dateutil
Finished processing dependencies for python-dateutil
install url: package= fusedwind url= http://github.com/FUSED-Wind/fusedwind/tar
ball/develop
installing distribution from current directory as a 'develop' egg
running develop
running egg_info
creating src\fusedwind.egg-info
writing requirements to src\fusedwind.egg-info\requires.txt
writing src\fusedwind.egg-info\PKG-INFO
writing top-level names to src\fusedwind.egg-info\top_level.txt
writing dependency_links to src\fusedwind.egg-info\dependency_links.txt
writing manifest file 'src\fusedwind.egg-info\SOURCES.txt'
reading manifest file 'src\fusedwind.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no directories found matching 'src\fusedwind\sphinx_build\html'
writing manifest file 'src\fusedwind.egg-info\SOURCES.txt'
running build_ext
Creating c:\python27\openmdao-0.7.0\lib\site-packages\fusedwind.egg-link (link t
o src)
Adding fusedwind 0.1.0 to easy-install.pth file
Installed c:\python27\openmdao-0.7.0\wisdem\plugins\fusedwind\src
subprocess returned 0
install url: package= Turbine_CostsSE url= http://github.com/WISDEM/Turbine_Cos
tsSE/tarball/0.1
installing distribution from current directory as a 'develop' egg
running develop
running egg_info
creating src\Turbine_CostsSE.egg-info
writing requirements to src\Turbine_CostsSE.egg-info\requires.txt
writing src\Turbine_CostsSE.egg-info\PKG-INFO
writing top-level names to src\Turbine_CostsSE.egg-info\top_level.txt
writing dependency_links to src\Turbine_CostsSE.egg-info\dependency_links.txt
writing manifest file 'src\Turbine_CostsSE.egg-info\SOURCES.txt'
reading manifest file 'src\Turbine_CostsSE.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching 'openmdao_log.txt' found anywhere
in distribution
writing manifest file 'src\Turbine_CostsSE.egg-info\SOURCES.txt'
running build_ext
Creating c:\python27\openmdao-0.7.0\lib\site-packages\Turbine-CostsSE.egg-link (
link to src)
Adding Turbine-CostsSE 0.1.0 to easy-install.pth file
Installed c:\python27\openmdao-0.7.0\wisdem\plugins\turbine_costsse\src
subprocess returned 0
install url: package= CommonSE url= http://github.com/WISDEM/CommonSE/tarball/0
.1
Traceback (most recent call last):
File "setup_all.py", line 105, in <module>
install_url(f, url,force=options.force)
File "setup_all.py", line 28, in install_url
thetarfile = tarfile.open(fileobj=response, mode="r|gz")
File "C:\Python27\Lib\tarfile.py", line 1703, in open
stream = _Stream(name, filemode, comptype, fileobj, bufsize)
File "C:\Python27\Lib\tarfile.py", line 430, in __init__
self._init_read_gz()
File "C:\Python27\Lib\tarfile.py", line 524, in _init_read_gz
raise ReadError("not a gzip file")
tarfile.ReadError: not a gzip file
(openmdao-0.7.0) C:\Python27\openmdao-0.7.0\WISDEM>'
openmdao 0.7.0 is very heavily outdated. You should be using at the very least 0.13.0, or much preferably 1.7.X

Unable to install TurboJson 1.3.2 using easy_install

easy_install -U TurboJson is failing with the below error-
user#ubuntu-dev:~$ sudo easy_install -U TurboJSON
Searching for TurboJSON
Reading pypi.python.org/simple/TurboJSON link
Best match: TurboJson 1.3.2
Downloading TurboJson-1.3.2-py2.7.egg#md5=8708fcb8979c661104c9b444e5428484
Processing TurboJson-1.3.2-py2.7.egg
Moving TurboJson-1.3.2-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Adding TurboJson 1.3.2 to easy-install.pth file
Installed /usr/local/lib/python2.7/dist-packages/TurboJson-1.3.2-py2.7.egg
Processing dependencies for TurboJSON
Searching for simplejson>=1.9.1
Reading pypi.python.org/simple/simplejson/ link
Best match: simplejson 3.8.1
Downloading simplejson-3.8.1.tar.gz#md5=b8441f1053edd9dc335ded8c7f98a974
Processing simplejson-3.8.1.tar.gz
Writing /tmp/easy_install-4VcmRi/simplejson-3.8.1/setup.cfg
Running simplejson-3.8.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-4VcmRi/simplejson-3.8.1/egg-dist-tmp-K89rCq
zip_safe flag not set; analyzing archive contents...
simplejson.tests.init: module references file Adding simplejson 3.8.1 to easy-install.pth file
Installed /usr/local/lib/python2.7/dist-packages/simplejson-3.8.1-py2.7-linux-x86_64.egg
Searching for PEAK-Rules>=0.5a1.dev-r2600
Reading https://pypi.python.org/simple/PEAK-Rules/
No local packages or download links found for PEAK-Rules>=0.5a1.dev-r2600
error: Could not find suitable distribution for Requirement.parse('PEAK-Rules>=0.5a1.dev-r2600')
user#ubuntu-dev:~$
https://pypi.python.org/simple/peak-rules/ seems to be broken. It does not list any packages which is very strange. Earlier, it was mostly providing PEAK-Rules>=0.5a1.dev-r2713.
From what I can tell, the PyPi page for PEAK-Rules does not have any packages available for installation, as you suspected in your question.
The solution is to install the PEAK-Rules dependency yourself, then install TurboJSON afterwards.
First, run:
easy_install http://www.turbogears.org/2.1/downloads/current/PEAK-Rules-0.5a1.dev-r2686.tar.gz
This should install PEAK-Rules 0.5a1.dev-r2686 successfully, which will satisfy the TurboJSON requirement of PEAK-Rules>=0.5a1.dev-r2600.
Now, if you run (sudo) easy_install -U TurboJSON, the installation should work as intended.

setuptools finds wrong package during install

In myria-python, we use setuptools with install_requires to configure which packages are needed. In our particular setup file, we include requests-toolbelt and requests in that list.
When we create a new virtual environment and then run python setup.py install, it fails the first time with Cannot find required distribution requests. This happens seemingly because pip identifies requests toolbelt-0.3.1 (note the space) as the right match for package requests.
Running python setup.py install again seems to install requests after all.
Here is a GitHub issue with a full log of the install process.
Steps to reproduce:
git clone https://github.com/uwescience/myria-python.git
cd myria-python
mkvirtualenv myria-python
python setup.py
The entire lab seems to have this issue, however all of us use Mac OS X with either 10.9 or 10.10 installed. Here are my machine's specs:
OS X 10.10.1
Python 2.7.9 (default, Dec 10 2014, 23:46:04)
pip 1.5.6
mkvirtualenv 1.11.6
I was also able to duplicate it on one of our Ubuntu servers:
Ubuntu 14.04.1 LTS \n \l
Python 2.7.6
pip 1.5.4
mkvirtualenv 1.11.4
Here is the tail of the error log:
Searching for requests-toolbelt
Reading https://pypi.python.org/simple/requests_toolbelt/
Best match: requests-toolbelt 0.3.1
Downloading https://pypi.python.org/packages/source/r/requests-toolbelt/requests-toolbelt-0.3.1.tar.gz#md5=e563377e46cd0be8c7b3ac144a65844c
Processing requests-toolbelt-0.3.1.tar.gz
Writing /var/folders/m_/qltd_g_13qd1v5tvr4l6q2rc0000gn/T/easy_install-2lqn7g/requests-toolbelt-0.3.1/setup.cfg
Running requests-toolbelt-0.3.1/setup.py -q bdist_egg --dist-dir /var/folders/m_/qltd_g_13qd1v5tvr4l6q2rc0000gn/T/easy_install-2lqn7g/requests-toolbelt-0.3.1/egg-dist-tmp-riz25e
no previously-included directories found matching '*.pyc'
warning: manifest_maker: MANIFEST.in, line 6: 'recursive-include' expects <dir> <pattern1> <pattern2> ...
warning: manifest_maker: MANIFEST.in, line 7: 'recursive-include' expects <dir> <pattern1> <pattern2> ...
no previously-included directories found matching 'docs/_build'
zip_safe flag not set; analyzing archive contents...
Adding requests-toolbelt 0.3.1 to easy-install.pth file
Installed /Users/dhalperi/Envs/myria-python2/lib/python2.7/site-packages/requests_toolbelt-0.3.1-py2.7.egg
Searching for requests
Best match: requests toolbelt-0.3.1
Downloading https://pypi.python.org/packages/source/r/requests-toolbelt/requests-toolbelt-0.3.1.tar.gz#md5=e563377e46cd0be8c7b3ac144a65844c
Processing requests-toolbelt-0.3.1.tar.gz
Writing /var/folders/m_/qltd_g_13qd1v5tvr4l6q2rc0000gn/T/easy_install-LKxX9E/requests-toolbelt-0.3.1/setup.cfg
Running requests-toolbelt-0.3.1/setup.py -q bdist_egg --dist-dir /var/folders/m_/qltd_g_13qd1v5tvr4l6q2rc0000gn/T/easy_install-LKxX9E/requests-toolbelt-0.3.1/egg-dist-tmp-3tgz5e
no previously-included directories found matching '*.pyc'
warning: manifest_maker: MANIFEST.in, line 6: 'recursive-include' expects <dir> <pattern1> <pattern2> ...
warning: manifest_maker: MANIFEST.in, line 7: 'recursive-include' expects <dir> <pattern1> <pattern2> ...
no previously-included directories found matching 'docs/_build'
zip_safe flag not set; analyzing archive contents...
requests-toolbelt 0.3.1 is already the active version in easy-install.pth
Installed /Users/dhalperi/Envs/myria-python2/lib/python2.7/site-packages/requests_toolbelt-0.3.1-py2.7.egg
error: Could not find required distribution requests
How can I fix this so that the package installs without running setup.py twice?
(Mirrored from https://github.com/uwescience/myria-python/pull/35)
Multiple hours of 100's of Google searches eventually took me to this
numpy thread:
https://github.com/numpy/numpy/issues/2434
for which they had to add numpy to setup_requires AND install_requires to fix a similar issue. Doing
this with requests seems to have worked. However, I am somewhat
skeptical as #Timusan indicated above not seeing our problem in the
first place.
I tried on my Mac as well as on Ubuntu, and am now able to
install from a clean virtualenv on both systems.
As others have mentioned in the comments, the root cause is a buggy version of python / pip. This problem exists with python 2.7.6, but when I upgraded to 2.7.9 there was no longer a problem. Also beware that mkirtualenv by default uses the python in /usr/bin/python, even if there are other python versions further up in the $PATH.

Python - Issue in Installing Argpath for python 2.6.6 version

I have had installed argpath package for python2.6.6 in my system. But when i try to run my script which requires argparser module, still throwing error "ImportError: No module named argparse"
i am using Fedora 20, so the default version is Python 2.7. So i have installed python 2.6 in some other path ( alias python='/usr/local/bin/python2.6' ) and i have installed argparser using pip tool as shown below and it said "Successfully installed"
[root#127 python2.6]# pip install --target=/usr/bin/Python2.6/lib/python2.6/ argparse
Downloading/unpacking argparse
Downloading argparse-1.2.1.tar.gz (69kB): 69kB downloaded
Running setup.py egg_info for package argparse
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.orig' found anywhere in distribution
warning: no previously-included files matching '*.rej' found anywhere in distribution
no previously-included directories found matching 'doc/_build'
no previously-included directories found matching 'env24'
no previously-included directories found matching 'env25'
no previously-included directories found matching 'env26'
no previously-included directories found matching 'env27'
Installing collected packages: argparse
Running setup.py install for argparse
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.orig' found anywhere in distribution
warning: no previously-included files matching '*.rej' found anywhere in distribution
no previously-included directories found matching 'doc/_build'
no previously-included directories found matching 'env24'
no previously-included directories found matching 'env25'
no previously-included directories found matching 'env26'
no previously-included directories found matching 'env27'
Successfully installed
argparse
Cleaning up...
But when i try to run my python script, it is still saying the same error as below
[root#127 python2.6]# python /home/rajamm/python_scripts/json2csv.py -f /home/rajamm/python_scripts/cvl.json -o /home/rajamm/python_scripts/cvl.csv
Exception in user code:
------------------------------------------------------------
Traceback (most recent call last):
File "/home/rajamm/python_scripts/json2csv.py", line 6, in <module>
import fileinput, argparse, json, csv
ImportError: No module named argparse
------------------------------------------------------------
Exiting1.
I have stuck for 2 days with this issue. Please suggest me on this.
I just got resolved myself. Actually it was my mistake with the wrong path,
Installed path for argparser:
[root#127 python2.6]# pwd
/usr/local/lib/python2.6
[root#127 python2.6]#
[root#127 python2.6]#
But Mistakenly installed in the below path:
[root#127 python2.6]# cd /usr/local/bin/ (Wrong one)
[root#127 bin]# ls -ltr | grep arg
-rwxr-xr-x. 1 root root 87791 Sep 22 17:40 argparse.py
-rwxr-xr-x. 1 root root 61546 Sep 22 17:56 argparse.pyc
Actually i am a corporate user and i had a proxy issue. So i have resolved by using the below command for the proxy issue.
pip install -U argparser - It will not work if you have proxy setting in your network.
So i have tried below one for the Proxy issue,
export https_proxy=<username>:<password>#<proxy url>:<port no> - If your password has special chars, then you need to handle it accordingly.
So the pip installer installed argparser in the default Python2.7 location.
Then i have modified the command like below,
pip install --target=/usr/bin/Python2.6/lib/python2.6/ argparse
Finally it will install the argparser package in the specified directory. But here also i made a mistake in the path..
For me, i have specified /usr/local/lib/python2.6 to get it resolved.
So the final commands are :
1. export https_proxy=<username>:<password>#<proxy url>:<port no>
2. pip install --target=/usr/local/lib/python2.6/ argparse
Now it is working fine.. Thank God.

Python's “easy_install” on Windows - HtmlCSSInclude

I just installed Python 2.7 and easy_install-2.7.exe on my Windows 2003 server, then set %PATH% to C:\Python27;C:\Python27\Scripts;. Then I tried to install a python package with easy_install, but easy_install failed. The failure follows:
C:\>easy_install HtmlCssInclude
Searching for HtmlCssInclude
Reading http://pypi.python.org/simple/HtmlCssInclude/
Best match: HtmlCssInclude 0.1.2
Downloading http://pypi.python.org/packages/source/H/HtmlCssInclude/HtmlCssInclu
de-0.1.2.tar.gz#md5=0b4438bf62ae66842a514dcff67c0cd7
Processing HtmlCssInclude-0.1.2.tar.gz
Running HtmlCssInclude-0.1.2\setup.py -q bdist_egg --dist-dir c:\docume~1\admini
~1\locals~1\temp\1\easy_install-qpossf\HtmlCssInclude-0.1.2\egg-dist-tmp-haku7q
C:\Python27\Lib\distutils\dist.py:267: UserWarning: Unknown distribution option:
'auther'
warnings.warn(msg)
warning: no files found matching 'testdata'
error: Setup script exited with error: can't copy 'sample.css': doesn't exist or
not a regular file
Anybody please help me.
I tried editing this package and it installed.
Downloaded the package and edited HtmlCssinclude.py. In addition i found the reference to 'sample.css' and 'testdata' is not necessary for this package installation. So i also removed those reference. This help me to install package from local folder.

Categories

Resources