2013-07-10 25 views
5

Tôi đang chạy tán 64 bit Phiên bản: 1.0.3.1262 trên mac Mountain Lion. Tôi đã cài đặt virtualenv sử dụng easy_install. Nhưng trong khi tôi đang cố gắng để thực hiện lệnh:venv Python sử dụng không chính xác sys.prefix

virtualenv venv --distribute 

Nó cho thấy các lỗi sau:

Using base prefix '/Applications/Canopy.app/appdata/canopy-1.0.3.1262.macosx-x86_64/Canopy.app/Contents' 
New python executable in venv/bin/python 
dyld: Library not loaded: @rpath/Python 
Referenced from: /Users/xxx/Desktop/untitled folder 2/venv/bin/python 
Reason: image not found 
ERROR: The executable venv/bin/python is not functioning 
ERROR: It thinks sys.prefix is u'/Users/xxx/Desktop/untitled folder 2' (should be u'/Users/xxx/Desktop/untitled folder 2/venv') 
ERROR: virtualenv is not compatible with this system or executable 

Có bất kỳ ai có vấn đề tương tự và giải quyết nó? Cảm ơn bạn trước cho lời khuyên có giá trị.

Trả lời

3

Canopy sử dụng venv thay vì virtualenv

thiết lập môi trường của bạn như vậy Hãy thử:

venv -s path/to/virtual_environment_dir 

Trích từ: https://support.enthought.com/entries/21802240-Use-venv-not-virtualenv-with-Canopy-Python

hoặc nếu bạn muốn thiết lập một môi trường mà không có trang web hệ thống gói: Setting up a virtural enviroment (venv) with no system site packages

+0

Tôi đã thử mã này, nhưng tôi đã gặp phải một lỗi khác. –

+0

@vessilli lỗi là gì? – Ben

+0

Tôi đã khắc phục sự cố. Bạn cũng cần xác định đường dẫn của 'venv'. –

Các vấn đề liên quan