pyenv-virtualenv
pyenv-virtualenv copied to clipboard
Can't install virtualenv
Hello all,
I'm on MACOS catalina, when trying to issue:
virtualenv --python=which python3 venv
I'm getting
Running virtualenv with interpreter /usr/bin/python3
Already using interpreter /Applications/Xcode.app/Contents/Developer/usr/bin/python3
Using base prefix
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7'
New python executable in /Users/david/Documents/vozelia/aws-codecommit/voice-infra-api/venv/bin/python3
f1: /Applications/Xcode.app/Contents/Developer/usr/bin/python3
f2: /Users/david/Documents/vozelia/aws-codecommit/voice-infra-api/venv/bin/python3
Not overwriting existing python script /Users/david/Documents/vozelia/aws-codecommit/voice-infra-api/venv/bin/python (you must use /Users/david/Documents/vozelia/aws-codecommit/voice-infra-api/venv/bin/python3)
f1: None
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/virtualenv.py", line 2635, in <module>
main()
File "/usr/local/lib/python3.7/site-packages/virtualenv.py", line 870, in main
symlink=options.symlink,
File "/usr/local/lib/python3.7/site-packages/virtualenv.py", line 1156, in create_environment
install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages=site_packages, clear=clear, symlink=symlink)
File "/usr/local/lib/python3.7/site-packages/virtualenv.py", line 1621, in install_python
shutil.copy(original_python, py_executable)
File
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/shutil.py", line 245, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/shutil.py", line 103, in copyfile
if _samefile(src, dst):
File
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/shutil.py", line 88, in _samefile
return os.path.samefile(src, dst)
File
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/genericpath.py", line 97, in samefile
s1 = os.stat(f1)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
Already tried reinstalling virtualenv, i'm on
virtualenv --version 16.7.2
It's failing on
Are two filenames really pointing to the same file?
def samefile(f1, f2):
"""Test whether two pathnames reference the same actual file"""
print("f1: %s" % f1)
s1 = os.stat(f1)
print("f2: %s" % f2)
s2 = os.stat(f2)
return samestat(s1, s2)
I put those prints there, i see first:
f1: /Applications/Xcode.app/Contents/Developer/usr/bin/python3
f2: /Users/david/Documents/vozelia/aws-codecommit/voice-infra-api/venv/bin/python3
but then
Not overwriting existing python script /Users/david/Documents/vozelia/aws-codecommit/voice-infra-api/venv/bin/python (you must use /Users/david/Documents/vozelia/aws-codecommit/voice-infra-api/venv/bin/python3)
f1: None
Traceback (most recent call last):
Any help is greatly appreciated!
David