install package
-
solving environment: failed with repodata from current_repodata.json, will retry with next repodata
https://blog.csdn.net/qq_42544924/article/details/120602430
因为我可以科学上网,所以我把之前设置的国内源删除了,使用国内的源反而出问题。。
添加和删除源的方法:https://www.cnblogs.com/fireblackman/p/16422750.html -
Solving environment: failed with initial frozen solve.
先更新conda version:conda update conda
然后再conda install xx即可
https://www.codenong.com/48493505/
https://www.jianshu.com/p/4c7b9127cf83 -
pip vs conda
- pip
pip install xxx,在特定环境里使用pip,下载的包会存在特定环境的目录里面,例如:
D:\Anaconda3\envs\nlp\Lib\site-packages\fasttext
使用pip uninstall xxx,包就卸载掉了,也可以用:conda remove --name nlp --all来删除环境 - conda
conda install xxx,不管在什么环境下载的包,都统一放在一个目录里面:
D:\Anaconda3\pkgs\fasttext,这个fasttext里面也有site-packages文件夹。
在某个环境下面下载了某个包,再到另外一个环境下载同样的包,conda会自动在上面的目录里面找,如果有,就不会重复下载,而是将这个包的site-packages下的文件复制到当前环境下(和直接pip install一样)
使用conda uninstall xxx时,和pip uninstall一样,删除了当前环境site-packages里面的包内容,但是在上述目录里面还存在这个包,此时再到另外一个环境下载这个包,还是将site-packages复制一份到当前环境下,做到了一次下载,到处使用。 - https://www.cnblogs.com/maybaco/p/15056860.html
- pip
vscode
-
在vscode中使用jupyter
https://code.visualstudio.com/docs/datascience/jupyter-notebooks -
vscode中运行jupyter文件命令报错。
错误信息:Running cells with ‘Python 3.9.12 (‘base’)’ requires ipykernel package.
Run the following command to install ‘ipykernel’ into the Python environment.
Command: ‘conda install -n base ipykernel --update-deps --force-reinstall’
解决办法:- 失败的解决办法:用pip安装ipykernel,虽然安装成功,但一直connecting to kernel。
- 成功的解决办法:根据提示’conda install -n base ipykernel --update-deps --force-reinstall’,用conda安装ipykernel即可。
other
- The current user does not have write permissions to the target environment
给当前用户增加该文件目录的写权限。
https://blog.csdn.net/weixin_43208295/article/details/105704440