这篇博客给出了virtualenv无法安装pycurl的解决方法:
http://eon01.com/blog/hacking-pycurl-installation-problem-within-virtualenv/
引用博客如下:
I had problems installing PycURL within the virtual environment created using Virtualenv.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
pip
install
pycurl
Downloading
/
unpacking
pycurl
Downloading
pycurl
-
7.19.5.1.tar.gz
(
142kB
)
:
142kB
downloaded
Running
setup
.py
(
path
:
env
/
build
/
pycurl
/
setup
.py
)
egg_info
for
package
pycurl
Traceback
(
most
recent
call
last
)
:
File
"<string>"
,
line
17
,
in
<
module
>
File
"env/build/pycurl/setup.py"
,
line
634
,
in
<
module
>
ext
=
get_extension
(
split_extension_source
=
split_extension_source
)
File
"env/build/pycurl/setup.py"
,
line
392
,
in
get_extension
ext_config
=
ExtensionConfiguration
(
)
File
"env/build/pycurl/setup.py"
,
line
65
,
in
__init__
self
.configure
(
)
File
"env/build/pycurl/setup.py"
,
line
100
,
in
configure_unix
raise
ConfigurationError
(
msg
)
__main__
.ConfigurationError
:
Could
not
run
curl
-
config
:
[
Errno
2
]
No
such
file
or
directory
Complete
output
from
command
python
setup
.py
egg_info
:
Traceback
(
most
recent
call
last
)
:
File
"<string>"
,
line
17
,
in
<
module
>
File
"env/build/pycurl/setup.py"
,
line
634
,
in
<
module
>
ext
=
get_extension
(
split_extension_source
=
split_extension_source
)
File
"env/build/pycurl/setup.py"
,
line
392
,
in
get_extension
ext_config
=
ExtensionConfiguration
(
)
File
"env/build/pycurl/setup.py"
,
line
65
,
in
__init__
self
.configure
(
)
File
"env/build/pycurl/setup.py"
,
line
100
,
in
configure_unix
raise
ConfigurationError
(
msg
)
__main__
.ConfigurationError
:
Could
not
run
curl
-
config
:
[
Errno
2
]
No
such
file
or
directory
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
Cleaning
up
.
.
.
Command
python
setup
.py
egg_info
failed
with
error
code
1
in
env
/
build
/
pycurl
Storing
debug
log
for
failure
in
.pip
/
pip
.log
|
I tried many of the recommended solutions on Stackoverflow and some Google discussion groups. Nothing !?
Well a fast dirty hack to resolve this is to deactivate your virtual environment if it is activated:
1
2
|
deactivate
|
Install PycURL on your system:
1
2
3
|
sudo
apt
-
get
install
python
-
pycurl
|
Finally, copy installed files to your virtual environment:
1
|
cp
/
usr
/
lib
/
python2
.
7
/
dist
-
packages
/
pycurl*
env
/
local
/
lib
/
python2
.
7
/
site
-
packages
/
|