小编Ten*_*rei的帖子

VirtualEnv和python-embed

我有一台使用Python 2运行许多应用程序的Windows计算机。我想添加一个我使用Python 3编写的新程序。为确保我不会搞砸任何东西,我想使用嵌入了Python 3的Virtualenv(嵌入Python 3) amd64)。

因此,我提取了嵌入式python 3,并尝试在启用--python选项的情况下运行virualenv。

我尝试运行virtualenv

    python -m virtualenv --python E:\Projects\python3-embed\python.exe E:\Projects\Virtual\
Run Code Online (Sandbox Code Playgroud)

我得到了这个错误:

Running virtualenv with interpreter E:\Projects\python3-embed\python.exe
Using base prefix 'E:\\Projects\\python3-embed'
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\virtualenv.py", line 2328, in <module>
    main()
  File "C:\Python27\lib\site-packages\virtualenv.py", line 713, in main
    symlink=options.symlink)
  File "C:\Python27\lib\site-packages\virtualenv.py", line 925, in create_environment
    site_packages=site_packages, clear=clear, symlink=symlink))
  File "C:\Python27\lib\site-packages\virtualenv.py", line 1147, in install_python
    writefile(site_filename_dst, SITE_PY)
  File "C:\Python27\lib\site-packages\virtualenv.py", line 362, in writefile
    with open(dest, 'wb') as f:
FileNotFoundError: [Errno 2] No such file …
Run Code Online (Sandbox Code Playgroud)

embed virtualenv python-3.x

6
推荐指数
1
解决办法
1492
查看次数

无法使用实例引用访问C#成员

所以我有这些变量

List<string> files, images = new List<string>();
string rootStr;
Run Code Online (Sandbox Code Playgroud)

而这个线程功能

private static int[] thread_search(string root,List<string> files, List<string> images)
Run Code Online (Sandbox Code Playgroud)

但是当我尝试启动线程时:

trd = new Thread(new ThreadStart(this.thread_search(rootStr,files,images)));
Run Code Online (Sandbox Code Playgroud)

我收到此错误:

错误1成员'UnusedImageRemover.Form1.thread_search(string,System.Collections.Generic.List,System.Collections.Generic.List)'无法使用实例引用访问; 使用类型名称来限定它而不是E:\ Other\Projects\UnusedImageRemover\UnusedImageRemover\Form1.cs 149 46 UnusedImageRemover

你能告诉我我做错了什么吗?

c# static multithreading private member

2
推荐指数
1
解决办法
6584
查看次数

标签 统计

c# ×1

embed ×1

member ×1

multithreading ×1

private ×1

python-3.x ×1

static ×1

virtualenv ×1