Install script: can't open file virtualenv.py, no such file
See original GitHub issueSystem Details
macOS Sierra 10.12.6 using pyenv to build python 2.7 (workaround for macOS issue with pre-TLS OpenSSL) Python 2.7.15 OpenSSL 1.0.2p 14 Aug 2018
Error Messages
$ curl -sf https://www.getlektor.com/install.sh | sh
Welcome to Lektor
This script will install Lektor on your computer.
Lektor seems to be installed already.
Continuing will delete:
/usr/local/lib/lektor
and remove this symlink:
/usr/local/bin/lektor
Continue? [Yn]
Installing at:
bin: /usr/local/bin
app: /usr/local/lib/lektor
Continue? [Yn]
/Users/rob/.pyenv/versions/2.7.15/bin/python: can't open file './virtualenv.py': [Errno 2] No such file or directory
Traceback (most recent call last):
File "<stdin>", line 148, in <module>
File "<stdin>", line 143, in main
File "<stdin>", line 107, in install
File "/Users/rob/.pyenv/versions/2.7.15/lib/python2.7/subprocess.py", line 394, in __init__
errread, errwrite)
File "/Users/rob/.pyenv/versions/2.7.15/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Interpretation
The expected file, virtualenv.py
, is in the src
directory, not the root directory, in the current tar file. The current tar file in my case seems to be:
https://files.pythonhosted.org/packages/4e/8b/75469c270ac544265f0020aa7c4ea925c5284b23e445cf3aa8b99f662690/virtualenv-16.1.0.tar.gz
Proposed Solution:
Update installer logic near line 124 to also look for virtualenv.py
in ./src
.
Popen([sys.executable, './virtualenv.py', lib_dir], cwd=t).wait()
For my system, install.sh
worked after changing line 124 to this:
Popen([sys.executable, './src/virtualenv.py', lib_dir], cwd=t).wait()
Issue Analytics
- State:
- Created 5 years ago
- Reactions:11
- Comments:15 (3 by maintainers)
Top Results From Across the Web
python - Virtualenv returning a 'No such file or directory...' error
I am using Ubuntu 11.10 and Python 2.7. EDIT: Figured it out. I originally installed it with pip, so I uninstalled via pip...
Read more >Installation: activate_this.py "No such file" - Google Groups
This seems to be a command in the file virtualenv.py, but I am a little lost on how to troubleshoot this.. python: can't...
Read more >venv — Creation of virtual environments — Python 3.11.1 ...
Running this command creates the target directory (creating any parent directories that don't exist already) and places a pyvenv.cfg file in it with...
Read more >How To Set Up a Virtual Python Environment (Windows)
virtualenv is a tool to create isolated Python environments. ... command creates a file called requirements.txt that enumerates the installed packages.
Read more >Installing and using virtualenv with Python 3
pip3 is not installed on the server by default. You must first install a custom version of Python 3. This custom installation of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @renateEta, this is probably because the installer is currently broken (see #720). You should be able to install it by downloading the suggested fixed script from https://raw.githubusercontent.com/lektor/lektor/5f2c070f6c89df5fbfb6cdf8c539207b925c59d8/bin/install.py and then run it using Python.
In a terminal you’d do:
This commit is what broke this: https://github.com/pypa/virtualenv/commit/af5711ca9346b265f196a9cf266cecda9bca5b91#diff-51642b24ac9529f4baa0f483fa257d2d
First released in Virtualenv 16.1.0 on October 31 2018.