简体   繁体   English

运行时错误:$ virtualenv --python = / usr / bin / python2.7 <path/to/new/project/> name_project

[英]Error when run: $ virtualenv --python=/usr/bin/python2.7 <path/to/new/project/> name_project

I can't install virtualenv with python2.7 on Mac 我无法在Mac上使用python2.7安装virtualenv

Mac version:
High Sierra 10.13.6

$ python --version
Python 2.7.15

$ which virtualenv
/usr/local/bin/virtualenv

$ virtualenv --python=/usr/bin/python2.7 <path/to/new/project/> name_project
env: /Applications/djangostack-1.8.17-0/python/bin/python: No such file or directory

I search in directory folders and i have some pythons: 我在目录文件夹中搜索,并且有一些python:

1 -> /usr/bin/python2.7
2 -> /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
3 -> /usr/local/bin/python2.7

I don't know how to fix the error. 我不知道如何解决该错误。 Help please and thanks in advance. 请帮助,并提前致谢。

It looks like your virtualenv command has been installed by djangostack , whatever that is, and djangostack has been removed since, leaving a dangling command in your PATH. 看起来djangostack已安装了您的virtualenv命令,无论如何,并且djangostack已被删除,从而在PATH中留下了悬空命令。

Try which virtualenv to see what's actually being run. 尝试使用which virtualenv来查看实际正在运行的内容。

You can also use python -m virtualenv --python ... to directly run your python interpreter's virtualenv module (providing it's installed); 您还可以使用python -m virtualenv --python ...直接运行python解释器的virtualenv模块( python -m virtualenv --python ...是已安装); the results are exactly the same. 结果完全一样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 VirtualEnv python2.7错误 - VirtualEnv python2.7 error 获取usr / bin / python2.7:那里没有这样的文件或目录 - Getting usr/bin/python2.7: No such file or directory when it's there 运行 pipenv, mkdocs 时出错:/usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory - Error running pipenv, mkdocs : /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory 为Python2.7安装virtualenv - Installing virtualenv for Python2.7 python2.7名称&#39;__path__&#39;未定义 - python2.7 name '__path__' is not defined OS X上的/ usr / bin / python vs /opt/local/bin/python2.7 - /usr/bin/python vs /opt/local/bin/python2.7 on OS X 项目模块导入-Python2.7 [入门] - Project module imports - Python2.7 [Beginner] 错误:无法创建'/usr/local/lib/python2.7/dist-packages/virtualenv_support':权限被拒绝 - error: could not create '/usr/local/lib/python2.7/dist-packages/virtualenv_support': Permission denied Xcode swift iOS 尝试构建项目时出现“usr/bin/python 没有这样的文件或目录”错误 - Xcode swift iOS project gives "usr/bin/python no such file or directory" error when try to build project 在 Mac 上运行 S3 命令时获取“/usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directo” - Getting "/usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directo" when running S3 command on Mac
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM