Pages 1
You must login or register to post a reply
1 21-12-2020 11:55:24
- infinitu1327
- Member
- Offline
Topic: [SVPTube 2] ivi.ru «pycryptodomex not found»
Всем привет.
При попытке запустить видео с ivi.ru в 60 ФПС получаю «pycryptodomex not found. Please install it.» ошибку от SVPCast 2.
Установил через pip пакет, но ошибка не пропала.
Доп инфа:
Python 3.9.1-amd64
pip 20.3.3
pycryptodomex 3.9.9
2 Reply by Chainik 21-12-2020 12:07:21
- Chainik
- SVP developer
- Offline
- Thanks: 1457
Re: [SVPTube 2] ivi.ru «pycryptodomex not found»
svptube на линуксе использует питон 3.8
а на windows вообще portable-версию в SVP 4mpv32
3 Reply by infinitu1327 21-12-2020 12:18:07 (edited by infinitu1327 21-12-2020 12:30:57)
- infinitu1327
- Member
- Offline
Re: [SVPTube 2] ivi.ru «pycryptodomex not found»
Использую windows. Для установки пакета использовал python установленный вручную.
Как тогда правильно, используя встроенные в SVP тулзы, установить пакет и какая версия нужна чтобы его видел SVPCast?
4 Reply by Chainik 21-12-2020 12:55:43
- Chainik
- SVP developer
- Offline
- Thanks: 1457
Re: [SVPTube 2] ivi.ru «pycryptodomex not found»
не уверен что это «правильно», но что-то оно так устанавливает
— cmd.exe от администратора, перейти в SVP 4mpv32
— скачать туда секретный скрипт
— удалить оттуда python38._pth
— установить pip, ну и нужный модуль:
> python get-pip.py
> python -m pip install pycryptodomex
—
> чтобы его видел SVPCast
svpcast — трансляция переконвертированого видео куда-то, svptube — ссылки с онайлн-сервисов
5 Reply by infinitu1327 21-12-2020 13:04:48 (edited by infinitu1327 21-12-2020 13:20:22)
- infinitu1327
- Member
- Offline
Re: [SVPTube 2] ivi.ru «pycryptodomex not found»
Да, сори, торможу, речь про SVPTube и просмотр видео с сайта.
Данное действие нужно проделать только для mpv32 или для mpv64 тоже?
Прогнал в обоих папках, перезагрузился — сообщение от SVPTube то же, что и было
6 Reply by Chainik 21-12-2020 13:34:41
- Chainik
- SVP developer
- Offline
- Thanks: 1457
Re: [SVPTube 2] ivi.ru «pycryptodomex not found»
только mpv32
тогда еще скопировать всю папку mpv32Libsite-packagesCryptodome в mpv32
так вроде работает
7 Reply by infinitu1327 21-12-2020 16:54:55
- infinitu1327
- Member
- Offline
Re: [SVPTube 2] ivi.ru «pycryptodomex not found»
Предыдущая ошибка ушла, но теперь появилась новая:
18:53:39.872 [W]: DownloadError(‘ERROR: Unable to download video 101048: Не смогли определить версию по переданным site=s183 и app_version=None’)
Погуглив немного я нашёл, что youtube_dl не поддерживает видео с ivi.ru по подписке, только бесплатные фильмы и сериалы.
Спасибо за помощь
Posts: 7
Pages 1
You must login or register to post a reply
Quick Fix: Python raises the ImportError: No module named 'pycryptodomex'
when it cannot find the library pycryptodomex
. The most frequent source of this error is that you haven’t installed pycryptodomex
explicitly with pip install pycryptodomex
. Alternatively, you may have different Python versions on your computer, and pycryptodomex
is not installed for the particular version you’re using.
Problem Formulation
You’ve just learned about the awesome capabilities of the pycryptodomex
library and you want to try it out, so you start your code with the following statement:
import pycryptodomex
This is supposed to import the Pandas library into your (virtual) environment. However, it only throws the following ImportError: No module named pycryptodomex
:
>>> import pycryptodomex Traceback (most recent call last): File "<pyshell#6>", line 1, in <module> import pycryptodomex ModuleNotFoundError: No module named 'pycryptodomex'
Solution Idea 1: Install Library pycryptodomex
The most likely reason is that Python doesn’t provide pycryptodomex
in its standard library. You need to install it first!
Before being able to import the Pandas module, you need to install it using Python’s package manager pip
. Make sure pip is installed on your machine.
To fix this error, you can run the following command in your Windows shell:
$ pip install pycryptodomex
This simple command installs pycryptodomex
in your virtual environment on Windows, Linux, and MacOS. It assumes that your pip
version is updated. If it isn’t, use the following two commands in your terminal, command line, or shell (there’s no harm in doing it anyways):
$ python -m pip install --upgrade pip $ pip install pandas
💡 Note: Don’t copy and paste the $
symbol. This is just to illustrate that you run it in your shell/terminal/command line.
Solution Idea 2: Fix the Path
The error might persist even after you have installed the pycryptodomex
library. This likely happens because pip
is installed but doesn’t reside in the path you can use. Although pip
may be installed on your system the script is unable to locate it. Therefore, it is unable to install the library using pip
in the correct path.
To fix the problem with the path in Windows follow the steps given next.
Step 1: Open the folder where you installed Python by opening the command prompt and typing where python
Step 2: Once you have opened the Python
folder, browse and open the Scripts
folder and copy its location. Also verify that the folder contains the pip
file.
Step 3: Now open the Scripts
directory in the command prompt using the cd
command and the location that you copied previously.
Step 4: Now install the library using pip install pycryptodomex
command. Here’s an analogous example:
After having followed the above steps, execute our script once again. And you should get the desired output.
Other Solution Ideas
- The
ModuleNotFoundError
may appear due to relative imports. You can learn everything about relative imports and how to create your own module in this article. - You may have mixed up Python and pip versions on your machine. In this case, to install
pycryptodomex
for Python 3, you may want to trypython3 -m pip install pycryptodomex
or evenpip3 install pycryptodomex
instead ofpip install pycryptodomex
- If you face this issue server-side, you may want to try the command
pip install --user pycryptodomex
- If you’re using Ubuntu, you may want to try this command:
sudo apt install pycryptodomex
- You can check out our in-depth guide on installing
pycryptodomex
here. - You can also check out this article to learn more about possible problems that may lead to an error when importing a library.
Understanding the “import” Statement
import pycryptodomex
In Python, the import
statement serves two main purposes:
- Search the module by its name, load it, and initialize it.
- Define a name in the local namespace within the scope of the
import
statement. This local name is then used to reference the accessed module throughout the code.
What’s the Difference Between ImportError and ModuleNotFoundError?
What’s the difference between ImportError
and ModuleNotFoundError
?
Python defines an error hierarchy, so some error classes inherit from other error classes. In our case, the ModuleNotFoundError
is a subclass of the ImportError
class.
You can see this in this screenshot from the docs:
You can also check this relationship using the issubclass()
built-in function:
>>> issubclass(ModuleNotFoundError, ImportError) True
Specifically, Python raises the ModuleNotFoundError
if the module (e.g., pycryptodomex
) cannot be found. If it can be found, there may be a problem loading the module or some specific files within the module. In those cases, Python would raise an ImportError
.
If an import statement cannot import a module, it raises an ImportError
. This may occur because of a faulty installation or an invalid path. In Python 3.6 or newer, this will usually raise a ModuleNotFoundError
.
Related Videos
The following video shows you how to resolve the ImportError
:
How to Fix : “ImportError: Cannot import name X” in Python?
The following video shows you how to import a function from another folder—doing it the wrong way often results in the ModuleNotFoundError
:
How to Call a Function from Another File in Python?
How to Fix “ModuleNotFoundError: No module named ‘pycryptodomex’” in PyCharm
If you create a new Python project in PyCharm and try to import the pycryptodomex
library, it’ll raise the following error message:
Traceback (most recent call last): File "C:/Users/.../main.py", line 1, in <module> import pycryptodomex ModuleNotFoundError: No module named 'pycryptodomex' Process finished with exit code 1
The reason is that each PyCharm project, per default, creates a virtual environment in which you can install custom Python modules. But the virtual environment is initially empty—even if you’ve already installed pycryptodomex
on your computer!
Here’s a screenshot exemplifying this for the pandas
library. It’ll look similar for pycryptodomex
.
The fix is simple: Use the PyCharm installation tooltips to install Pandas in your virtual environment—two clicks and you’re good to go!
First, right-click on the pandas
text in your editor:
Second, click “Show Context Actions
” in your context menu. In the new menu that arises, click “Install Pandas” and wait for PyCharm to finish the installation.
The code will run after your installation completes successfully.
As an alternative, you can also open the Terminal
tool at the bottom and type:
$ pip install pycryptodomex
If this doesn’t work, you may want to set the Python interpreter to another version using the following tutorial: https://www.jetbrains.com/help/pycharm/2016.1/configuring-python-interpreter-for-a-project.html
You can also manually install a new library such as pycryptodomex
in PyCharm using the following procedure:
- Open
File > Settings > Project
from the PyCharm menu. - Select your current project.
- Click the
Python Interpreter
tab within your project tab. - Click the small
+
symbol to add a new library to the project. - Now type in the library to be installed, in your example Pandas, and click
Install Package
. - Wait for the installation to terminate and close all popup windows.
Here’s an analogous example:
Here’s a full guide on how to install a library on PyCharm.
- How to Install a Library on PyCharm
While working as a researcher in distributed systems, Dr. Christian Mayer found his love for teaching computer science students.
To help students reach higher levels of Python success, he founded the programming education website Finxter.com. He’s author of the popular programming book Python One-Liners (NoStarch 2020), coauthor of the Coffee Break Python series of self-published books, computer science enthusiast, freelancer, and owner of one of the top 10 largest Python blogs worldwide.
His passions are writing, reading, and coding. But his greatest passion is to serve aspiring coders through Finxter and help them to boost their skills. You can join his free email academy here.
- Index
- » Pacman & Package Upgrade Issues
- » pycryptodome vs pycryptodomex, files ‘exist in filesystem’
Pages: 1
#1 2019-10-06 09:44:46
- thenextdon13
- Member
- Registered: 2013-01-18
- Posts: 58
pycryptodome vs pycryptodomex, files ‘exist in filesystem’
Trying to run system upgrades, I end up with a bunch of file conflicts / file exists in filesystem.
...
error: failed to commit transaction (conflicting files)
python2-pycryptodomex: /usr/lib/python2.7/site-packages/Cryptodome exists in filesystem
python2-pycryptodomex: /usr/lib/python2.7/site-packages/Cryptodome/Cipher/AES.py exists in filesystem
... (many, many additional files))
Its strange because the error seems to be coming from the installation of pycryptodomex (as seen above), but that package doesn’t appear to be installed, or provide anything.. so i’m not clear why its being pulled in
[kodiuser@kodiarch ~]$ sudo pacman -Qi python2-pycryptodomex
error: package 'python2-pycryptodomex' was not found
[kodiuser@kodiarch ~]$
[kodiuser@kodiarch ~]$ sudo pacman -Si python2-pycryptodomex
Repository : community
Name : python2-pycryptodomex
Version : 3.9.0-1
Description : A self-contained Python package of low-level cryptographic primitives
Architecture : x86_64
URL : https://www.pycryptodome.org/
Licenses : BSD
Groups : None
Provides : None
Depends On : python2
Optional Deps : None
Conflicts With : None
Replaces : None
Download Size : 6.91 MiB
Installed Size : 26.02 MiB
Packager : BlackEagle <ike DOT devolder AT gmail DOT com>
Build Date : Sat 07 Sep 2019 09:23:17 AM PDT
Validated By : MD5 Sum SHA-256 Sum Signature
Meanwhile, all of the files i’ve checked are owned instead by pycryptodome instead
[kodiuser@kodiarch ~]$ sudo pacman -Qo /usr/lib/python2.7/site-packages/Cryptodome/Cipher/AES.py
/usr/lib/python2.7/site-packages/Crypto/Cipher/AES.py is owned by python2-pycryptodome 3.9.0-1
[kodiuser@kodiarch ~]$
[kodiuser@kodiarch ~]$ sudo pacman -Qi python2-pycryptodome
Name : python2-pycryptodome
Version : 3.9.0-1
Description : Collection of cryptographic algorithms and protocols, implemented for use from Python 2.
Architecture : x86_64
URL : https://www.pycryptodome.org/
Licenses : BSD
Groups : None
Provides : python2-crypto
Depends On : python2 gmp
Optional Deps : None
Required By : kodi
Optional For : None
Conflicts With : python2-crypto
Replaces : python2-crypto
Installed Size : 25.80 MiB
Packager : Felix Yan <felixonmars@archlinux.org>
Build Date : Thu 29 Aug 2019 08:56:53 PM PDT
Install Date : Thu 03 Oct 2019 09:29:20 AM PDT
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : Signature
And pycryptodome indicates it is up to date…
[kodiuser@kodiarch ~]$ sudo pacman -Sy python2-pycryptodome
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
warning: python2-pycryptodome-3.9.0-1 is up to date -- reinstalling
Full output here
https://pastebin.com/jQt1ec8T
#2 2019-10-06 11:36:46
- Lone_Wolf
- Member
- From: Netherlands, Europe
- Registered: 2005-10-04
- Posts: 10,652
Re: pycryptodome vs pycryptodomex, files ‘exist in filesystem’
Its strange because the error seems to be coming from the installation of pycryptodomex (as seen above), but that package doesn’t appear to be installed, or provide anything.. so i’m not clear why its being pulled in
Looks like kodi recently switched from pycryptodome to pycryptodomex,
https://git.archlinux.org/svntogit/comm … 58face2a65
I do think you should create a bug report against python2-pycryptodomex .
python2-pycryptodomex should atleast conflict python2-pycryptodome .
A feature request to publish a newspost or pre-upgrade message manual action is needed for this kodi upgrade also seems a good idea.
The simplest way to solve the issue is probably to remove every package related to kodi including python2-pycryptodome , then run pacman -Syu .
Once everything is uptodate again, run pacman -Syu kodi .
Some hints :
pacman -i / —info , -s / —search and -Q / —query never require sudo .
pacman -Sy foo is almost always a bad idea. Use pacman -S foo or pacman -Syu foo .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
#3 2019-10-06 11:49:54
- arojas
- Developer
- From: Spain
- Registered: 2011-10-09
- Posts: 1,975
Re: pycryptodome vs pycryptodomex, files ‘exist in filesystem’
$ sudo pacman -Qo /usr/lib/python2.7/site-packages/Cryptodome/Cipher/AES.py
/usr/lib/python2.7/site-packages/Crypto/Cipher/AES.py is owned by python2-pycryptodome 3.9.0-1
This looks quite fishy. Have you symlinked /usr/lib/python2.7/site-packages/Cryptodome to /usr/lib/python2.7/site-packages/Crypto? The official python2-pycryptodome package doesn’t install anything to /usr/lib/python2.7/site-packages/Cryptodome
#4 2019-10-06 11:58:31
- thenextdon13
- Member
- Registered: 2013-01-18
- Posts: 58
Re: pycryptodome vs pycryptodomex, files ‘exist in filesystem’
@arojas-
It appears I have; I’m not sure when, why, or how…
kodiuser@kodiarch ~]$ ls -l /usr/lib/python2.7/site-packages/Cryptodome
lrwxrwxrwx 1 root root 39 Jul 24 22:29 /usr/lib/python2.7/site-packages/Cryptodome -> /usr/lib/python2.7/site-packages/Crypto
@Lone_Wolf
Thanks for the info; Perhaps i’ll get there tomorrow night. Ahh yes, i remember now using -Sy causes issues in grabbing he newest version of packages that won’t align with outer things installed, or something like that.
EDIT
I bet it was based on the comments as part of this plugin
https://github.com/asciidisco/plugin.vi … -292145025
I think we can close this thread;
Last edited by thenextdon13 (2019-10-07 11:23:11)