Comments (5)
I can not confirm this, on my Windows-machine following the installation steps correctly install pycryptodome under the "Cryptodome" namespace (using Python 3.5) as wheel (installation log).
After you installation failed you installed the "Crypto" namespace package (PyPi name: pycryptodome), but for the "Cryptodome" namespace packages the name is pycryptodomex. Here is the PyPi page for the Cryptodome namespace packages.
The documentation say this in the first paragraph:
The installation procedure depends on the package you want the library in. PyCryptodome can be used as:
a drop-in replacement for the old PyCrypto library. You install it with:
pip install pycryptodome
In this case, all modules are installed under the Crypto package. You can test everything is right with:
python -m Crypto.SelfTest
One must avoid having both PyCrypto and PyCryptodome installed at the same time, as they will interfere with each other.
This option is therefore recommended only when you are sure that the whole application is deployed in a virtualenv.
a library independent of the old PyCrypto. You install it with:
pip install pycryptodomex
You can test everything is right with:
python -m Cryptodome.SelfTest
In this case, all modules are installed under the Cryptodome package. PyCrypto and PyCryptodome can coexist.
from pycryptodome.
After a bit more investigation, it seems that it does not work with Python 3.4 (or rather, the pip version that comes with it), but it works if I update pip to the latest version.
Here are the relevant parts of the install log when trying to install it on a Python 3.4 installation on Windows (8.1), and as you can see, it does not download the wheel file, but rather the source package and tries to build it, just like I described in my original post:
c:\Python34\Scripts>pip install pycryptodomex
You are using pip version 6.0.8, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting pycryptodomex
Downloading pycryptodomex-3.4.2.tar.gz (6.5MB)
100% |################################| 6.5MB 56kB/s
Installing collected packages: pycryptodomex
Running setup.py install for pycryptodomex
Complete output from command C:\Python34\python.exe -c "import setuptools, t
okenize;file='C:\Users\Root\AppData\Local\Temp\pip-build-7ps_u0jl\pyc
ryptodomex\setup.py';exec(compile(getattr(tokenize, 'open', open)(file).rea
d().replace('\r\n', '\n'), file, 'exec'))" install --record C:\Users\Root\Ap
pData\Local\Temp\pip-lh3k5gte-record\install-record.txt --single-version-externa
lly-managed --compile:
running installrunning build
running build_py
creating build
creating build\lib.win32-3.4
creating build\lib.win32-3.4\Crypto
copying lib\Crypto__init__.py -> build\lib.win32-3.4\Crypto
creating build\lib.win32-3.4\Crypto\Cipher
...
running build_ext
Command "C:\Python34\python.exe -c "import setuptools, tokenize;file='C:
\Users\Root\AppData\Local\Temp\pip-build-7ps_u0jl\pycryptodomex\setup.py
';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n',
'\n'), file, 'exec'))" install --record C:\Users\Root\AppData\Local\Temp\pip
-lh3k5gte-record\install-record.txt --single-version-externally-managed --compil
e" failed with error code 1 in C:\Users\Root\AppData\Local\Temp\pip-build-7ps_u0
jl\pycryptodomex
Is this expected?
from pycryptodome.
It tested this now out on Python 3.4 on Windows XP machine and got the same error but after upgrading pip (pip install -U pip setuptools wheel
) to 8.1.2 (my new installation had 7.1.2, you have 6.0.8) installing Pycryptodome from Pypi as wheel worked.
from pycryptodome.
I had some trouble with PyCryptoDome / Cryptodome / pycryptodomex (too many names .. very confusing when you discover it because it's a dependency) too, I used the following command to install it :
py -m pip install --use-wheel pycryptodomex
and it went ok (py -m pip
can be replaced by pip
if it's in the PATH ; thanks https://stackoverflow.com/questions/27885397/how-do-i-install-a-python-package-with-a-whl-file).
Before that I tried the pip install pycryptodomex
but I had the same result as when the package requiring it tried to install it : it couldn't finish the installation, ending without any error/notice, just not showing up in pip list
.
Last line before the thing is dying is :
Copying file build\lib.win-amd64-3.5\Crypto\Util\__init__.py to build\lib.win-amd64-3.5\Cryptodome\Util\__init__.py
Not very informative :(
from pycryptodome.
@CodyMcCodeface this is an issue with pip not pycryptodome
. Therefore, I recommend this issue for closure. @Legrandin
from pycryptodome.
Related Issues (20)
- Cryptodome in AWS lambda - Not found '_raw_ecb.cpython-311-x86_64-linux-gnu.so' HOT 5
- object of type 'DerOctetString' has no len() HOT 1
- Tests cannot be run on non-x86 architectures HOT 8
- "Incorrect decryption." using PyCryptodome's RSA functionality. HOT 1
- 3.19.0: pytest is failing HOT 3
- Plans for KangarooTwelve? HOT 4
- AES CFB mode and AES OFB mode have different first block given same key and IV.
- Build failure with GCC 14 and LTO if -maes is not explicitly enabled HOT 10
- Enhancement Request: Add `usedforsecurity` Argument to Hash Functions to Indicate Security Context Usage HOT 3
- Make PKCS8.wrap() parameters available when exporting keypair to PEM (feature request) HOT 1
- "AES" is unknown import symbolPylancereportGeneralTypeIssues (import) AES: Unknown HOT 4
- pycryptodome 3.20.0 fails on Debian armel HOT 1
- pycryptodome 3.20.0 fails on Debian mips64el HOT 1
- Question: What are the fix patches for CVE-2023-52323? HOT 4
- Evalue e'th modular root
- AES-GCM: why BLAKE2s? HOT 1
- Win10 FFIError: multiple declarations of function Salsa20_8_core (for interactive usage, try cdef(xx, override=True))
- Windows Deferder Error HOT 2
- errors in documentation
- Problem Kodi 20.5 + pycryotodome
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pycryptodome.