TypeError: do_file() takes at least 4 arguments (3 given)

来源:2-4 虚拟环境的安装和配置

ImCheney

2017-06-05

Mac上想新建一个python2.7, 结果遇到这个问题, 有人遇见过么?

mkvirtualenv -p /Library/Frameworks/Python.framework/Versions/2.7/bin/python env5


Running virtualenv with interpreter /Library/Frameworks/Python.framework/Versions/2.7/bin/python

New python executable in /Users/Chen/.virtualenvs/env5/bin/python

Traceback (most recent call last):

  File "//anaconda/lib/python3.5/site-packages/virtualenv.py", line 2869, in <module>

    main()

  File "//anaconda/lib/python3.5/site-packages/virtualenv.py", line 713, in main

    symlink=options.symlink)

  File "//anaconda/lib/python3.5/site-packages/virtualenv.py", line 925, in create_environment

    site_packages=site_packages, clear=clear, symlink=symlink))

  File "//anaconda/lib/python3.5/site-packages/virtualenv.py", line 1231, in install_python

    copy_exe_shared_libs_and_symlinks(executable, py_executable, home_dir)

  File "//anaconda/lib/python3.5/site-packages/virtualenv.py", line 2828, in copy_exe_shared_libs_and_symlinks

    of = codefile(f, rpaths)

  File "//anaconda/lib/python3.5/site-packages/virtualenv.py", line 2799, in codefile

    return machofile(file, list(initial_rpaths_transitive))

  File "//anaconda/lib/python3.5/site-packages/virtualenv.py", line 2422, in __init__

    _, sos = zip(*mach_o_find_dylibs(file))

  File "//anaconda/lib/python3.5/site-packages/virtualenv.py", line 2386, in mach_o_find_dylibs

    do_file(ofile, find_lc_load_dylib, offset_size(), results, regex)

  File "//anaconda/lib/python3.5/site-packages/virtualenv.py", line 2355, in do_file

    do_file(file, offset_size(offset, size), *args)

TypeError: do_file() takes at least 4 arguments (3 given)


写回答

1回答

bobby

2017-06-06

你试试不用anaconda 安装python试试呢

0
2
ImCheney
我把 .bash_profile中的anaconda的部分注释掉了, 直接使用常规的python, 然后一切问题解决了.
2017-06-16
共2条回复

Scrapy打造搜索引擎 畅销4年的Python分布式爬虫课

带你彻底掌握Scrapy,用Django+Elasticsearch搭建搜索引擎

5796 学习 · 6290 问题

查看课程