[python] 求助 在cmd中没有找到pipenv --three命令怎么回事
本帖最后由 zhcj66 于 2023-8-1 13:57 编辑如题 在cmd中没有创建虚拟环境pipenv --three的命令怎么回事?
C:\Users\Administrator>cd /d D:\py\PyQt5
D:\py\PyQt5>pipenv --three
Usage: pipenv COMMAND ...
Try 'pipenv -h' for help.
Error: No such option: --three (Possible options: --bare, --help, --where)
D:\py\PyQt5>
上面 COMMAND ...] 这段提示是什么意思
D:\py\PyQt5>pipenv
Usage: pipenv COMMAND ...
Options:
--where Output project home information.
--venv Output virtualenv information.
--py Output Python interpreter information.
--envs Output Environment Variable options.
--rm Remove the virtualenv.
--bare Minimal output.
--man Display manpage.
--support Output diagnostic information for use in
GitHub issues.
--site-packages / --no-site-packages
Enable site-packages for the virtualenv.
--python TEXT Specify which version of Python virtualenv
should use.
--clear Clears caches (pipenv, pip).[env var:
PIPENV_CLEAR]
-q, --quiet Quiet mode.
-v, --verbose Verbose mode.
--pypi-mirror TEXT Specify a PyPI mirror.
--version Show the version and exit.
-h, --help Show this message and exit.
Usage Examples:
Create a new project using Python 3.7, specifically:
$ pipenv --python 3.7
Remove project virtualenv (inferred from current directory):
$ pipenv --rm
Install all dependencies for a project (including dev):
$ pipenv install --dev
Create a lockfile containing pre-releases:
$ pipenv lock --pre
Show a graph of your installed dependencies:
$ pipenv graph
Check your installed dependencies for security vulnerabilities:
$ pipenv check
Install a local setup.py into your virtual environment/Pipfile:
$ pipenv install -e .
Use a lower-level pip command:
$ pipenv run pip freeze
Commands:
check Checks for PyUp Safety security vulnerabilities and against
PEP 508 markers provided in Pipfile.
clean Uninstalls all packages not specified in Pipfile.lock.
graph Displays currently-installed dependency graph information.
install Installs provided packages and adds them to Pipfile, or (if no
packages are given), installs all packages from Pipfile.
lock Generates Pipfile.lock.
open View a given module in your editor.
requirementsGenerate a requirements.txt from Pipfile.lock.
run Spawns a command installed into the virtualenv.
scripts Lists scripts in current environment config.
shell Spawns a shell within the virtualenv.
sync Installs all packages specified in Pipfile.lock.
uninstall Uninstalls a provided package and removes it from Pipfile.
update Runs lock, then sync.
upgrade Resolves provided packages and adds them to Pipfile, or (if no
packages are given), merges results to Pipfile.lock
verify Verify the hash in Pipfile.lock is up-to-date.
D:\py\PyQt5>pip list
Package Version
---------------- ---------
certifi 2023.7.22
distlib 0.3.7
dnspython 2.4.1
filelock 3.12.2
pip 23.1.2
pipenv 2023.7.23
platformdirs 3.9.1
setuptools 68.0.0
virtualenv 20.24.2
virtualenv-clone 0.5.7
A new release of pip is available: 23.1.2 -> 23.2.1
To update, run: python.exe -m pip install --upgrade pip
D:\py\PyQt5>
如果是pycharm提示,那应该是你环境变量path中没有python的配置或者项目env没有配置,需要手动配置一下 STmimimimmi 发表于 2023-8-1 13:55
如果是pycharm提示,那应该是你环境变量path中没有python的配置或者项目env没有配置,需要手动配置一下
cmd 中提示的 pipenv install --three你电脑有装到python3才行的啊。 安Anconda和Python3.7了么
xqdyan 发表于 2023-8-1 14:00
pipenv install --three你电脑有装到python3才行的啊。
Microsoft Windows [版本 10.0.17763.4131]
(c) 2018 Microsoft Corporation。保留所有权利。
C:\Users\Administrator>python --version
Python 3.11.4
C:\Users\Administrator>
安装了python3 了 STmimimimmi 发表于 2023-8-1 14:00
安Anconda和Python3.7了么
python是3.11.4
Anconda 安装在哪里? 用pip安装提示下面
C:\Users\Administrator>pip install Anconda
ERROR: Could not find a version that satisfies the requirement Anconda (from versions: none)
ERROR: No matching distribution found for Anconda
A new release of pip is available: 23.1.2 -> 23.2.1
To update, run: python.exe -m pip install --upgrade pip
C:\Users\Administrator> zhcj66 发表于 2023-8-1 14:09
Microsoft Windows [版本 10.0.17763.4131]
(c) 2018 Microsoft Corporation ...
运行下这看下
pipenv install --three https://www.anaconda.com/download xqdyan 发表于 2023-8-1 14:11
运行下这看下
pipenv install --three
还是不能用
D:\py\PyQt5>pipenv install --three
Creating a Pipfile for this project...
Installing --three...
Resolving --three...
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\patched\pip\_vendor\packaging\requirements.py", line 102, in __init__
req = REQUIREMENT.parseString(requirement_string)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\patched\pip\_vendor\pyparsing\util.py", line 256, in _inner
return fn(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\patched\pip\_vendor\pyparsing\core.py", line 1190, in parse_string
raise exc.with_traceback(None)
pipenv.patched.pip._vendor.pyparsing.exceptions.ParseException: , found '-'(at char 0), (line:1, col:1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 936, in _parse_name_from_line
self._requirement = init_requirement(self.line)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\vendor\requirementslib\models\utils.py", line 196, in init_requirement
req = HashableRequirement.parse(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\vendor\requirementslib\models\utils.py", line 186, in parse
(req,) = map(
^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\patched\pip\_vendor\pkg_resources\__init__.py", line 3174, in __init__
super(Requirement, self).__init__(requirement_string)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\patched\pip\_vendor\packaging\requirements.py", line 104, in __init__
raise InvalidRequirement(
pipenv.patched.pip._vendor.packaging.requirements.InvalidRequirement: Parse error at "'--three'":
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Scripts\pipenv.exe\__main__.py", line 7, in <module>
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\vendor\click\core.py", line 1130, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\cli\options.py", line 58, in main
return super().main(*args, **kwargs, windows_expand_args=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\vendor\click\core.py", line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\vendor\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\vendor\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\vendor\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\vendor\click\decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\vendor\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\cli\command.py", line 233, in install
do_install(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\routines\install.py", line 221, in do_install
pkg_requirement = Requirement.from_line(pkg_line)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 2465, in from_line
parsed_line = Line(line=line)
^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 162, in __init__
self.parse()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 1270, in parse
self.parse_name()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 997, in parse_name
name = self._parse_name_from_line()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 938, in _parse_name_from_line
raise RequirementError(
pipenv.vendor.requirementslib.exceptions.RequirementError: Failed parsing requirement from '--three'
页:
[1]
2