Comments (9)
Are you in Python 3?
from conda-build.
My root environment is python 2.7-based (full anaconda, i.e. not miniconda). This bug is reproducible with either value of %CONDA_PY% (33 and 27).
from conda-build.
Here is a simple test case:
>>> import subprocess
>>> subprocess.Popen(["cmd.exe"], env={u"TEST": ""})
File "C:\Anaconda\envs\py27\lib\subprocess.py", line 957, in _execute_child
startupinfo)
TypeError: environment can only contain strings
>>> subprocess.Popen(["cmd.exe"], env={"TEST": ""})
<subprocess.Popen object at 0x0000000002A37748>
Note that this is an issue on Python 2 only, because in Python 3 u"str" is "str"
.
from conda-build.
The important thing is the version of Python that conda itself is running in. Python 3 has no "unicode strings".
from conda-build.
I guess an easy fix would be to call str
on each variable. This will be a no-op in Python 3 and convert unicode to str in Python 2. If any of the strings contain non-ascii characters it will fail, but looking through the code, I don't think that can happen.
from conda-build.
There is a similar problem with "conda skeleton pypi" for 2.7 on win-64.
> conda skeleton pypi watchdog
Using url https://pypi.python.org/packages/source/w/watchdog/watchdog-0.8.0.tar.gz (152770) for watchdog.
Downloading watchdog (use --no-download to skip this step)
Unpacking watchdog...
done
working in c:\users\matthe~1\appdata\local\temp\tmphybgnbconda_skeleton_watchdog
Fetching package metadata: ....
Solving package specifications: .
The following packages will be downloaded:
package | build
---------------------------|-----------------
python-2.7.8 | 0 17.1 MB
The following packages will be UN-linked:
package | build
---------------------------|-----------------
python-2.7.7 | 2
The following packages will be linked:
package | build
---------------------------|-----------------
python-2.7.8 | 0 hard-link
pyyaml-3.11 | py27_0 hard-link
Fetching packages ...
python-2.7.8-0 100% |###############################| Time: 0:00:27 659.82 kB/s
Extracting packages ...
[ COMPLETE ] |#################################################| 100%
Unlinking packages ...
[ COMPLETE ] |#################################################| 100%
Linking packages ...
[ COMPLETE ] |#################################################| 100%
Applying patch: u'c:\\users\\matthe~1\\appdata\\local\\temp\\tmphybgnbconda_skeleton_watchdog\\pypi-distutils.patch'
patching file core.py
Hunk #1 succeeded at 169 with fuzz 2 (offset 2 lines).
Traceback (most recent call last):
File "C:\Anaconda\Scripts\conda-skeleton-script.py", line 4, in <module>
sys.exit(main())
File "C:\Anaconda\lib\site-packages\conda_build\main_skeleton.py", line 124, in main
args.func(args, p)
File "C:\Anaconda\lib\site-packages\conda_build\main_skeleton.py", line 135, in execute
pypi.main(args, parser)
File "C:\Anaconda\lib\site-packages\conda_build\pypi.py", line 313, in main
run_setuppy(src_dir, tempdir, args)
File "C:\Anaconda\lib\site-packages\conda_build\pypi.py", line 491, in run_setuppy
subprocess.check_call(args, env=env)
File "C:\Anaconda\lib\subprocess.py", line 535, in check_call
retcode = call(*popenargs, **kwargs)
File "C:\Anaconda\lib\subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "C:\Anaconda\lib\subprocess.py", line 709, in __init__
errread, errwrite)
File "C:\Anaconda\lib\subprocess.py", line 957, in _execute_child
startupinfo)
TypeError: environment can only contain strings
> conda info
Current conda install:
platform : win-64
conda version : 3.5.5
python version : 2.7.6.final.0
root environment : C:\Anaconda (writable)
default environment : C:\Anaconda
envs directories : C:\Anaconda\envs
package cache : C:\Anaconda\pkgs
channel URLs : http://repo.continuum.io/pkgs/free/win-64/
http://repo.continuum.io/pkgs/pro/win-64/
config file : C:\Users\matthewtopper\.condarc
is foreign system : False
from conda-build.
This should be fixed in the latest version of conda-build. conda update conda-build
.
from conda-build.
Yes, thanks. I was using 1.3.1. Perhaps worth including this update in the anaconda package? I updated anaconda to 2.0.1 yesterday.
from conda-build.
Hi there, thank you for your contribution!
This issue has been automatically locked because it has not had recent activity after being closed.
Please open a new issue if needed.
Thanks!
from conda-build.
Related Issues (20)
- Release 24.3.x HOT 1
- Don't bother to produce repodata.json.bz2 when calling conda-index internally
- Update conda-build to remove libarchive-style zstd:compression-level compression tuple
- Stdlib: c_stdlib_version falsely determined as unset HOT 9
- conda constructor never exits when "No space left on device" HOT 1
- Conda-build tutorial needs to be updated HOT 1
- FileNotFoundError: [WinError 2]
- Recipe rendering very slow in certain cases HOT 3
- conda-build not yet compatible with LIEF 0.14 API changes
- windows build failure trying to rename directory held by different process HOT 1
- Conda index CLI reference page maybe should be updated to reference separate conda-index tool HOT 1
- Conda mis-resolved the python version requirement the excluded the specified one HOT 1
- Remove `sys.exit` calls HOT 2
- noarch generic doesn't work as expected when python in host in multi-output HOT 1
- `PackagesNotFound` not converted to `DependencyNeedsBuildingError` HOT 1
- `"safe_dump()" has been removed` error using `conda skeleton pypi pod5` HOT 4
- Long `conda info` error messages for common exceptions HOT 1
- Regression: CondaMemoryError when building HOT 6
- Conda build is stuck with some unrelated build aterfacts. Unable to purge them.
- Limit logging config to CLI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conda-build.