吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 1889|回复: 3
收起左侧

[求助] Python 未设置环境变量下,如何在CMD调用pip安装的库

[复制链接]
Ishin 发表于 2020-12-12 16:19
本帖最后由 Ishin 于 2020-12-12 16:22 编辑

点进来的热心人士,先感谢啦~!
题主在公司电脑用免安装版的python,没有配置环境变量
(别问,问就是没有权限,无法安装exe版和配置环境变量,不然我也不用这么麻烦。)


1.已经安装了pip和pyinstaller和auto-py-to-exe了
[Python] 纯文本查看 复制代码
C:\Users\28142749>pip install pyinstaller
Requirement already satisfied: pyinstaller in c:\users\28142749\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (4.1)
Requirement already satisfied: pyinstaller-hooks-contrib>=2020.6 in c:\users\28142749\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from pyinstaller) (2020.10)
Requirement already satisfied: altgraph in c:\users\28142749\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from pyinstaller) (0.17)
Requirement already satisfied: setuptools in c:\program files\windowsapps\pythonsoftwarefoundation.python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\site-packages (from pyinstaller) (49.2.1)
Requirement already satisfied: pywin32-ctypes>=0.2.0; sys_platform == "win32" in c:\users\28142749\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from pyinstaller) (0.2.0)
Requirement already satisfied: pefile>=2017.8.1; sys_platform == "win32" in c:\users\28142749\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from pyinstaller) (2019.4.18)
Requirement already satisfied: future in c:\users\28142749\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from pefile>=2017.8.1; sys_platform == "win32"->pyinstaller) (0.18.2)


2. 尝试 运行这些库(可执行程序)
[Python] 纯文本查看 复制代码
D:\Output>pyinstaller -F file_creator.py
'pyinstaller' is not recognized as an internal or external command,
operable program or batch file.


3. 并没有安装失败
[Python] 纯文本查看 复制代码
D:\Output>pip list
Package                   Version
------------------------- ---------
.......
pyinstaller               4.1
pyinstaller-hooks-contrib 2020.10
........


4. 尝试绝对路径?
[Python] 纯文本查看 复制代码
D:\Output>pip show pyinstaller
Name: pyinstaller
Version: 4.1
Location: c:\users\28142749\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages
Requires: pefile, pywin32-ctypes, setuptools, pyinstaller-hooks-contrib, altgraph
Required-by: auto-py-to-exe

D:\Output>c:\users\28142749\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages\pyinstaller
'c:\users\28142749\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages\pyinstaller' is not recognized as an internal or external command,
operable program or batch file.

D:\Output>c:\users\28142749\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages\pyinstaller.exe
'c:\users\28142749\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages\pyinstaller.exe' is not recognized as an internal or external command,
operable program or batch file.

D:\Output>c:\users\28142749\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages\pyinstaller.py
'c:\users\28142749\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages\pyinstaller.py' is not recognized as an internal or external command,
operable program or batch file.


5. 以上就是我分析,尝试自己努力解决问题的全部流程。所以我觉得自己暂时的能力,搞不定,有人能够告诉我,怎么样可以使用pyinstaller吗
应该排版不至于太丑不想看吧?

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

SagJoker 发表于 2020-12-12 16:40
我曾经见过打包好的pyinstaller。
微信图片_20201123141631.png
wty1641 发表于 2020-12-12 16:42
feiyu361 发表于 2020-12-13 11:07
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2025-1-16 13:54

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表