-
-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tox can't find python3.x executable in virtualenv #202
Comments
Thanks! But should I really have to use another plugin to get the expected behaviour? To me it just feels like there should be a pythonX.Y symlink in the virtualenv's bin folder after creating a new virtualenv. Since the executables are present in the system's python and also pyenv installed python versions I'd expect to find similar symlinks in the virtualenvs as well. But if you disagree, feel free to close this issue. |
I'm with @gangefors on this. Is there a reason that said symlinks can't be created automatically by pyenv? |
If you think so, just write something by yourself. |
To anyone that finds this thread and experience the same issue and don't want to use yet another plugin to solve it. I've found a workaround to this issue. By specifying exactly which python binary you want to use you can get the expected behaviour.
will create a virtualenv with the following contents in ./bin
The plugin (probably the python |
I have same problem:
I could not get However @gangefors suggestion above does work If I delete my virtualenv and recreate it with So it seems to be down to pyenv-virtualenv not creating the |
@yyuu I would like to solve this, preferrably in the same place as where the Could you point me in the right direction? |
Possibly related to #206 |
@gangefors : The solution you suggested (pyenv virtualenv -p python3.5 3.5.3 myenv) works. ERROR: py36: Error creating virtualenv. Note that some special characters (e.g. ':' and unicode symbols) in paths are not supported by virtualenv. Error details: InvocationError('Failed to get version_info for python3.6: b"pyenv: python3.6: command not found\n\nThe `python3.6' command exists in these Python versions:\n 3.6.0\n 3.6.1\n\n"',) How do we overcome this issues ? Can you suggest please ? |
@madhurabhogate I would suggest that you create different venvs for different python versions. Then you can use them at the same time with
|
@gangefors : Thank you. An example would be really helpful :) |
you can try: pyenv shell 3.5.3
ref: pyenv/pyenv#856 |
Note that there is a small typo in @gangefors 's example (at least for pyenv 1.2.7) with a flag: $ brew install pyenv-virtualenv
$ pyenv virtualenv -p python3.5 3.5.6 py35
$ pyenv virtualenv -p python3.6 3.6.6 py36
$ pyenv virtualenv -p python3.7 3.7.0 py37
$ pyenv shell py35 py36 py37 If using with tox, order of cmds seems to be a tiny bit finnicky and very particular: $ pyenv shell py35 py36 py37
$ python3.7 -m venv venv
$ source ./venv/bin/activate
$ tox |
The issue for me was simply a case of not having the Pythons on the pyenv path. Fixed by adding them to the path: pyenv local 3.7.2 3.6.8 3.5.6 pypy3.5-6.0.0 pypy2.7-6.0.0 |
I did |
i was able to fix this in a docker build here The "gist" of it all is below:
|
After creating a virtualenv with:
I'm not able to run tox with this ini file:
The following error appears:
After checking my virtualenv it's clear that it doesn't contain a python3.5 symlink.
After creating the
python3.5 -> python
symlink manually tox executed without any errors.Shouldn't all executables (python, pythonx and python x.y) be available in the virtualenv?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: