佬们,最近遇到个问题,pycharm+Anaconda,我明明装了某个库,还是提示我没装pycharm爆红
1 Like
是不是没切到对应环境
1 Like
==我一直用的base环境啊,难道他给我安装到别的环境了
1 Like
重启看看看呢,一般下载了不会爆红的吧,要不就是没下到正确环境中吗?
1 Like
看一下base环境的pip list呗
pycharm终端用的环境和anaconda激活环境不同?之前用vscode也遇到类似的问题
import sys 看一下导包是在哪个路径
重启了,我看base环境软件包有这个
Package Version
--------------------------------- ------------------
aext-assistant 4.0.15
aext-assistant-server 4.0.15
aext-core 4.0.15
aext-core-server 4.0.15
aext-panels 4.0.15
aext-panels-server 4.0.15
aext-share-notebook 4.0.15
aext-share-notebook-server 4.0.15
aext-shared 4.0.15
aiobotocore 2.12.3
aiofiles 22.1.0
aiohappyeyeballs 2.4.0
aiohttp 3.10.5
aioitertools 0.7.1
aiosignal 1.2.0
alabaster 0.7.16
altair 5.0.1
anaconda-anon-usage 0.4.4
anaconda-catalogs 0.2.0
anaconda-cli-base 0.5.2
anaconda-client 1.13.0
anaconda-cloud-auth 0.7.2
anaconda-navigator 2.6.4
anaconda-project 0.11.1
annotated-types 0.6.0
anyio 4.2.0
appdirs 1.4.4
archspec 0.2.3
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
arrow 1.2.3
astroid 2.14.2
astropy 6.1.3
astropy-iers-data 0.2024.9.2.0.33.23
asttokens 2.0.5
async-lru 2.0.4
atomicwrites 1.4.0
attrs 24.2.0
Automat 20.2.0
autopep8 2.0.4
Babel 2.11.0
bcrypt 3.2.0
beautifulsoup4 4.12.3
bilitool 0.1.3
biliupload 0.0.1
binaryornot 0.4.4
black 24.8.0
bleach 4.1.0
blinker 1.6.2
bokeh 3.4.1
boltons 23.0.0
botocore 1.34.69
Bottleneck 1.3.7
Brotli 1.0.9
bs4 0.0.2
cachetools 5.3.3
certifi 2025.1.31
cffi 1.17.1
chardet 4.0.0
charset-normalizer 3.4.1
click 8.1.7
cloudpickle 2.2.1
colorama 0.4.6
colorcet 3.1.0
comm 0.2.1
conda 24.11.3
conda-build 24.5.1
conda-content-trust 0.2.0
conda_index 0.5.0
conda-libmamba-solver 24.1.0
conda-pack 0.7.1
conda-package-handling 2.3.0
conda_package_streaming 0.10.0
conda-repo-cli 1.0.88
conda-token 0.5.0+1.g2209e04
constantly 23.10.4
contourpy 1.2.0
cookiecutter 2.6.0
crypto 1.4.1
cryptography 42.0.5
cssselect 1.2.0
cycler 0.11.0
cytoolz 0.12.2
dask 2024.5.0
dask-expr 1.1.0
DataRecorder 3.5.3
datashader 0.16.2
debugpy 1.6.7
decorator 4.4.2
defusedxml 0.7.1
diff-match-patch 20200713
dill 0.3.8
distributed 2024.5.0
distro 1.9.0
docstring-to-markdown 0.11
docutils 0.18.1
DownloadKit 2.0.4
DrissionPage 4.1.0.6
entrypoints 0.4
et-xmlfile 1.1.0
executing 0.8.3
fake-useragent 2.0.3
fastjsonschema 2.16.2
filelock 3.13.1
flake8 7.0.0
Flask 3.0.3
fonttools 4.51.0
frozendict 2.4.2
frozenlist 1.4.0
fsspec 2024.3.1
gensim 4.3.2
gitdb 4.0.7
GitPython 3.1.37
greenlet 3.0.3
h11 0.14.0
h5py 3.11.0
HeapDict 1.0.1
holoviews 1.19.0
httpcore 1.0.2
httpx 0.27.0
huggingface-hub 0.25.2
hvplot 0.10.0
hyperlink 21.0.0
idna 3.10
imagecodecs 2023.1.23
imageio 2.33.1
imageio-ffmpeg 0.5.1
imagesize 1.4.1
imbalanced-learn 0.12.3
importlib-metadata 7.0.1
incremental 22.10.0
inflection 0.5.1
iniconfig 1.1.1
intake 0.7.0
intervaltree 3.1.0
ipykernel 6.28.0
ipython 8.25.0
ipython-genutils 0.2.0
ipywidgets 7.8.1
isort 5.13.2
itemadapter 0.3.0
itemloaders 1.1.0
itsdangerous 2.2.0
jaraco.classes 3.2.1
jedi 0.18.1
jellyfish 1.0.1
Jinja2 3.1.4
jmespath 1.0.1
joblib 1.4.2
jplephem 2.22
json5 0.9.6
jsonpatch 1.33
jsonpointer 2.1
jsonschema 4.19.2
jsonschema-specifications 2023.7.1
jupyter 1.0.0
jupyter_client 8.6.0
jupyter-console 6.6.3
jupyter_core 5.7.2
jupyter-events 0.10.0
jupyter-lsp 2.2.0
jupyter_server 2.14.1
jupyter_server_terminals 0.4.4
jupyterlab 4.0.11
jupyterlab-pygments 0.1.2
jupyterlab_server 2.25.1
jupyterlab-widgets 1.0.0
keyring 24.3.1
kiwisolver 1.4.4
lazy_loader 0.4
lazy-object-proxy 1.10.0
lckr_jupyterlab_variableinspector 3.1.0
libarchive-c 2.9
libmambapy 1.5.8
linkify-it-py 2.0.0
llvmlite 0.42.0
lmdb 1.4.1
locket 1.0.0
lrcparser 0.1.2
lxml 5.2.1
lxml_html_clean 0.4.1
lz4 4.3.2
Markdown 3.4.1
markdown-it-py 2.2.0
MarkupSafe 2.1.3
matplotlib 3.8.4
matplotlib-inline 0.1.6
mccabe 0.7.0
mdit-py-plugins 0.3.0
mdurl 0.1.0
menuinst 2.1.1
mistune 2.0.4
mkl-fft 1.3.8
mkl-random 1.2.4
mkl-service 2.4.0
more-itertools 10.1.0
moviepy 1.0.3
mpmath 1.3.0
msgpack 1.0.3
multidict 6.0.4
multipledispatch 0.6.0
mutagen 1.47.0
mypy 1.10.0
mypy-extensions 1.0.0
mysqlclient 2.2.7
Naked 0.1.32
navigator-updater 0.5.1
nbclient 0.8.0
nbconvert 7.10.0
nbformat 5.9.2
nest-asyncio 1.6.0
networkx 3.2.1
nltk 3.8.1
notebook 7.0.8
notebook_shim 0.2.3
numba 0.59.1
numexpr 2.8.7
numpy 1.26.4
numpydoc 1.7.0
openai 1.37.0
openpyxl 3.1.2
outcome 1.3.0.post0
overrides 7.4.0
packaging 23.2
pandas 2.2.2
pandocfilters 1.5.0
panel 1.4.4
param 2.1.0
paramiko 2.8.1
parse 1.20.2
parsel 1.8.1
parso 0.8.3
partd 1.4.1
pathspec 0.10.3
patsy 0.5.6
pexpect 4.8.0
pickleshare 0.7.5
pillow 10.3.0
pip 24.1
pkce 1.0.3
pkginfo 1.10.0
platformdirs 3.10.0
playwright 1.47.0
plotly 5.22.0
pluggy 1.0.0
ply 3.11
proglog 0.1.10
prometheus-client 0.14.1
prompt-toolkit 3.0.43
Protego 0.1.16
protobuf 3.20.3
psutil 5.9.0
ptyprocess 0.7.0
pure-eval 0.2.2
py-cpuinfo 9.0.0
pyarrow 14.0.2
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycodestyle 2.11.1
pycosat 0.6.6
pycparser 2.21
pycryptodome 3.22.0
pyct 0.5.0
pycurl 7.45.2
pydantic 2.10.3
pydantic_core 2.27.1
pydantic-settings 2.6.1
pydeck 0.8.0
PyDispatcher 2.0.5
pydocstyle 6.3.0
pyee 11.0.0
pyerfa 2.0.1.4
pyflakes 3.2.0
Pygments 2.15.1
PyJWT 2.8.0
pylint 2.16.2
pylint-venv 3.0.3
pyls-spyder 0.4.0
PyMySQL 1.1.1
PyNaCl 1.5.0
pyodbc 5.0.1
pyOpenSSL 24.0.0
pyparsing 3.0.9
pyppeteer 2.0.0
PyQt5 5.15.10
PyQt5-sip 12.13.0
PyQt6 6.8.1
PyQt6-Qt6 6.8.2
PyQt6_sip 13.10.0
PyQtWebEngine 5.15.6
pyquery 2.0.1
PySocks 1.7.1
pytest 7.4.4
python-dateutil 2.9.0.post0
python-dotenv 0.21.0
python-json-logger 2.0.7
python-lsp-black 2.0.0
python-lsp-jsonrpc 1.1.2
python-lsp-server 1.10.0
python-slugify 5.0.2
python-snappy 0.6.1
pytoolconfig 1.2.6
pytz 2024.1
pyviz_comms 3.0.2
pywavelets 1.5.0
pywin32 305.1
pywin32-ctypes 0.2.2
pywinpty 2.0.10
PyYAML 6.0.2
pyzmq 25.1.2
QDarkStyle 3.2.3
qrcode 8.1
qstylizer 0.2.2
QtAwesome 1.2.2
qtconsole 5.5.1
QtPy 2.4.1
queuelib 1.6.2
readchar 4.0.5
referencing 0.30.2
regex 2023.10.3
requests 2.32.3
requests-file 1.5.1
requests-html 0.10.0
requests-toolbelt 1.0.0
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rich 13.3.5
rope 1.12.0
rpds-py 0.10.6
Rtree 1.0.1
ruamel.yaml 0.17.21
ruamel-yaml-conda 0.17.21
s3fs 2024.3.1
scikit-image 0.23.2
scikit-learn 1.4.2
scipy 1.13.1
Scrapy 2.11.1
seaborn 0.13.2
selenium 4.25.0
semver 3.0.2
Send2Trash 1.8.2
service-identity 18.1.0
setuptools 69.5.1
shellescape 3.8.1
shellingham 1.5.0
sip 6.7.12
six 1.16.0
smart-open 5.2.1
smmap 4.0.0
sniffio 1.3.0
snowballstemmer 2.2.0
sortedcontainers 2.4.0
soupsieve 2.5
Sphinx 7.3.7
sphinxcontrib-applehelp 1.0.2
sphinxcontrib-devhelp 1.0.2
sphinxcontrib-htmlhelp 2.0.0
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 1.0.3
sphinxcontrib-serializinghtml 1.1.10
spyder 5.5.1
spyder-kernels 2.5.0
SQLAlchemy 2.0.30
stack-data 0.2.0
statsmodels 0.14.2
streamlit 1.32.0
sympy 1.12
tables 3.9.2
tabulate 0.9.0
tblib 1.7.0
tenacity 8.2.2
terminado 0.17.1
text-unidecode 1.3
textdistance 4.2.1
threadpoolctl 2.2.0
three-merge 0.1.1
tifffile 2023.4.12
tinycss2 1.2.1
tldextract 3.2.0
toml 0.10.2
tomli 2.0.1
tomlkit 0.11.1
toolz 0.12.0
tornado 6.4.1
tqdm 4.67.1
traitlets 5.14.3
trio 0.26.2
trio-websocket 0.11.1
truststore 0.8.0
Twisted 23.10.0
twisted-iocpsupport 1.0.2
typer 0.9.0
typing_extensions 4.12.2
tzdata 2023.3
uc-micro-py 1.0.1
ujson 5.10.0
undetected-chromedriver 3.5.5
unicodedata2 15.1.0
Unidecode 1.2.0
urllib3 1.26.16
w3lib 2.1.2
watchdog 4.0.1
wcwidth 0.2.5
webencodings 0.5.1
websocket-client 1.8.0
websockets 10.4
Werkzeug 3.0.3
whatthepatch 1.0.2
wheel 0.43.0
widgetsnbextension 3.6.6
win-inet-pton 1.1.0
wrapt 1.14.1
wsproto 1.2.0
xarray 2023.6.0
xlwings 0.31.4
xyzservices 2022.9.0
yapf 0.40.2
yarl 1.9.3
zict 3.0.0
zipp 3.17.0
zope.interface 5.4.0
zstandard 0.22.0
块引用
我很久之前就遇到过,忘了之前怎么解决的了
那在pycharm终端激活这个环境 吧(其实我也有点忘了,但是保证这两个环境对的上就行
我一直用的base环境,还是不行
--- Python Module Search Paths (sys.path) ---
0: D:\PersonalData\互联网\bilibili自动运行\v16
1: D:\PersonalData\互联网
2: D:\PyCharm 2024.2\plugins\python-ce\helpers\pycharm_display
3: D:\anaconda3\python312.zip
4: D:\anaconda3\DLLs
5: D:\anaconda3\Lib
6: D:\anaconda3
7: D:\anaconda3\Lib\site-packages
8: D:\anaconda3\Lib\site-packages\win32
9: D:\anaconda3\Lib\site-packages\win32\lib
10: D:\anaconda3\Lib\site-packages\Pythonwin
11: D:\PyCharm 2024.2\plugins\python-ce\helpers\pycharm_matplotlib_backend
12: D:\PyCharm 2024.2\plugins\python-ce\helpers\pycharm_plotly_backend
----------------------------------------------
我去D:\anaconda3\Lib\site-packages也能找到包
可能是没下到对应的环境,昨天我也是,后面把路径全写上了保证绝对是这里,然后就好了
那可能是pycharm用了虚拟环境,看看有没有一个.venv文件夹
没,一直是base环境
解决了,我去库里看了看,带cry开头的包我都uninstall了,再重新装就正确了,
之前pip装的Crypto是小写的crypto
也不知道怎么回事
1 Like