summaryrefslogtreecommitdiff
path: root/pipermail/pycrypto/2016/000888.html
blob: 077cf0d892858f7c2d996fcac21c813ccec80a17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
 <HEAD>
   <TITLE> [pycrypto] pycryptodome
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:pycrypto%40lists.dlitz.net?Subject=Re%3A%20%5Bpycrypto%5D%20pycryptodome&In-Reply-To=%3CCAEncD4dYM0jQEmGxH5ifz30jWQMg5-P3v74ZYLZoQ6x5RsXjpg%40mail.gmail.com%3E">
   <META NAME="robots" CONTENT="index,nofollow">
   <style type="text/css">
       pre {
           white-space: pre-wrap;       /* css-2.1, curent FF, Opera, Safari */
           }
   </style>
   <META http-equiv="Content-Type" content="text/html; charset=utf-8">
   <LINK REL="Previous"  HREF="000887.html">
   <LINK REL="Next"  HREF="000889.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[pycrypto] pycryptodome</H1>
    <B>Dave Pawson</B> 
    <A HREF="mailto:pycrypto%40lists.dlitz.net?Subject=Re%3A%20%5Bpycrypto%5D%20pycryptodome&In-Reply-To=%3CCAEncD4dYM0jQEmGxH5ifz30jWQMg5-P3v74ZYLZoQ6x5RsXjpg%40mail.gmail.com%3E"
       TITLE="[pycrypto] pycryptodome">dave.pawson at gmail.com
       </A><BR>
    <I>Fri Dec  9 10:34:27 UTC 2016</I>
    <P><UL>
        <LI>Previous message: <A HREF="000887.html">[pycrypto] pycryptodome
</A></li>
        <LI>Next message: <A HREF="000889.html">[pycrypto] pycryptodome
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#888">[ date ]</a>
              <a href="thread.html#888">[ thread ]</a>
              <a href="subject.html#888">[ subject ]</a>
              <a href="author.html#888">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>This is getting messy!
Comments inline

On 8 December 2016 at 20:29, Martin Falatic &lt;<A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">martin at falatic.com</A>&gt; wrote:
&gt;<i> This is beyond the scope of pycrypto for the moment - you have system
</I>&gt;<i> problems because you've upgraded pip yourself.
</I>&gt;<i>
</I>&gt;<i> This looks familiar because I did the same exact thing myself in the
</I>&gt;<i> process of testing this (and it didn't go smoothly - same problem you're
</I>&gt;<i> having - so I rolled that back to get pip2 and pip3 working properly).
</I>&gt;<i> Let's get you back on track.
</I>&gt;<i>
</I>&gt;<i> # At this point let's get back to the system default pips and go from
</I>&gt;<i> there. IF you upgraded the system pip to 9.0.1 as it appears, here's how
</I>&gt;<i> to fix them:
</I>&gt;<i>
</I>&gt;<i> sudo dnf reinstall python-pip python3-pip
</I>
OK


&gt;<i>
</I>&gt;<i> # Now, with that done, run these:
</I>&gt;<i> sudo pip3.5 uninstall pycrypto
</I>
produces
# pip3.5 uninstall pycrypto
DEPRECATION: Uninstalling a distutils installed project (pycrypto) has
been deprecated and will be removed in a future version. This is due
to the fact that uninstalling a distutils project will only partially
uninstall the project.
Uninstalling pycrypto-2.6.1:
  /usr/lib64/python3.5/site-packages/pycrypto-2.6.1-py3.5.egg-info
Proceed (y/n)?

&quot;distutils installed project&quot; - will only partially uninstall the project?
Unclear just what that means.
Accept y and get a pip warning!

Proceed (y/n)? y
  Successfully uninstalled pycrypto-2.6.1
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.


Ignored the message


&gt;<i> sudo pip2.7 uninstall pycrypto
</I>
Ah! A difference.
#pip2.7 uninstall pycrypto
Cannot uninstall requirement pycrypto, not installed
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

It would seem that pycrypto (installed using python setup.py install) is
&quot;associated&quot; with python 2.7 (guess)

Either way it is uninstalled.

<A HREF="https://ofswiki.org/wiki/Uninstalling_setup.py_install">https://ofswiki.org/wiki/Uninstalling_setup.py_install</A>

&gt;<i>
</I>&gt;<i> # Once that's done, list them as per my earlier email:
</I>&gt;<i> pip3.5 list | grep pycrypt
</I>&gt;<i> pip2.7 list | grep pycrypt
</I>
Nothing from pip3.5

however

# pip2.7 list | grep pycrypt
pycryptodomex (3.4.3)

so that is there.



&gt;<i>
</I>&gt;<i> Shouldn't see `pycrypto` there now. If you do... you installed it some
</I>&gt;<i> other way (perhaps as a dnf package?) Uninstall it via the same mechanism
</I>&gt;<i> you installed it and try again.
</I>
Which I did yesterday, using the suggestion from a link
<A HREF="https://ofswiki.org/wiki/Uninstalling_setup.py_install">https://ofswiki.org/wiki/Uninstalling_setup.py_install</A>

&gt;<i>
</I>&gt;<i> Now go through the steps in my previous email to install pycryptodome and
</I>&gt;<i> pycryptodomex for the purpose of this test, and report the results.
</I>
Both? IFAICT the suggestion is one or the other, both not needed?


Aside, I am not 'out of date' with pip
# pip3.5 -V
pip 8.1.2 from /usr/lib/python3.5/site-packages (python 3.5)

# pip2.7 -V
pip 8.1.2 from /usr/lib/python2.7/site-packages (python 2.7)



OK, to repeat the tests from the pycryptodome pages.

# python3 -m Cryptodome.SelfTest
/usr/bin/python3: Error while finding spec for 'Cryptodome.SelfTest'
(ImportError: No module named 'Cryptodome')

Yet...

# python -m Cryptodome.SelfTest
and off it goes!
Ran 22656 tests in 48.420s


Implication that Cryptodome is in the 2.7 library?

More testing.

import Crypto.Cipher.AES

    mods=sys.modules
    if &quot;Crypto&quot; in mods:
        print(&quot;Found Crypto&quot;)
        print(mods[&quot;Crypto&quot;])
        print(dir(Crypto))
        print(dir(Crypto.Cipher))
        print(&quot;\nCrypto.Cipher.AES: &quot;,dir(Crypto.Cipher.AES))

shows

&lt;module 'Crypto' from '/usr/lib64/python3.5/site-packages/Crypto/__init__.py'&gt;
['Cipher', 'Util', '__all__', '__builtins__', '__cached__', '__doc__',
'__file__', '__loader__', '__name__', '__package__', '__path__',
'__revision__', '__spec__', '__version__', 'version_info']
['AES', '_AES', '__all__', '__builtins__', '__cached__', '__doc__',
'__file__', '__loader__', '__name__', '__package__', '__path__',
'__revision__', '__spec__', 'blockalgo']

Crypto.Cipher.AES:  ['AESCipher', 'MODE_CBC', 'MODE_CFB', 'MODE_CTR',
'MODE_ECB', 'MODE_OFB', 'MODE_OPENPGP', 'MODE_PGP', '_AES',
'__builtins__', '__cached__', '__doc__', '__file__', '__loader__',
'__name__', '__package__', '__revision__', '__spec__', 'block_size',
'blockalgo', 'key_size', 'new']


So how to tell whether I have crypto (??) or pycryptodome[x] ?

Signed, confused.com &lt;grin/&gt;




-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
<A HREF="http://www.dpawson.co.uk">http://www.dpawson.co.uk</A>
</PRE>


<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="000887.html">[pycrypto] pycryptodome
</A></li>
	<LI>Next message: <A HREF="000889.html">[pycrypto] pycryptodome
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#888">[ date ]</a>
              <a href="thread.html#888">[ thread ]</a>
              <a href="subject.html#888">[ subject ]</a>
              <a href="author.html#888">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">More information about the pycrypto
mailing list</a><br>
</body></html>