davidmarble / virtualenvwrapper-win

Port of Doug Hellmann's virtualenvwrapper to Windows batch scripts
Other
461 stars 106 forks source link

add2virtualenv gives error "\.venv\Lib\site-packages\virtualenv_path_extensions.pth was unexpected at this time." #116

Open atulmahankal opened 3 years ago

atulmahankal commented 3 years ago

When I run command: add2virtualenv C:/Users/atulm/OneDrive/Documents/Python/myModules

it give bellow error: add2virtualenv gives error ".venv\Lib\site-packages\virtualenv_path_extensions.pth was unexpected at this time."

I am facing problem only when I run the command from path having space e.g.: Error Path: C:\Users\atulm\OneDrive\Documents\Python\pygubu designer no Error on "C:\Users\atulm\OneDrive\Documents\Python\pygubu_designer"

I have some folders which I can't change the name

How can I add my Common script files in a virtual environment?

thebjorn commented 3 years ago

Please provide complete instructions on how to reproduce your problem.

atulmahankal commented 2 years ago

add2virtualenv "C:\Users\atulm\OneDrive\Documents\Python\pygubu designer"

above command not work for me.

thebjorn commented 2 years ago

Works for me:

go|c:\work> mkvirtualenv issue116
created virtual environment CPython3.5.4.final.0-32 in 4208ms
  creator CPython3Windows(dest=c:\srv\venv\issue116, clear=False, global=False)
  seeder FromAppData(download=False, wheel=bundle, setuptools=bundle, pip=bundle, via=copy, app_data_dir=C:\Users\bp\AppData\Local\pypa\virtualenv)
    added seed packages: pip==20.3.4, setuptools==50.3.2, wheel==0.37.0
  activators FishActivator,XonshActivator,BashActivator,PythonActivator,BatchActivator,PowerShellActivator

(issue116) go|c:\work> mkdir "path with spaces"

(issue116) go|c:\work> add2virtualenv "path with spaces"

    "path with spaces" added to
    c:\srv\venv\issue116\Lib\site-packages\virtualenv_path_extensions.pth

(issue116) go|c:\work> mkdir "other path with spaces"

(issue116) go|c:\work> add2virtualenv "c:\work\other path with spaces"

    "c:\work\other path with spaces" added to
    c:\srv\venv\issue116\Lib\site-packages\virtualenv_path_extensions.pth

(issue116) go|c:\work>