Skip to content

ERROR: Environment does not contain activate script. #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
quantitative-technologies opened this issue Jun 24, 2024 · 5 comments
Open
Labels
question Further information is requested

Comments

@quantitative-technologies

I'm using Ubuntu 22.04.2 on an AWS server.

virtualenvwrapper was installed the same way I have done for years.

But now when I try to create a virtualenv I get the error:

ubuntu@ip-172-31-36-200:~$ mkvirtualenv bot                                                                                                                                                                        
created virtual environment CPython3.10.12.final.0-64 in 1039ms                                                                                                                                                    
  creator CPython3Posix(dest=/home/ubuntu/.virtualenvs/bot, clear=False, no_vcs_ignore=False, global=False)                                                                                                        
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/ubuntu/.local/share/virtualenv)                                                                     
    added seed packages: pip==24.1, setuptools==70.1.0, wheel==0.43.0                                                                                                                                              
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator                                                                                                      
virtualenvwrapper.user_scripts creating /home/ubuntu/.virtualenvs/bot/bin/predeactivate                                                                                                                            
virtualenvwrapper.user_scripts creating /home/ubuntu/.virtualenvs/bot/bin/postdeactivate                                                                                                                           
virtualenvwrapper.user_scripts creating /home/ubuntu/.virtualenvs/bot/bin/preactivate                                                                                                                              
virtualenvwrapper.user_scripts creating /home/ubuntu/.virtualenvs/bot/bin/postactivate                                                                                                                             
virtualenvwrapper.user_scripts creating /home/ubuntu/.virtualenvs/bot/bin/get_env_details                                                                                                                          
ERROR: Environment '/home/ubuntu/.virtualenvs/bot' does not contain an activate script.                                                                                                                            
@dhellmann
Copy link
Contributor

Which version of virtualenv are you using?

@quantitative-technologies
Copy link
Author

Hello,

This is occurring with 20.26.3:

ubuntu@ip-172-31-36-200:~$ pip show virtualenv
Name: virtualenv
Version: 20.26.3
Summary: Virtual Python Environment builder
Home-page: https://github.com/pypa/virtualenv
Author: 
Author-email: 
License: 
Location: /home/ubuntu/.local/lib/python3.10/site-packages
Requires: distlib, filelock, platformdirs
Required-by: virtualenvwrapper

@dhellmann
Copy link
Contributor

Does /home/ubuntu/.virtualenvs/bot/bin/activate exist and is it a file?

@quantitative-technologies
Copy link
Author

Correct:

ubuntu@ip-172-31-36-200:~/.virtualenvs/bot/bin$ ls -l
total 76
-rw-rw-r-- 1 ubuntu ubuntu 2241 Jun 24 22:21 activate
-rw-rw-r-- 1 ubuntu ubuntu 1500 Jun 24 22:21 activate.csh
-rw-rw-r-- 1 ubuntu ubuntu 3064 Jun 24 22:21 activate.fish
-rw-rw-r-- 1 ubuntu ubuntu 2748 Jun 24 22:21 activate.nu
-rw-rw-r-- 1 ubuntu ubuntu 1653 Jun 24 22:21 activate.ps1
-rw-rw-r-- 1 ubuntu ubuntu 1303 Jun 24 22:21 activate_this.py
-rwxr-xr-x 1 ubuntu ubuntu  150 Jun 24 22:21 get_env_details
-rwxrwxr-x 1 ubuntu ubuntu  245 Jun 24 22:21 pip
-rwxrwxr-x 1 ubuntu ubuntu  245 Jun 24 22:21 pip-3.10
-rwxrwxr-x 1 ubuntu ubuntu  245 Jun 24 22:21 pip3
-rwxrwxr-x 1 ubuntu ubuntu  245 Jun 24 22:21 pip3.10
-rw-r--r-- 1 ubuntu ubuntu   72 Jun 24 22:21 postactivate
-rw-r--r-- 1 ubuntu ubuntu   74 Jun 24 22:21 postdeactivate
-rwxr-xr-x 1 ubuntu ubuntu   69 Jun 24 22:21 preactivate
-rw-r--r-- 1 ubuntu ubuntu   75 Jun 24 22:21 predeactivate
lrwxrwxrwx 1 ubuntu ubuntu   16 Jun 24 22:21 python -> /usr/bin/python3
lrwxrwxrwx 1 ubuntu ubuntu    6 Jun 24 22:21 python3 -> python
lrwxrwxrwx 1 ubuntu ubuntu    6 Jun 24 22:21 python3.10 -> python
-rwxrwxr-x 1 ubuntu ubuntu  232 Jun 24 22:21 wheel
-rwxrwxr-x 1 ubuntu ubuntu  232 Jun 24 22:21 wheel-3.10
-rwxrwxr-x 1 ubuntu ubuntu  232 Jun 24 22:21 wheel3
-rwxrwxr-x 1 ubuntu ubuntu  232 Jun 24 22:21 wheel3.10

@dhellmann
Copy link
Contributor

Do you have any other overrides or shell aliases for commands like ls or find? What other virtualenvwrapper settings do you have configured?

@dhellmann dhellmann added the question Further information is requested label Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants