Could you try using:

python3 -mvenv deprecation

Please?

I am wondering if this an issue with virtualenv using Py2 (32 bit) and Py3 (64 
bit)? I am grasping at straws here, but the whole lib64 thing is interesting.

While using the python in the venv, could you also run:

import sys
print('\n'.join(sys.path))

I’d be interested in seeing what your sys.path is.

What version of Linux are you running? CentOS 7?

I am not sure why the version of zope.interface would change anything though.

Thanks,
Bert JW Regeer

> On Mar 15, 2017, at 21:03, Dan Clark <[email protected]> wrote:
> 
> I think I figured it out. go to the bottom for the actual issue. Hint it's 
> not a permission issue. If you're good you might be able to figure it out 
> before the end.
> 
> I decided to get as basic as possible. I SSH'ed into the EC2 VM and with in 
> my home directory I used virtualenv to create a venv.
> 
> (venv)[ec2-user@ip-172-31-13-110 ~]$ virtualenv -p python3 deprecation
> Running virtualenv with interpreter /opt/python/run/venv/bin/python3
> Using real prefix '/usr'
> New python executable in deprecation/bin/python3
> Also creating executable in deprecation/bin/python
> Installing setuptools, pip...done.
> 
> 
> Then I installed pyramid into that venv
> 
> (deprecation)[ec2-user@ip-172-31-13-110 ~]$ pip install pyramid
> You are using pip version 6.0.8, however version 9.0.1 is available.
> You should consider upgrading via the 'pip install --upgrade pip' command.
> Collecting pyramid
>   Downloading pyramid-1.8.3-py2.py3-none-any.whl (574kB)
>     100% |################################| 577kB 511kB/s 
> Collecting PasteDeploy>=1.5.0 (from pyramid)
>   Downloading PasteDeploy-1.5.2-py2.py3-none-any.whl
> Collecting zope.deprecation>=3.5.0 (from pyramid)
>   Downloading zope.deprecation-4.2.0-py2.py3-none-any.whl
> Collecting repoze.lru>=0.4 (from pyramid)
>   Downloading repoze.lru-0.6.tar.gz
> Collecting venusian>=1.0a3 (from pyramid)
>   Downloading venusian-1.0.tar.gz (45kB)
>     100% |################################| 49kB 3.5MB/s 
> Collecting WebOb>=1.7.0rc2 (from pyramid)
>   Downloading WebOb-1.7.1-py2.py3-none-any.whl (83kB)
>     100% |################################| 86kB 2.6MB/s 
> Collecting hupper (from pyramid)
>   Downloading hupper-0.4.4-py2.py3-none-any.whl
> Requirement already satisfied (use --upgrade to upgrade): setuptools in 
> ./deprecation/lib/python3.4/site-packages (from pyramid)
> Collecting translationstring>=0.4 (from pyramid)
>   Downloading translationstring-1.3-py2.py3-none-any.whl
> Collecting zope.interface>=3.8.0 (from pyramid)
>   Downloading zope.interface-4.3.3.tar.gz (150kB)
>     100% |################################| 151kB 1.7MB/s 
> Installing collected packages: zope.interface, translationstring, hupper, 
> WebOb, venusian, repoze.lru, zope.deprecation, PasteDeploy, pyramid
>   Running setup.py install for zope.interface
>     building 'zope.interface._zope_interface_coptimizations' extension
>     gcc -pthread -Wno-unused-result -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG 
> -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
> --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv 
> -fPIC -I/usr/include/python3.4m -c 
> src/zope/interface/_zope_interface_coptimizations.c -o 
> build/temp.linux-x86_64-3.4/src/zope/interface/_zope_interface_coptimizations.o
>     src/zope/interface/_zope_interface_coptimizations.c:34:1: warning: 
> "METH_KEYWORDS" redefined
>     In file included from /usr/include/python3.4m/Python.h:90,
>                      from 
> src/zope/interface/_zope_interface_coptimizations.c:15:
>     /usr/include/python3.4m/methodobject.h:56:1: warning: this is the 
> location of the previous definition
>     gcc -pthread -shared 
> build/temp.linux-x86_64-3.4/src/zope/interface/_zope_interface_coptimizations.o
>  -L/usr/lib64 -lpython3.4m -o 
> build/lib.linux-x86_64-3.4/zope/interface/_zope_interface_coptimizations.cpython-34m.so
>     Skipping installation of 
> /home/ec2-user/deprecation/lib64/python3.4/site-packages/zope/__init__.py 
> (namespace package)
>     Installing 
> /home/ec2-user/deprecation/lib64/python3.4/site-packages/zope.interface-4.3.3-py3.4-nspkg.pth
> 
> 
> 
>   Running setup.py install for venusian
>   Running setup.py install for repoze.lru
>     Skipping installation of 
> /home/ec2-user/deprecation/lib/python3.4/site-packages/repoze/__init__.py 
> (namespace package)
>     Installing 
> /home/ec2-user/deprecation/lib/python3.4/site-packages/repoze.lru-0.6-py3.4-nspkg.pth
> 
> 
> 
> Successfully installed PasteDeploy-1.5.2 WebOb-1.7.1 hupper-0.4.4 
> pyramid-1.8.3 repoze.lru-0.6 translationstring-1.3 venusian-1.0 
> zope.deprecation-4.2.0 zope.interface-4.3.3
> 
> And then checked for zope.deprecation
> 
> (deprecation)[ec2-user@ip-172-31-13-110 ~]$ pip freeze
> You are using pip version 6.0.8, however version 9.0.1 is available.
> You should consider upgrading via the 'pip install --upgrade pip' command.
> hupper==0.4.4
> PasteDeploy==1.5.2
> pyramid==1.8.3
> repoze.lru==0.6
> translationstring==1.3
> venusian==1.0
> WebOb==1.7.1
> zope.deprecation==4.2.0
> zope.interface==4.3.3
> 
> Then I jumped into python and imported pip and made sure I still could see it.
> 
> (deprecation)[ec2-user@ip-172-31-13-110 deprecation]$ python
> Python 3.4.3 (default, Sep  1 2016, 23:33:38) 
> [GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import pip #needed to use the pip functions
> >>> for i in pip.get_installed_distributions(local_only=True):
> ...     print(i)
> ... 
> zope.interface 4.3.3
> pip 6.0.8
> pyramid 1.8.3
> zope.deprecation 4.2.0
> translationstring 1.3
> venusian 1.0
> PasteDeploy 1.5.2
> repoze.lru 0.6
> setuptools 12.0.5
> WebOb 1.7.1
> hupper 0.4.4
> >>> 
> 
> Then I tried to import zope.deprecation, but ng
> 
> >>> from zope.deprecation import deprecated
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ImportError: No module named 'zope.deprecation'
> 
> From here it didn't make sense. I went into site-packages and 
> zope.deprecation was there, BUT zope.interfaces was missing, but it was still 
> working? Pip happily reported that zope.interface was still there
> 
> Then as I was uninstalling/installing with various options I noticed the 
> paths. zope.deprecation was in lib and zope.interface was in lib64
> 
> (deprecation)[ec2-user@ip-172-31-13-110 site-packages]$ pwd
> /home/ec2-user/deprecation/lib/python3.4/site-packages
> (deprecation)[ec2-user@ip-172-31-13-110 site-packages]$ ls -l
> total 412
> drwxrwxr-x  2 ec2-user ec2-user   4096 Mar 16 02:34 appdirs-1.4.3.dist-info
> -rw-rw-r--  1 ec2-user ec2-user  24701 Mar 16 02:34 appdirs.py
> -rw-rw-r--  1 ec2-user ec2-user    126 Mar 16 02:34 easy_install.py
> drwxrwxr-x  3 ec2-user ec2-user   4096 Mar 16 02:13 hupper
> drwxrwxr-x  2 ec2-user ec2-user   4096 Mar 16 02:13 hupper-0.4.4.dist-info
> drwxrwxr-x  3 ec2-user ec2-user   4096 Mar 16 02:34 packaging
> drwxrwxr-x  2 ec2-user ec2-user   4096 Mar 16 02:34 packaging-16.8.dist-info
> drwxrwxr-x  3 ec2-user ec2-user   4096 Mar 16 02:13 paste
> drwxrwxr-x  2 ec2-user ec2-user   4096 Mar 16 02:13 
> PasteDeploy-1.5.2.dist-info
> -rw-rw-r--  1 ec2-user ec2-user    304 Mar 16 02:13 
> PasteDeploy-1.5.2-py2.6-nspkg.pth
> drwxrwxr-x 11 ec2-user ec2-user   4096 Mar 16 02:33 pip
> drwxrwxr-x  2 ec2-user ec2-user   4096 Mar 16 02:33 pip-9.0.1.dist-info
> drwxrwxr-x  3 ec2-user ec2-user   4096 Mar 16 02:34 pkg_resources
> drwxrwxr-x  2 ec2-user ec2-user   4096 Mar 16 02:34 __pycache__
> drwxrwxr-x  2 ec2-user ec2-user   4096 Mar 16 02:34 pyparsing-2.2.0.dist-info
> -rw-rw-r--  1 ec2-user ec2-user 231039 Mar 16 02:34 pyparsing.py
> drwxrwxr-x  7 ec2-user ec2-user   4096 Mar 16 02:13 pyramid
> drwxrwxr-x  2 ec2-user ec2-user   4096 Mar 16 02:13 pyramid-1.8.3.dist-info
> drwxrwxr-x  3 ec2-user ec2-user   4096 Mar 16 02:13 repoze
> drwxrwxr-x  2 ec2-user ec2-user   4096 Mar 16 02:13 
> repoze.lru-0.6-py3.4.egg-info
> -rw-rw-r--  1 ec2-user ec2-user    305 Mar 16 02:13 
> repoze.lru-0.6-py3.4-nspkg.pth
> drwxrwxr-x  4 ec2-user ec2-user   4096 Mar 16 02:34 setuptools
> drwxrwxr-x  2 ec2-user ec2-user   4096 Mar 16 02:34 
> setuptools-34.3.2.dist-info
> drwxrwxr-x  2 ec2-user ec2-user   4096 Mar 16 02:34 six-1.10.0.dist-info
> -rw-rw-r--  1 ec2-user ec2-user  30098 Mar 16 02:34 six.py
> drwxrwxr-x  4 ec2-user ec2-user   4096 Mar 16 02:13 translationstring
> drwxrwxr-x  2 ec2-user ec2-user   4096 Mar 16 02:13 
> translationstring-1.3.dist-info
> drwxrwxr-x  5 ec2-user ec2-user   4096 Mar 16 02:13 venusian
> drwxrwxr-x  2 ec2-user ec2-user   4096 Mar 16 02:13 
> venusian-1.0-py3.4.egg-info
> drwxrwxr-x  3 ec2-user ec2-user   4096 Mar 16 02:13 webob
> drwxrwxr-x  2 ec2-user ec2-user   4096 Mar 16 02:13 WebOb-1.7.1.dist-info
> drwxrwxr-x  3 ec2-user ec2-user   4096 Mar 16 02:42 zope
> drwxrwxr-x  2 ec2-user ec2-user   4096 Mar 16 02:42 
> zope.deprecation-4.2.0.dist-info
> -rw-rw-r--  1 ec2-user ec2-user    349 Mar 16 02:42 
> zope.deprecation-4.2.0-py2.7-nspkg.pth
> (deprecation)[ec2-user@ip-172-31-13-110 site-packages]$ cd zope
> (deprecation)[ec2-user@ip-172-31-13-110 zope]$ ls -l
> total 4
> drwxrwxr-x 3 ec2-user ec2-user 4096 Mar 16 02:42 deprecation
> (deprecation)[ec2-user@ip-172-31-13-110 zope]$ 
> 
> And zope.interface...
> 
> (deprecation)[ec2-user@ip-172-31-13-110 site-packages]$ pwd
> /home/ec2-user/deprecation/lib64/python3.4/site-packages
> (deprecation)[ec2-user@ip-172-31-13-110 site-packages]$ ls -l
> total 12
> drwxrwxr-x 3 ec2-user ec2-user 4096 Mar 16 02:42 zope
> drwxrwxr-x 2 ec2-user ec2-user 4096 Mar 16 02:42 
> zope.interface-4.3.3-py3.4.egg-info
> -rw-rw-r-- 1 ec2-user ec2-user  529 Mar 16 02:42 
> zope.interface-4.3.3-py3.4-nspkg.pth
> (deprecation)[ec2-user@ip-172-31-13-110 site-packages]$ cd zope
> (deprecation)[ec2-user@ip-172-31-13-110 zope]$ ls -l
> total 4
> drwxrwxr-x 5 ec2-user ec2-user 4096 Mar 16 02:42 interface
> (deprecation)[ec2-user@ip-172-31-13-110 zope]$ 
> 
> My thought was that perhaps the interpreter was getting confused because it 
> found zope under lib64 but not deprecate and just gave up.To test this out I 
> tried uninstalling zope.interface, and I was now able to import 
> zope.deprecate!
> 
> SO NOW WHAT??
> 
> Anyway, I am going to sleep. I doubt I'll work on this tomorrow morning, but 
> if anyone can tell me how to trick the pip into installing zope.interface 
> into lib/site-packages instead of lib64/site-packages, I'd appreciate it.
> 
> Thanks,
> --Dan
> 
> 
> On Wed, Mar 15, 2017 at 9:38 PM, Dan Clark <[email protected]> wrote:
> Here's the traceback
> 
> [Thu Mar 16 01:36:38.429962 2017] [:error] [pid 2187] [remote 
> 69.127.251.49:50376] mod_wsgi (pid=2187): Target WSGI script 
> '/opt/python/current/app/application.py' cannot be loaded as Python module.
> [Thu Mar 16 01:36:38.430078 2017] [:error] [pid 2187] [remote 
> 69.127.251.49:50376] mod_wsgi (pid=2187): Exception occurred processing WSGI 
> script '/opt/python/current/app/application.py'.
> [Thu Mar 16 01:36:38.430145 2017] [:error] [pid 2187] [remote 
> 69.127.251.49:50376] Traceback (most recent call last):
> [Thu Mar 16 01:36:38.430237 2017] [:error] [pid 2187] [remote 
> 69.127.251.49:50376]   File "/opt/python/current/app/application.py", line 2, 
> in <module>
> [Thu Mar 16 01:36:38.430255 2017] [:error] [pid 2187] [remote 
> 69.127.251.49:50376]     from pyramid.config import Configurator
> [Thu Mar 16 01:36:38.430314 2017] [:error] [pid 2187] [remote 
> 69.127.251.49:50376]   File 
> "/opt/python/run/venv/lib/python3.4/site-packages/pyramid/config/__init__.py",
>  line 12, in <module>
> [Thu Mar 16 01:36:38.430329 2017] [:error] [pid 2187] [remote 
> 69.127.251.49:50376]     from pyramid.interfaces import (
> [Thu Mar 16 01:36:38.430383 2017] [:error] [pid 2187] [remote 
> 69.127.251.49:50376]   File 
> "/opt/python/run/venv/lib/python3.4/site-packages/pyramid/interfaces.py", 
> line 1, in <module>
> [Thu Mar 16 01:36:38.430399 2017] [:error] [pid 2187] [remote 
> 69.127.251.49:50376]     from zope.deprecation import deprecated
> [Thu Mar 16 01:36:38.430444 2017] [:error] [pid 2187] [remote 
> 69.127.251.49:50376] ImportError: No module named 'zope.deprecation'
> [Thu Mar 16 01:36:38.569219 2017] [:error] [pid 2187] [remote 
> 69.127.251.49:54728] mod_wsgi (pid=2187): Target WSGI script 
> '/opt/python/current/app/application.py' cannot be loaded as Python module.
> [Thu Mar 16 01:36:38.569285 2017] [:error] [pid 2187] [remote 
> 69.127.251.49:54728] mod_wsgi (pid=2187): Exception occurred processing WSGI 
> script '/opt/python/current/app/application.py'.
> [Thu Mar 16 01:36:38.569339 2017] [:error] [pid 2187] [remote 
> 69.127.251.49:54728] Traceback (most recent call last):
> [Thu Mar 16 01:36:38.569418 2017] [:error] [pid 2187] [remote 
> 69.127.251.49:54728]   File "/opt/python/current/app/application.py", line 2, 
> in <module>
> [Thu Mar 16 01:36:38.569435 2017] [:error] [pid 2187] [remote 
> 69.127.251.49:54728]     from pyramid.config import Configurator
> [Thu Mar 16 01:36:38.569493 2017] [:error] [pid 2187] [remote 
> 69.127.251.49:54728]   File 
> "/opt/python/run/venv/lib/python3.4/site-packages/pyramid/config/__init__.py",
>  line 12, in <module>
> [Thu Mar 16 01:36:38.569509 2017] [:error] [pid 2187] [remote 
> 69.127.251.49:54728]     from pyramid.interfaces import (
> [Thu Mar 16 01:36:38.569563 2017] [:error] [pid 2187] [remote 
> 69.127.251.49:54728]   File 
> "/opt/python/run/venv/lib/python3.4/site-packages/pyramid/interfaces.py", 
> line 1, in <module>
> [Thu Mar 16 01:36:38.569595 2017] [:error] [pid 2187] [remote 
> 69.127.251.49:54728]     from zope.deprecation import deprecated
> [Thu Mar 16 01:36:38.569638 2017] [:error] [pid 2187] [remote 
> 69.127.251.49:54728] ImportError: No module named 'zope.deprecation'
> 
> On Wed, Mar 15, 2017 at 3:17 PM, Tres Seaver <[email protected]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 03/15/2017 07:23 AM, Dan Clark wrote:
> > Tres,
> >
> > I just committed the hello pyramid project to
> > https://github.com/adidas/aws_hello_pyramid. It's a simple script
> > (with requirements.txt) that can be tweaked to recreate the issue on
> > AWS. Just need to change the requirements.txt to use 4.2.
> >
> > Anyway, I ran out of time today, but if you give me another morning I
> > can upload the project with 4.2 and get the complete traceback.
> 
> Dan,
> 
> Thanks for working on it, and for documenting your path.  If you figure
> something out about why you are needing to pin zope.deprecation, please
> create an issue for either pyramid[1] or zope.deprecation[2] and mentaion
> me (@tseaver) in the description.
> 
> [1] https://github.com/Pylons/pyramid/issues/
> [2] https://github.com/zopefoundation/zope.deprecation/issues
> 
> 
> Tres.
> - --
> ===================================================================
> Tres Seaver          +1 540-429-0999          [email protected]
> Palladion Software   "Excellence by Design"    http://palladion.com
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> 
> iQIcBAEBAgAGBQJYyZNYAAoJEPKpaDSJE9HYwwsQALUqMf+LmYVHq6m8+A1nBCTT
> M9ZPkb6eXYd+LaBTeCt0ah6/vtpbdsYeiDW/xKHWaJUZKq7v0CUvDd+MBaH9wmyc
> vIKDwMm7NLdPHmke2W+RhseqRzRZlEi8fb12LXHH2wNJSWOiCXQqjSVH3I2ZszNI
> oZI+nshAV/Yieu6zS3TvcjinW7uKZKc6D68UKYwgA8KAW2UK62t3TGdnojpEnNXX
> nJI9ytUCFJLX1qGMM5DLF1uzKXqpjVUSyuw3MJcL6fncAlLNRndML51uLkYj2aiT
> iI4g4HdptW46peqdPJJRh4tjL+6/87ZMgwsvoeRjmwSVEWV2VuYU4KuThxuRR96D
> lmxsJf8HgdoU1ojVgZkLeaufpgHbLqcdqwwKFvQDHPM66UZ7s1oPSAS6nc8RvZLi
> WSMb5g5LRty2QIctCywgiez9CeO6BKeaQdPGDtearXXYnzawyMwxKJDaMCGDdKpa
> 1nYE6Rz/MRz8Pox1uTzUsTN3UooZ+7K6c7tybBH8Jy7TuhI1whraIribkKvdWTWl
> DZ/YDzoAFuLDe1oy1Ekm4hT93AFWACizE2OXDiJD3tGUi67V0IABniM/s27pb0uC
> asQDEAeW21Eln7AD+fn3+/cA8ppsCRXPkfzMALItATjBeyKxXvA848yq32XCweny
> Ntghx0YOXesn4ix5Oa0u
> =soKF
> -----END PGP SIGNATURE-----
> 
> --
> You received this message because you are subscribed to a topic in the Google 
> Groups "pylons-discuss" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/pylons-discuss/MSAMBzwx7aQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pylons-discuss/oac412%24p8k%241%40blaine.gmane.org.
> For more options, visit https://groups.google.com/d/optout.
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pylons-discuss/CAKbG-MjGQe327AQGoPqYXR76f5uDJ7dMmG0Zu2%3D_TztuTJcwAw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/FCC078CD-075A-4729-B69B-E5928B1A22D1%400x58.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to