У меня есть виртуальная среда Python, настроенная на встроенном компьютере с ядром Linaro. Когда я использую pip для установки пакета в виртуальной среде, я получаю ошибку ModuleNotFoundError: нет модуля с именем «x» (где x — любой модуль, который я пытаюсь установить). Если я установлю пакет не в виртуальной среде, все пойдет так, как ожидалось.
Сначала мне пришлось установить pip с помощью python3 -m securepip --default-pip, который установил версия 22.2.2. Когда я обновился до 24.3.1 с помощью pip install --upgrade pip, он говорит, что он успешно установлен, но я получил ошибку
WARNING: The scripts pip, pip3 and pip3.10 are installed in '/var/user-packages/data/user_storage/ot2-dil-ali/bin' which is not on PATH.
Я добавил этот каталог в $PATH, но все равно не получил модуля с именем pip, когда пытался использовать pip для установки пакета. Чтобы обойти эту проблему, я повторно запустил первую команду, которую использовал для установки pip версии 22.2.2. Я также не могу найти .profile или .bashrc в своем домашнем каталоге или каталоге /etc.
Вот результаты, для которых используется пип python3:
(myvenv) # which python3 pip
/data/user_storage/ot2-dil-ali/bin/python3
/data/user_storage/ot2-dil-ali/bin/pip
# which python3 pip
/usr/bin/python3
/usr/bin/pip
Когда я устанавливаю пакет в виртуальной среде, я вижу, что он установлен:
(myvenv) # python3 -m pip install loguru
Collecting loguru
Using cached loguru-0.7.3-py3-none-any.whl (61 kB)
Installing collected packages: loguru
Successfully installed loguru-0.7.3
но я получаю ModuleNotFoundError при попытке импортировать, а файлы пакета отсутствуют в каталоге site-packages:
(myvenv) # ls myvenv/lib/python3.10/site-packages/
_distutils_hack pip-22.2.2.dist-info setuptools-63.2.0.dist-info
distutils-precedence.pth pkg_resources
pip setuptools
Что мне здесь не хватает? Это проблема $PATH? Спасибо за любую помощь.
Изменить 1:
При принудительном использовании pip в нужном каталоге у меня возникает та же проблема:
(myvenv) # myvenv/bin/pip install loguru
Collecting loguru
Using cached loguru-0.7.3-py3-none-any.whl (61 kB)
Installing collected packages: loguru
Successfully installed loguru-0.7.3
[notice] A new release of pip available: 22.2.2 -> 24.3.1
[notice] To update, run: pip install --upgrade pip
(myvenv) # myvenv/bin/python3
...
>>> import loguru
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'loguru'
>>>
Редактирование 2:
Добавление информации для устранения неполадок:
(myvenv) # myvenv/bin/pip3 install loguru -v -v -v
Using pip 22.2.2 from /data/user_storage/myvenv/lib/python3.10/site-packages/pip (python 3.10)
Non-user install because user site-packages disabled
Created temporary directory: /tmp/pip-ephem-wheel-cache-mw5uucuc
Created temporary directory: /tmp/pip-build-tracker-ya1d5lt3
Initialized build tracking at /tmp/pip-build-tracker-ya1d5lt3
Created build tracker: /tmp/pip-build-tracker-ya1d5lt3
Entered build tracker: /tmp/pip-build-tracker-ya1d5lt3
Created temporary directory: /tmp/pip-install-r6fhmj4u
1 location(s) to search for versions of loguru:
* https://pypi.org/simple/loguru/
Fetching project page and analyzing links: https://pypi.org/simple/loguru/
Getting page https://pypi.org/simple/loguru/
Found index url https://pypi.org/simple
Looking up "https://pypi.org/simple/loguru/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/loguru/ HTTP/1.1" 304 0
Fetched page https://pypi.org/simple/loguru/ as application/vnd.pypi.simple.v1+json
Found link https://files.pythonhosted.org/packages ... ne-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.6), version: 0.1.0
Found link https://files.pythonhosted.org/packages ... 1.0.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.6), version: 0.1.0
Found link https://files.pythonhosted.org/packages ... ne-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.6), version: 0.2.0
Found link https://files.pythonhosted.org/packages ... 2.0.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.6), version: 0.2.0
Found link https://files.pythonhosted.org/packages ... ne-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.6), version: 0.2.1
Found link https://files.pythonhosted.org/packages ... 2.1.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.6), version: 0.2.1
Found link https://files.pythonhosted.org/packages ... ne-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.6), version: 0.2.2
Found link https://files.pythonhosted.org/packages ... 2.2.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.6), version: 0.2.2
Found link https://files.pythonhosted.org/packages ... ne-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.2.3
Found link https://files.pythonhosted.org/packages ... 2.3.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.2.3
Found link https://files.pythonhosted.org/packages ... ne-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.2.4
Found link https://files.pythonhosted.org/packages ... 2.4.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.2.4
Found link https://files.pythonhosted.org/packages ... ne-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.2.5
Found link https://files.pythonhosted.org/packages ... 2.5.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.2.5
Found link https://files.pythonhosted.org/packages ... ne-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.3.0
Found link https://files.pythonhosted.org/packages ... 3.0.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.3.0
Found link https://files.pythonhosted.org/packages ... ne-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.3.1
Found link https://files.pythonhosted.org/packages ... 3.1.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.3.1
Found link https://files.pythonhosted.org/packages ... ne-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.3.2
Found link https://files.pythonhosted.org/packages ... 3.2.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.3.2
Found link https://files.pythonhosted.org/packages ... ne-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.4.0
Found link https://files.pythonhosted.org/packages ... 4.0.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.4.0
Found link https://files.pythonhosted.org/packages ... ne-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.4.1
Found link https://files.pythonhosted.org/packages ... 4.1.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.4.1
Found link https://files.pythonhosted.org/packages ... ne-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.5.0
Found link https://files.pythonhosted.org/packages ... 5.0.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.5.0
Found link https://files.pythonhosted.org/packages ... ne-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.5.1
Found link https://files.pythonhosted.org/packages ... 5.1.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.5.1
Found link https://files.pythonhosted.org/packages ... ne-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.5.2
Found link https://files.pythonhosted.org/packages ... 5.2.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.5.2
Found link https://files.pythonhosted.org/packages ... ne-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.5.3
Found link https://files.pythonhosted.org/packages ... 5.3.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.5.3
Found link https://files.pythonhosted.org/packages ... ne-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.6.0
Found link https://files.pythonhosted.org/packages ... 6.0.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.6.0
Found link https://files.pythonhosted.org/packages ... ne-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.7.0
Found link https://files.pythonhosted.org/packages ... 7.0.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.7.0
Found link https://files.pythonhosted.org/packages ... ne-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.7.1
Found link https://files.pythonhosted.org/packages ... 7.1.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.7.1
Found link https://files.pythonhosted.org/packages ... ne-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.7.2
Found link https://files.pythonhosted.org/packages ... 7.2.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.7.2
Found link https://files.pythonhosted.org/packages ... ne-any.whl (from https://pypi.org/simple/loguru/) (requires-python:=3.5), version: 0.7.3
Found link https://files.pythonhosted.org/packages ... 7.3.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:=3.5), version: 0.7.3
Skipping link: not a file: https://pypi.org/simple/loguru/
Given no hashes to check 42 links for project 'loguru': discarding no candidates
Collecting loguru
Created temporary directory: /tmp/pip-unpack-swembss3
Looking up "https://files.pythonhosted.org/packages ... ne-any.whl" in the cache
Current age based on date: 217509
Ignoring unknown cache-control directive: immutable
Freshness lifetime from max-age: 365000000
The response is "fresh", returning cached response
365000000 > 217509
Using cached loguru-0.7.3-py3-none-any.whl (61 kB)
Added loguru from https://files.pythonhosted.org/packages ... ne-any.whl to build tracker '/tmp/pip-build-tracker-ya1d5lt3'
Removed loguru from https://files.pythonhosted.org/packages ... ne-any.whl from build tracker '/tmp/pip-build-tracker-ya1d5lt3'
Created temporary directory: /tmp/pip-unpack-u8510m_2
Installing collected packages: loguru
Successfully installed loguru-0.7.3
Remote version of pip: 24.3.1
Local version of pip: 22.2.2
Was pip installed by pip? True
[notice] A new release of pip available: 22.2.2 -> 24.3.1
[notice] To update, run: pip install --upgrade pip
Removed build tracker: '/tmp/pip-build-tracker-ya1d5lt3'
и
(myvenv) # python3 -v
import _frozen_importlib # frozen
import _imp # builtin
import '_thread' #
import '_warnings' #
import '_weakref' #
import '_io' #
import 'marshal' #
import 'posix' #
import '_frozen_importlib_external' #
# installing zipimport hook
import 'time' #
import 'zipimport' #
# installed zipimport hook
# code object from '/usr/lib/python3.10/encodings/__init__.pyc'
# code object from '/usr/lib/python3.10/codecs.pyc'
import '_codecs' #
import 'codecs' #
# code object from '/usr/lib/python3.10/encodings/aliases.pyc'
import 'encodings.aliases' #
import 'encodings' #
# code object from '/usr/lib/python3.10/encodings/utf_8.pyc'
import 'encodings.utf_8' #
import '_signal' #
# code object from '/usr/lib/python3.10/io.pyc'
# code object from '/usr/lib/python3.10/abc.pyc'
import '_abc' #
import 'abc' #
import 'io' #
# code object from '/usr/lib/python3.10/site.pyc'
# code object from '/usr/lib/python3.10/os.pyc'
# code object from '/usr/lib/python3.10/stat.pyc'
import '_stat' #
import 'stat' #
# code object from '/usr/lib/python3.10/_collections_abc.pyc'
import '_collections_abc' #
# code object from '/usr/lib/python3.10/posixpath.pyc'
# code object from '/usr/lib/python3.10/genericpath.pyc'
import 'genericpath' #
import 'posixpath' #
import 'os' #
# code object from '/usr/lib/python3.10/_sitebuiltins.pyc'
import '_sitebuiltins' #
Processing global site-packages
Adding directory: '/data/user_storage/myvenv/lib/python3.10/site-packages'
Processing .pth file: '/data/user_storage/myvenv/lib/python3.10/site-packages/distutils-precedence.pth'
# /data/user_storage/myvenv/lib/python3.10/site-packages/_distutils_hack/__pycache__/__init__.cpython-310.pyc matches /data/user_storage/myvenv/lib/python3.10/site-packages/_distutils_hack/__init__.py
# code object from '/data/user_storage/myvenv/lib/python3.10/site-packages/_distutils_hack/__pycache__/__init__.cpython-310.pyc'
import '_distutils_hack' #
Processing user site-packages
Processing global site-packages
Adding directory: '/data/user_storage/myvenv/lib/python3.10/site-packages'
Processing .pth file: '/data/user_storage/myvenv/lib/python3.10/site-packages/distutils-precedence.pth'
import 'site' #
Python 3.10.8 (main, Dec 4 2024, 15:18:53) [GCC 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7 on linux
Type "help", "copyright", "credits" or "license" f o r m o r e i n f o r m a t i o n . < b r / > # e x t e n s i o n m o d u l e ' r e a d l i n e ' l o a d e d f r o m ' / u s r / l i b / p y t h o n 3 . 1 0 / l i b - d y n l o a d / r e a d l i n e . c p y t h o n - 3 1 0 - a r m - l i n u x - g n u e a b i h f . s o ' < b r / > # e x t e n s i o n m o d u l e ' r e a d l i n e ' e x e c u t e d f r o m ' / u s r / l i b / p y t h o n 3 . 1 0 / l i b - d y n l o a d / r e a d l i n e . c p y t h o n - 3 1 0 - a r m - l i n u x - g n u e a b i h f . s o ' < b r / > i m p o r t ' r e a d l i n e ' # & l t ; _ f r o z e n _ i m p o r t l i b _ e x t e r n a l . E x t e n s i o n F i l e L o a d e r o b j e c t a t 0 x 7 6 8 4 6 b c 8 & g t ; < b r / > i m p o r t ' a t e x i t' #
# code object from '/usr/lib/python3.10/rlcompleter.pyc'
# code object from '/usr/lib/python3.10/inspect.pyc'
# code object from '/usr/lib/python3.10/ast.pyc'
import '_ast' #
# code object from '/usr/lib/python3.10/contextlib.pyc'
# code object from '/usr/lib/python3.10/collections/__init__.pyc'
import 'itertools' #
# code object from '/usr/lib/python3.10/keyword.pyc'
import 'keyword' #
# code object from '/usr/lib/python3.10/operator.pyc'
import '_operator' #
import 'operator' #
# code object from '/usr/lib/python3.10/reprlib.pyc'
import 'reprlib' #
import '_collections' #
import 'collections' #
# code object from '/usr/lib/python3.10/functools.pyc'
# code object from '/usr/lib/python3.10/types.pyc'
import 'types' #
import '_functools' #
import 'functools' #
import 'contextlib' #
# code object from '/usr/lib/python3.10/enum.pyc'
import 'enum' #
import 'ast' #
# code object from '/usr/lib/python3.10/dis.pyc'
# code object from '/usr/lib/python3.10/opcode.pyc'
# extension module '_opcode' loaded from '/usr/lib/python3.10/lib-dynload/_opcode.cpython-310-arm-linux-gnueabihf.so'
# extension module '_opcode' executed from '/usr/lib/python3.10/lib-dynload/_opcode.cpython-310-arm-linux-gnueabihf.so'
import '_opcode' #
import 'opcode' #
import 'dis' #
# code object from '/usr/lib/python3.10/collections/abc.pyc'
import 'collections.abc' #
# code object from '/usr/lib/python3.10/importlib/__init__.pyc'
# code object from '/usr/lib/python3.10/warnings.pyc'
import 'warnings' #
import 'importlib' #
# code object from '/usr/lib/python3.10/importlib/machinery.pyc'
import 'importlib.machinery' #
# code object from '/usr/lib/python3.10/linecache.pyc'
# code object from '/usr/lib/python3.10/tokenize.pyc'
# code object from '/usr/lib/python3.10/re.pyc'
# code object from '/usr/lib/python3.10/sre_compile.pyc'
import '_sre' #
# code object from '/usr/lib/python3.10/sre_parse.pyc'
# code object from '/usr/lib/python3.10/sre_constants.pyc'
import 'sre_constants' #
import 'sre_parse' #
import 'sre_compile' #
import '_locale' #
# code object from '/usr/lib/python3.10/copyreg.pyc'
import 'copyreg' #
import 're' #
# code object from '/usr/lib/python3.10/token.pyc'
import 'token' #
import 'tokenize' #
import 'linecache' #
import 'inspect' #
import 'rlcompleter' #
>>> q u i t ( ) < b r / > # c l e a r b u i l t i n s . _ < b r / > # c l e a r s y s . p a t h < b r / > # c l e a r s y s . a r g v < b r / > # c l e a r s y s . p s 1 < b r / > # c l e a r s y s . p s 2 < b r / > # c l e a r s y s . l a s t _ t y p e < b r / > # c l e a r s y s . l a s t _ v a l u e < b r / > # c l e a r s y s . l a s t _ t r a c e b a c k < b r / > # c l e a r s y s . p a t h _ h o o k s < b r / > # c l e a r s y s . p a t h _ i m p o r t e r _ c a c h e < b r / > # c l e a r s y s . m e t a _ p a t h < b r / > # c l e a r s y s . _ _ i n t e r a c t i v e h o o k _ _ < b r / > # r e s t o r e s y s . s t d i n < b r / > # r e s t o r e s y s . s t d o u t < b r / > # r e s t o r e s y s . s t d e r r < b r / > # c l e a n u p [ 2 ] r e m o v i n g s y s < b r / > # c l e a n u p [ 2 ] r e m o v i n g b u i l t i n s < b r / > # c l e a n u p [ 2 ] r e m o v i n g _ f r o z e n _ i m p o r t l i b < b r / > # c l e a n u p [ 2 ] r e m o v i n g _ i m p < b r / > # c l e a n u p [ 2 ] r e m o v i n g _ t h r e a d < b r / > # c l e a n u p [ 2 ] r e m o v i n g _ w a r n i n g s < b r / > # c l e a n u p [ 2 ] r e m o v i n g _ w e a k r e f < b r / > # c l e a n u p [ 2 ] r e m o v i n g _ i o < b r / > # c l e a n u p [ 2 ] removing marshal
# cleanup[2] removing posix
# cleanup[2] removing _frozen_importlib_external
# cleanup[2] removing time
# cleanup[2] removing zipimport
# destroy zipimport
# cleanup[2] removing _codecs
# cleanup[2] removing codecs
# cleanup[2] removing encodings.aliases
# cleanup[2] removing encodings
# destroy encodings
# cleanup[2] removing encodings.utf_8
# cleanup[2] removing _signal
# cleanup[2] removing _abc
# cleanup[2] removing abc
# cleanup[2] removing io
# cleanup[2] removing __main__
# cleanup[2] removing _stat
# cleanup[2] removing stat
# cleanup[2] removing _collections_abc
# cleanup[2] removing genericpath
# cleanup[2] removing posixpath
# cleanup[2] removing os.path
# cleanup[2] removing os
# cleanup[2] removing _sitebuiltins
# cleanup[2] removing _distutils_hack
# destroy _distutils_hack
# cleanup[2] removing site
# destroy site
# cleanup[2] removing readline
# cleanup[2] removing atexit
# cleanup[2] removing _ast
# destroy _ast
# cleanup[2] removing itertools
# cleanup[2] removing keyword
# destroy keyword
# cleanup[2] removing _operator
# cleanup[2] removing operator
# destroy operator
# cleanup[2] removing reprlib
# destroy reprlib
# cleanup[2] removing _collections
# cleanup[2] removing collections
# cleanup[2] removing types
# cleanup[2] removing _functools
# cleanup[2] removing functools
# cleanup[2] removing contextlib
# destroy contextlib
# cleanup[2] removing enum
# cleanup[2] removing ast
# cleanup[2] removing _opcode
# cleanup[2] removing opcode
# destroy opcode
# cleanup[2] removing dis
# cleanup[2] removing collections.abc
# cleanup[2] removing importlib._bootstrap
# cleanup[2] removing importlib._bootstrap_external
# cleanup[2] removing warnings
# cleanup[2] removing importlib
# cleanup[2] removing importlib.machinery
# cleanup[2] removing _sre
# cleanup[2] removing sre_constants
# destroy sre_constants
# cleanup[2] removing sre_parse
# cleanup[2] removing sre_compile
# cleanup[2] removing _locale
# cleanup[2] removing copyreg
# cleanup[2] removing re
# cleanup[2] removing token
# cleanup[2] removing tokenize
# cleanup[2] removing linecache
# cleanup[2] removing inspect
# cleanup[2] removing rlcompleter
# destroy rlcompleter
# destroy _signal
# destroy _sitebuiltins
# destroy atexit
# destroy inspect
# destroy __main__
# destroy ast
# destroy dis
# destroy importlib
# destroy linecache
# destroy token
# destroy types
# destroy io
# destroy _opcode
# destroy warnings
# destroy importlib.machinery
# destroy tokenize
# destroy collections
# destroy itertools
# destroy re
# destroy enum
# destroy sre_compile
# destroy functools
# destroy copyreg
# destroy sre_parse
# destroy _sre
# destroy _locale
# cleanup[3] wiping importlib._bootstrap_external
# cleanup[3] wiping importlib._bootstrap
# cleanup[3] wiping collections.abc
# cleanup[3] wiping _functools
# cleanup[3] wiping _collections
# cleanup[3] wiping _operator
# cleanup[3] wiping readline
# cleanup[3] wiping os
# destroy posixpath
# cleanup[3] wiping genericpath
# cleanup[3] wiping _collections_abc
# cleanup[3] wiping stat
# cleanup[3] wiping _stat
# destroy _stat
# cleanup[3] wiping abc
# cleanup[3] wiping _abc
# cleanup[3] wiping encodings.utf_8
# cleanup[3] wiping encodings.aliases
# cleanup[3] wiping codecs
# cleanup[3] wiping _codecs
# cleanup[3] wiping time
# cleanup[3] wiping _frozen_importlib_external
# cleanup[3] wiping posix
# cleanup[3] wiping marshal
# cleanup[3] wiping _io
# cleanup[3] wiping _weakref
# cleanup[3] wiping _warnings
# cleanup[3] wiping _thread
# cleanup[3] wiping _imp
# cleanup[3] wiping _frozen_importlib
# cleanup[3] wiping sys
# cleanup[3] wiping builtins
# destroy readline
# destroy posix
# destroy _frozen_importlib_external
# destroy _imp
# destroy io
# destroy marshal
# destroy time
# destroy _warnings
# destroy os
# destroy stat
# destroy genericpath
# destroy _frozen_importlib
# destroy codecs
# destroy encodings.aliases
# destroy encodings.utf_8
# destroy _codecs
# destroy abc
# destroy _abc
# destroy _collections_abc
# destroy sys
# destroy _weakref
# destroy _collections
# destroy collections.abc
# destroy builtins
# destroy _functools
# destroy _operator
# destroy _thread
# clear sys.audit hooks
Подробнее здесь: https://stackoverflow.com/questions/793 ... ul-install
ModuleNotFoundError в виртуальной среде Python после успешной установки ⇐ Python
Программы на Python
1736776669
Anonymous
У меня есть виртуальная среда Python, настроенная на встроенном компьютере с ядром Linaro. Когда я использую pip для установки пакета в виртуальной среде, я получаю ошибку ModuleNotFoundError: нет модуля с именем «x» (где x — любой модуль, который я пытаюсь установить). Если я установлю пакет не в виртуальной среде, все пойдет так, как ожидалось.
Сначала мне пришлось установить pip с помощью python3 -m securepip --default-pip, который установил версия 22.2.2. Когда я обновился до 24.3.1 с помощью pip install --upgrade pip, он говорит, что он успешно установлен, но я получил ошибку
WARNING: The scripts pip, pip3 and pip3.10 are installed in '/var/user-packages/data/user_storage/ot2-dil-ali/bin' which is not on PATH.
Я добавил этот каталог в $PATH, но все равно не получил модуля с именем pip, когда пытался использовать pip для установки пакета. Чтобы обойти эту проблему, я повторно запустил первую команду, которую использовал для установки pip версии 22.2.2. Я также не могу найти .profile или .bashrc в своем домашнем каталоге или каталоге /etc.
Вот результаты, для которых используется пип python3:
(myvenv) # which python3 pip
/data/user_storage/ot2-dil-ali/bin/python3
/data/user_storage/ot2-dil-ali/bin/pip
# which python3 pip
/usr/bin/python3
/usr/bin/pip
Когда я устанавливаю пакет в виртуальной среде, я вижу, что он установлен:
(myvenv) # python3 -m pip install loguru
Collecting loguru
Using cached loguru-0.7.3-py3-none-any.whl (61 kB)
Installing collected packages: loguru
Successfully installed loguru-0.7.3
но я получаю ModuleNotFoundError при попытке импортировать, а файлы пакета отсутствуют в каталоге site-packages:
(myvenv) # ls myvenv/lib/python3.10/site-packages/
_distutils_hack pip-22.2.2.dist-info setuptools-63.2.0.dist-info
distutils-precedence.pth pkg_resources
pip setuptools
Что мне здесь не хватает? Это проблема $PATH? Спасибо за любую помощь.
Изменить 1:
При принудительном использовании pip в нужном каталоге у меня возникает та же проблема:
(myvenv) # myvenv/bin/pip install loguru
Collecting loguru
Using cached loguru-0.7.3-py3-none-any.whl (61 kB)
Installing collected packages: loguru
Successfully installed loguru-0.7.3
[notice] A new release of pip available: 22.2.2 -> 24.3.1
[notice] To update, run: pip install --upgrade pip
(myvenv) # myvenv/bin/python3
...
>>> import loguru
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'loguru'
>>>
Редактирование 2:
Добавление информации для устранения неполадок:
(myvenv) # myvenv/bin/pip3 install loguru -v -v -v
Using pip 22.2.2 from /data/user_storage/myvenv/lib/python3.10/site-packages/pip (python 3.10)
Non-user install because user site-packages disabled
Created temporary directory: /tmp/pip-ephem-wheel-cache-mw5uucuc
Created temporary directory: /tmp/pip-build-tracker-ya1d5lt3
Initialized build tracking at /tmp/pip-build-tracker-ya1d5lt3
Created build tracker: /tmp/pip-build-tracker-ya1d5lt3
Entered build tracker: /tmp/pip-build-tracker-ya1d5lt3
Created temporary directory: /tmp/pip-install-r6fhmj4u
1 location(s) to search for versions of loguru:
* https://pypi.org/simple/loguru/
Fetching project page and analyzing links: https://pypi.org/simple/loguru/
Getting page https://pypi.org/simple/loguru/
Found index url https://pypi.org/simple
Looking up "https://pypi.org/simple/loguru/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/loguru/ HTTP/1.1" 304 0
Fetched page https://pypi.org/simple/loguru/ as application/vnd.pypi.simple.v1+json
Found link https://files.pythonhosted.org/packages/01/85/1e0e7b10552b6c0c736e5d288a5c0e650e340d78b4a55b7e04d081db3f87/loguru-0.1.0-py3-none-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.6), version: 0.1.0
Found link https://files.pythonhosted.org/packages/63/69/3e9ca8cf8da389156838b0599a895cf977b26e1cc43677359e8522b81e19/loguru-0.1.0.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.6), version: 0.1.0
Found link https://files.pythonhosted.org/packages/5e/e2/8814a383f90b07c9b8afc7ecf8fa7ab867104ee19759d30d7d8652305797/loguru-0.2.0-py3-none-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.6), version: 0.2.0
Found link https://files.pythonhosted.org/packages/e0/0d/cc26b167a3a64b047e623d3e1ed674cdf9f8bddd9c1cf9b467a223f75417/loguru-0.2.0.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.6), version: 0.2.0
Found link https://files.pythonhosted.org/packages/26/b5/539056e10c4fc7d7fd1a09cf3f45358c2675a0abcf54bbde9009fa4d4f73/loguru-0.2.1-py3-none-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.6), version: 0.2.1
Found link https://files.pythonhosted.org/packages/aa/de/1da30e97385dc8233d336ac6b0f47ea04b4a8bc87dde3477139909d4c7b0/loguru-0.2.1.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.6), version: 0.2.1
Found link https://files.pythonhosted.org/packages/59/c9/9e5826a7d7be659ddfec35ca890ee818c2a51e8d2c0977fe60d1950633de/loguru-0.2.2-py3-none-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.6), version: 0.2.2
Found link https://files.pythonhosted.org/packages/5c/e3/b739229d5e255d6428fac81d57131ed3f8519e2b9d68421ed9a69ed78eb6/loguru-0.2.2.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.6), version: 0.2.2
Found link https://files.pythonhosted.org/packages/74/5b/8cce2218c5f89765fcbf73a2275231512f12d185897841194d4f4079c381/loguru-0.2.3-py3-none-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.2.3
Found link https://files.pythonhosted.org/packages/96/f6/7dfcd8f6594f1571c2297dbb0b3937daeaa8daeeebbfdceb7d73af176a46/loguru-0.2.3.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.2.3
Found link https://files.pythonhosted.org/packages/55/e0/461d6e5427c90fea5fcc72e364a5e742f8c1c306622685ec61b1e93a798e/loguru-0.2.4-py3-none-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.2.4
Found link https://files.pythonhosted.org/packages/bf/c8/6aebe119baccac526baa0db465e31cac8095ef9363935b5035c9dde01eab/loguru-0.2.4.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.2.4
Found link https://files.pythonhosted.org/packages/c4/2d/2861600f1abed3c85e157c78308d3b1de974ad64d67de852a79da9ae7205/loguru-0.2.5-py3-none-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.2.5
Found link https://files.pythonhosted.org/packages/d0/de/79e8314cb7473289010502b7bd352117b189225979e5d5e512fe2ada7633/loguru-0.2.5.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.2.5
Found link https://files.pythonhosted.org/packages/4a/59/9deeeba62ecfcb771c0e76d63fab565e2c229e1e418d0c410d9313fa7a4c/loguru-0.3.0-py3-none-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.3.0
Found link https://files.pythonhosted.org/packages/f6/af/090f0a4eddafe1894edb0140c903b83c0e95d6f5e50885baed025a1fc696/loguru-0.3.0.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.3.0
Found link https://files.pythonhosted.org/packages/c7/eb/1bc16bba5103cf863cb2984dca9ac401aaf29f0f04142004534f1fa98f09/loguru-0.3.1-py3-none-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.3.1
Found link https://files.pythonhosted.org/packages/2b/99/7551cfff9a7a9b06599b51ce4d4ea16866e5c82d4cd2bbdb6f0867c41adb/loguru-0.3.1.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.3.1
Found link https://files.pythonhosted.org/packages/d5/db/669c5927e31c47c1cf5beef7ee784cc5fe88f95f47a86c5814a4f3de45f6/loguru-0.3.2-py3-none-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.3.2
Found link https://files.pythonhosted.org/packages/5c/de/42db5a4bf0f02786a54ed34b676536499c74bc09540c60d70022652d1c5b/loguru-0.3.2.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.3.2
Found link https://files.pythonhosted.org/packages/57/dd/be19f64691d250bbd98906254307abd626dbbd674b019a313f57d6338bc7/loguru-0.4.0-py3-none-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.4.0
Found link https://files.pythonhosted.org/packages/1d/85/eb26882a550144b5ae95cd2be1d24794969817fbcca6a66db8089b37df3b/loguru-0.4.0.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.4.0
Found link https://files.pythonhosted.org/packages/b2/f4/2c8b94025c6e30bdb331c7ee628dc152771845aedff35f0365c2a4dacd42/loguru-0.4.1-py3-none-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.4.1
Found link https://files.pythonhosted.org/packages/b8/b7/ec749f8f95454d6043900f99d8e6ec48be89f62d861e909c3eb0407c54a7/loguru-0.4.1.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.4.1
Found link https://files.pythonhosted.org/packages/80/b0/4413a201fcdcdc6789050c536d3b4ece601975ded9e0d676ef47f582348d/loguru-0.5.0-py3-none-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.5.0
Found link https://files.pythonhosted.org/packages/7b/ae/a0e2d02fb46e5bb23a7e58f7bdace699f8173eb0271909b4bc4d90f95460/loguru-0.5.0.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.5.0
Found link https://files.pythonhosted.org/packages/59/4f/baee593c195cd4b56cf008c9473347f3b0795b47d3b946e03706a8b43fca/loguru-0.5.1-py3-none-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.5.1
Found link https://files.pythonhosted.org/packages/6d/aa/1c523f7955c718f603d0a7c6e72f0593e7335d967fabdce589ab86afaa9e/loguru-0.5.1.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.5.1
Found link https://files.pythonhosted.org/packages/a0/f7/85704c74dd5b616a528aa724d359033f4dbec896b604cf12b65c4f9badb1/loguru-0.5.2-py3-none-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.5.2
Found link https://files.pythonhosted.org/packages/1b/5c/d54d8d04a2350c61713ec7da8dcb44fcb1f0fb0af488f094a4c4ce5e4769/loguru-0.5.2.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.5.2
Found link https://files.pythonhosted.org/packages/6d/48/0a7d5847e3de329f1d0134baf707b689700b53bd3066a5a8cfd94b3c9fc8/loguru-0.5.3-py3-none-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.5.3
Found link https://files.pythonhosted.org/packages/6d/25/0d65383fc7b4f4ce9505d16773b2b2a9f0f465ef00ab337d66afff47594a/loguru-0.5.3.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.5.3
Found link https://files.pythonhosted.org/packages/fe/21/e1d1da2586865a159fc73b611f36bdd50b6c4043cb6132d3d5e972988028/loguru-0.6.0-py3-none-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.6.0
Found link https://files.pythonhosted.org/packages/75/1f/d3818863e4be96bd641c4643c535a98f0fa2a12efa7c8ba35f763fa778ee/loguru-0.6.0.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.6.0
Found link https://files.pythonhosted.org/packages/71/bd/337f7a0cd2628c4c77512d78e26f93b13c327a2ddf2132001dd78c000bf4/loguru-0.7.0-py3-none-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.7.0
Found link https://files.pythonhosted.org/packages/0c/1d/697cbb4ae54217784c1c4805696efb2fd7a1cbbe4827264a80a49e52b828/loguru-0.7.0.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.7.0
Found link https://files.pythonhosted.org/packages/19/a9/4e91197b121a41c640367641a510fd9a05bb7a3259fc9678ee2976c8fd00/loguru-0.7.1-py3-none-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.7.1
Found link https://files.pythonhosted.org/packages/3c/36/71eece37719ca9e87fa50d5de22e1b1d795282b1212e11d0d18a09f5864c/loguru-0.7.1.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.7.1
Found link https://files.pythonhosted.org/packages/03/0a/4f6fed21aa246c6b49b561ca55facacc2a44b87d65b8b92362a8e99ba202/loguru-0.7.2-py3-none-any.whl (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.7.2
Found link https://files.pythonhosted.org/packages/9e/30/d87a423766b24db416a46e9335b9602b054a72b96a88a241f2b09b560fa8/loguru-0.7.2.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:>=3.5), version: 0.7.2
Found link https://files.pythonhosted.org/packages/0c/29/0348de65b8cc732daa3e33e67806420b2ae89bdce2b04af740289c5c6c8c/loguru-0.7.3-py3-none-any.whl (from https://pypi.org/simple/loguru/) (requires-python:=3.5), version: 0.7.3
Found link https://files.pythonhosted.org/packages/3a/05/a1dae3dffd1116099471c643b8924f5aa6524411dc6c63fdae648c4f1aca/loguru-0.7.3.tar.gz (from https://pypi.org/simple/loguru/) (requires-python:=3.5), version: 0.7.3
Skipping link: not a file: https://pypi.org/simple/loguru/
Given no hashes to check 42 links for project 'loguru': discarding no candidates
Collecting loguru
Created temporary directory: /tmp/pip-unpack-swembss3
Looking up "https://files.pythonhosted.org/packages/0c/29/0348de65b8cc732daa3e33e67806420b2ae89bdce2b04af740289c5c6c8c/loguru-0.7.3-py3-none-any.whl" in the cache
Current age based on date: 217509
Ignoring unknown cache-control directive: immutable
Freshness lifetime from max-age: 365000000
The response is "fresh", returning cached response
365000000 > 217509
Using cached loguru-0.7.3-py3-none-any.whl (61 kB)
Added loguru from https://files.pythonhosted.org/packages/0c/29/0348de65b8cc732daa3e33e67806420b2ae89bdce2b04af740289c5c6c8c/loguru-0.7.3-py3-none-any.whl to build tracker '/tmp/pip-build-tracker-ya1d5lt3'
Removed loguru from https://files.pythonhosted.org/packages/0c/29/0348de65b8cc732daa3e33e67806420b2ae89bdce2b04af740289c5c6c8c/loguru-0.7.3-py3-none-any.whl from build tracker '/tmp/pip-build-tracker-ya1d5lt3'
Created temporary directory: /tmp/pip-unpack-u8510m_2
Installing collected packages: loguru
Successfully installed loguru-0.7.3
Remote version of pip: 24.3.1
Local version of pip: 22.2.2
Was pip installed by pip? True
[notice] A new release of pip available: 22.2.2 -> 24.3.1
[notice] To update, run: pip install --upgrade pip
Removed build tracker: '/tmp/pip-build-tracker-ya1d5lt3'
и
(myvenv) # python3 -v
import _frozen_importlib # frozen
import _imp # builtin
import '_thread' #
import '_warnings' #
import '_weakref' #
import '_io' #
import 'marshal' #
import 'posix' #
import '_frozen_importlib_external' #
# installing zipimport hook
import 'time' #
import 'zipimport' #
# installed zipimport hook
# code object from '/usr/lib/python3.10/encodings/__init__.pyc'
# code object from '/usr/lib/python3.10/codecs.pyc'
import '_codecs' #
import 'codecs' #
# code object from '/usr/lib/python3.10/encodings/aliases.pyc'
import 'encodings.aliases' #
import 'encodings' #
# code object from '/usr/lib/python3.10/encodings/utf_8.pyc'
import 'encodings.utf_8' #
import '_signal' #
# code object from '/usr/lib/python3.10/io.pyc'
# code object from '/usr/lib/python3.10/abc.pyc'
import '_abc' #
import 'abc' #
import 'io' #
# code object from '/usr/lib/python3.10/site.pyc'
# code object from '/usr/lib/python3.10/os.pyc'
# code object from '/usr/lib/python3.10/stat.pyc'
import '_stat' #
import 'stat' #
# code object from '/usr/lib/python3.10/_collections_abc.pyc'
import '_collections_abc' #
# code object from '/usr/lib/python3.10/posixpath.pyc'
# code object from '/usr/lib/python3.10/genericpath.pyc'
import 'genericpath' #
import 'posixpath' #
import 'os' #
# code object from '/usr/lib/python3.10/_sitebuiltins.pyc'
import '_sitebuiltins' #
Processing global site-packages
Adding directory: '/data/user_storage/myvenv/lib/python3.10/site-packages'
Processing .pth file: '/data/user_storage/myvenv/lib/python3.10/site-packages/distutils-precedence.pth'
# /data/user_storage/myvenv/lib/python3.10/site-packages/_distutils_hack/__pycache__/__init__.cpython-310.pyc matches /data/user_storage/myvenv/lib/python3.10/site-packages/_distutils_hack/__init__.py
# code object from '/data/user_storage/myvenv/lib/python3.10/site-packages/_distutils_hack/__pycache__/__init__.cpython-310.pyc'
import '_distutils_hack' #
Processing user site-packages
Processing global site-packages
Adding directory: '/data/user_storage/myvenv/lib/python3.10/site-packages'
Processing .pth file: '/data/user_storage/myvenv/lib/python3.10/site-packages/distutils-precedence.pth'
import 'site' #
Python 3.10.8 (main, Dec 4 2024, 15:18:53) [GCC 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7 on linux
Type "help", "copyright", "credits" or "license" f o r m o r e i n f o r m a t i o n . < b r / > # e x t e n s i o n m o d u l e ' r e a d l i n e ' l o a d e d f r o m ' / u s r / l i b / p y t h o n 3 . 1 0 / l i b - d y n l o a d / r e a d l i n e . c p y t h o n - 3 1 0 - a r m - l i n u x - g n u e a b i h f . s o ' < b r / > # e x t e n s i o n m o d u l e ' r e a d l i n e ' e x e c u t e d f r o m ' / u s r / l i b / p y t h o n 3 . 1 0 / l i b - d y n l o a d / r e a d l i n e . c p y t h o n - 3 1 0 - a r m - l i n u x - g n u e a b i h f . s o ' < b r / > i m p o r t ' r e a d l i n e ' # & l t ; _ f r o z e n _ i m p o r t l i b _ e x t e r n a l . E x t e n s i o n F i l e L o a d e r o b j e c t a t 0 x 7 6 8 4 6 b c 8 & g t ; < b r / > i m p o r t ' a t e x i t' #
# code object from '/usr/lib/python3.10/rlcompleter.pyc'
# code object from '/usr/lib/python3.10/inspect.pyc'
# code object from '/usr/lib/python3.10/ast.pyc'
import '_ast' #
# code object from '/usr/lib/python3.10/contextlib.pyc'
# code object from '/usr/lib/python3.10/collections/__init__.pyc'
import 'itertools' #
# code object from '/usr/lib/python3.10/keyword.pyc'
import 'keyword' #
# code object from '/usr/lib/python3.10/operator.pyc'
import '_operator' #
import 'operator' #
# code object from '/usr/lib/python3.10/reprlib.pyc'
import 'reprlib' #
import '_collections' #
import 'collections' #
# code object from '/usr/lib/python3.10/functools.pyc'
# code object from '/usr/lib/python3.10/types.pyc'
import 'types' #
import '_functools' #
import 'functools' #
import 'contextlib' #
# code object from '/usr/lib/python3.10/enum.pyc'
import 'enum' #
import 'ast' #
# code object from '/usr/lib/python3.10/dis.pyc'
# code object from '/usr/lib/python3.10/opcode.pyc'
# extension module '_opcode' loaded from '/usr/lib/python3.10/lib-dynload/_opcode.cpython-310-arm-linux-gnueabihf.so'
# extension module '_opcode' executed from '/usr/lib/python3.10/lib-dynload/_opcode.cpython-310-arm-linux-gnueabihf.so'
import '_opcode' #
import 'opcode' #
import 'dis' #
# code object from '/usr/lib/python3.10/collections/abc.pyc'
import 'collections.abc' #
# code object from '/usr/lib/python3.10/importlib/__init__.pyc'
# code object from '/usr/lib/python3.10/warnings.pyc'
import 'warnings' #
import 'importlib' #
# code object from '/usr/lib/python3.10/importlib/machinery.pyc'
import 'importlib.machinery' #
# code object from '/usr/lib/python3.10/linecache.pyc'
# code object from '/usr/lib/python3.10/tokenize.pyc'
# code object from '/usr/lib/python3.10/re.pyc'
# code object from '/usr/lib/python3.10/sre_compile.pyc'
import '_sre' #
# code object from '/usr/lib/python3.10/sre_parse.pyc'
# code object from '/usr/lib/python3.10/sre_constants.pyc'
import 'sre_constants' #
import 'sre_parse' #
import 'sre_compile' #
import '_locale' #
# code object from '/usr/lib/python3.10/copyreg.pyc'
import 'copyreg' #
import 're' #
# code object from '/usr/lib/python3.10/token.pyc'
import 'token' #
import 'tokenize' #
import 'linecache' #
import 'inspect' #
import 'rlcompleter' #
>>> q u i t ( ) < b r / > # c l e a r b u i l t i n s . _ < b r / > # c l e a r s y s . p a t h < b r / > # c l e a r s y s . a r g v < b r / > # c l e a r s y s . p s 1 < b r / > # c l e a r s y s . p s 2 < b r / > # c l e a r s y s . l a s t _ t y p e < b r / > # c l e a r s y s . l a s t _ v a l u e < b r / > # c l e a r s y s . l a s t _ t r a c e b a c k < b r / > # c l e a r s y s . p a t h _ h o o k s < b r / > # c l e a r s y s . p a t h _ i m p o r t e r _ c a c h e < b r / > # c l e a r s y s . m e t a _ p a t h < b r / > # c l e a r s y s . _ _ i n t e r a c t i v e h o o k _ _ < b r / > # r e s t o r e s y s . s t d i n < b r / > # r e s t o r e s y s . s t d o u t < b r / > # r e s t o r e s y s . s t d e r r < b r / > # c l e a n u p [ 2 ] r e m o v i n g s y s < b r / > # c l e a n u p [ 2 ] r e m o v i n g b u i l t i n s < b r / > # c l e a n u p [ 2 ] r e m o v i n g _ f r o z e n _ i m p o r t l i b < b r / > # c l e a n u p [ 2 ] r e m o v i n g _ i m p < b r / > # c l e a n u p [ 2 ] r e m o v i n g _ t h r e a d < b r / > # c l e a n u p [ 2 ] r e m o v i n g _ w a r n i n g s < b r / > # c l e a n u p [ 2 ] r e m o v i n g _ w e a k r e f < b r / > # c l e a n u p [ 2 ] r e m o v i n g _ i o < b r / > # c l e a n u p [ 2 ] removing marshal
# cleanup[2] removing posix
# cleanup[2] removing _frozen_importlib_external
# cleanup[2] removing time
# cleanup[2] removing zipimport
# destroy zipimport
# cleanup[2] removing _codecs
# cleanup[2] removing codecs
# cleanup[2] removing encodings.aliases
# cleanup[2] removing encodings
# destroy encodings
# cleanup[2] removing encodings.utf_8
# cleanup[2] removing _signal
# cleanup[2] removing _abc
# cleanup[2] removing abc
# cleanup[2] removing io
# cleanup[2] removing __main__
# cleanup[2] removing _stat
# cleanup[2] removing stat
# cleanup[2] removing _collections_abc
# cleanup[2] removing genericpath
# cleanup[2] removing posixpath
# cleanup[2] removing os.path
# cleanup[2] removing os
# cleanup[2] removing _sitebuiltins
# cleanup[2] removing _distutils_hack
# destroy _distutils_hack
# cleanup[2] removing site
# destroy site
# cleanup[2] removing readline
# cleanup[2] removing atexit
# cleanup[2] removing _ast
# destroy _ast
# cleanup[2] removing itertools
# cleanup[2] removing keyword
# destroy keyword
# cleanup[2] removing _operator
# cleanup[2] removing operator
# destroy operator
# cleanup[2] removing reprlib
# destroy reprlib
# cleanup[2] removing _collections
# cleanup[2] removing collections
# cleanup[2] removing types
# cleanup[2] removing _functools
# cleanup[2] removing functools
# cleanup[2] removing contextlib
# destroy contextlib
# cleanup[2] removing enum
# cleanup[2] removing ast
# cleanup[2] removing _opcode
# cleanup[2] removing opcode
# destroy opcode
# cleanup[2] removing dis
# cleanup[2] removing collections.abc
# cleanup[2] removing importlib._bootstrap
# cleanup[2] removing importlib._bootstrap_external
# cleanup[2] removing warnings
# cleanup[2] removing importlib
# cleanup[2] removing importlib.machinery
# cleanup[2] removing _sre
# cleanup[2] removing sre_constants
# destroy sre_constants
# cleanup[2] removing sre_parse
# cleanup[2] removing sre_compile
# cleanup[2] removing _locale
# cleanup[2] removing copyreg
# cleanup[2] removing re
# cleanup[2] removing token
# cleanup[2] removing tokenize
# cleanup[2] removing linecache
# cleanup[2] removing inspect
# cleanup[2] removing rlcompleter
# destroy rlcompleter
# destroy _signal
# destroy _sitebuiltins
# destroy atexit
# destroy inspect
# destroy __main__
# destroy ast
# destroy dis
# destroy importlib
# destroy linecache
# destroy token
# destroy types
# destroy io
# destroy _opcode
# destroy warnings
# destroy importlib.machinery
# destroy tokenize
# destroy collections
# destroy itertools
# destroy re
# destroy enum
# destroy sre_compile
# destroy functools
# destroy copyreg
# destroy sre_parse
# destroy _sre
# destroy _locale
# cleanup[3] wiping importlib._bootstrap_external
# cleanup[3] wiping importlib._bootstrap
# cleanup[3] wiping collections.abc
# cleanup[3] wiping _functools
# cleanup[3] wiping _collections
# cleanup[3] wiping _operator
# cleanup[3] wiping readline
# cleanup[3] wiping os
# destroy posixpath
# cleanup[3] wiping genericpath
# cleanup[3] wiping _collections_abc
# cleanup[3] wiping stat
# cleanup[3] wiping _stat
# destroy _stat
# cleanup[3] wiping abc
# cleanup[3] wiping _abc
# cleanup[3] wiping encodings.utf_8
# cleanup[3] wiping encodings.aliases
# cleanup[3] wiping codecs
# cleanup[3] wiping _codecs
# cleanup[3] wiping time
# cleanup[3] wiping _frozen_importlib_external
# cleanup[3] wiping posix
# cleanup[3] wiping marshal
# cleanup[3] wiping _io
# cleanup[3] wiping _weakref
# cleanup[3] wiping _warnings
# cleanup[3] wiping _thread
# cleanup[3] wiping _imp
# cleanup[3] wiping _frozen_importlib
# cleanup[3] wiping sys
# cleanup[3] wiping builtins
# destroy readline
# destroy posix
# destroy _frozen_importlib_external
# destroy _imp
# destroy io
# destroy marshal
# destroy time
# destroy _warnings
# destroy os
# destroy stat
# destroy genericpath
# destroy _frozen_importlib
# destroy codecs
# destroy encodings.aliases
# destroy encodings.utf_8
# destroy _codecs
# destroy abc
# destroy _abc
# destroy _collections_abc
# destroy sys
# destroy _weakref
# destroy _collections
# destroy collections.abc
# destroy builtins
# destroy _functools
# destroy _operator
# destroy _thread
# clear sys.audit hooks
Подробнее здесь: [url]https://stackoverflow.com/questions/79346960/modulenotfounderror-in-python-virtual-environment-after-successful-install[/url]
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
ModuleNotFoundError в виртуальной среде Python после успешной установки
Anonymous » » в форуме PythonУ меня есть виртуальная среда Python, настроенная на встроенном компьютере с ядром Linaro. Когда я использую pip для установки пакета в виртуальной среде, я получаю ошибку ModuleNotFoundError: нет модуля с именем «x» (где x — любой модуль, который я... - 0 Ответы
- 24 Просмотры
-
Последнее сообщение Anonymous
-
-
-
ModuleNotFoundError в виртуальной среде Python после успешной установки
Anonymous » » в форуме LinuxУ меня есть виртуальная среда Python, настроенная на встроенном компьютере с ядром Linaro. Когда я использую pip для установки пакета в виртуальной среде, я получаю ошибку ModuleNotFoundError: нет модуля с именем «x» (где x — любой модуль, который я... - 0 Ответы
- 18 Просмотры
-
Последнее сообщение Anonymous
-
-
-
ModuleNotFoundError в виртуальной среде Python после успешной установки
Anonymous » » в форуме PythonУ меня есть виртуальная среда Python, настроенная на встроенном компьютере с ядром Linaro. Когда я использую pip для установки пакета в виртуальной среде, я получаю ошибку ModuleNotFoundError: нет модуля с именем «x» (где x — любой модуль, который я... - 0 Ответы
- 14 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Почему в моей виртуальной среде Python в виртуальной среде Python в Visual Studio?
Anonymous » » в форуме PythonAfter updating Visual Studio Code to version 1.88.0, I opened one of my Python projects and noticed that there are double parentheses in my virtual environment: ((env) ).
I'm using the Python extension v2024.4.0
Ранее, в тех же и всех других... - 0 Ответы
- 11 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Почему в моей виртуальной среде Python в виртуальной среде Python в Visual Studio?
Anonymous » » в форуме PythonAfter updating Visual Studio Code to version 1.88.0, I opened one of my Python projects and noticed that there are double parentheses in my virtual environment: ((env) ).
I'm using the Python extension v2024.4.0
Ранее, в тех же и всех других... - 0 Ответы
- 4 Просмотры
-
Последнее сообщение Anonymous
-
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...