如果它指向一个不存在的目录,请检查 Python 的退出状态并查看python -m site --help解释。 提示:运行pip list --user或将为您提供所有已安装的pip freeze --user每个用户站点包的列表。 转载:https://stackoverflow.com/questions/122327/how-do-i-find-the-location-of-my-
python-m site--user-site 注意当查看指定版本的python的安装包时,需要指定python版本,比如python2.7.15 -m site 参考:https://stackoverflow.com/questions/122327/how-do-i-find-the-location-of-my-python-site-packages-directory
接下来,我们可以使用如下代码来获取site-packages目录的位置: importsite site_packages=site.getsitepackages()print(site_packages) Python Copy 假设虚拟环境myenv的目录路径为/path/to/myenv,运行以上代码,我们可能会得到如下的输出: ['/path/to/myenv/lib/python3.9/site-packages'] Bash Copy 从输出...
defgetsitepackages(prefixes=None):"""Returns a list containing all global site-packages directories.For each directory present in ``prefixes`` (or the global ``PREFIXES``),this function will find its `site-packages` subdirectory depending on thesystem environment, and will return a list of ful...
[6]https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/ [7]https://pypi.org/project/pyexcel/ [8]https://stackoverflow.com/questions/122327/how-do-i-find-the-location-of-my-python-site-packages-directory/12950101 [9]https://setuptools.readthedocs.io/en/latest/...
) to point pip to the current directory. If you hadn’t used the -e flag, pip would’ve installed the package normally into your environment’s site-packages/ folder. When you install a package in editable mode, you’re creating a link in the site-packages to the local project path: ...
zip ... 2945 INFO: Processing pre-find module path hook distutils from '/home/dechin/anaconda3/lib/python3.8/site-packages/PyInstaller/hooks/pre_find_module_path/hook-distutils.py'. 2946 INFO: distutils: retargeting to non-venv dir '/home/dechin/anaconda3/lib/python3.8' 5397 INFO: Caching...
$ pip download--destination-directory/local/wheels-r requirements.txt 下载完,总归是要安装的,可以指定这个目录中安装软件包,而不从 pypi 上安装。 代码语言:javascript 代码运行次数:0 运行 AI代码解释 $ pip install--no-index--find-links=/local/wheels-r requirements.txt ...
Sorry guys for a dummy question, but it is hard to find out what is actually going on with site-package isolation -> lots of contradicting posts, issues, stackoverflow questions... Is now the preferable way to isolate from site-packages by installing conda install -c conda-forge conda-ecos...
一是排查检查项目工程目录,对应写的setup.py,查看packages、package_dir、package_data,这里可以使用find_packages函数来检查。package_dir={"a": "b"}我也没搞懂,这些可以详细参考官方教程。 二是检查setup.py中是否有语法问题,classifiers是否有问题,官方classifiershttps://pypi.org/classifiers/三是排查检查工程文件...