Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building PyTorch ignores my current Python version #32687

Open
franva opened this issue Jan 28, 2020 · 6 comments
Open

Building PyTorch ignores my current Python version #32687

franva opened this issue Jan 28, 2020 · 6 comments
Labels
module: build Build system issues triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@franva
Copy link

franva commented Jan 28, 2020

馃悰 Bug

I am trying to build PyTorch on my Raspberry Pi 4(Raspbian Buster) with Python 3.6.9(virtual env), but it keeps using Python 3.7

To Reproduce

Steps to reproduce the behavior:

  1. git clone https://github.com/pytorch/pytorch.git
  2. git checkout v1.3.1
  3. sudo python setup.py build

image

Expected behavior

I am expecting it copys files from python 3.6.9 virtual environment.

Environment

Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A

OS: Raspbian GNU/Linux 10 (buster)
GCC version: (Raspbian 8.3.0-6+rpi1) 8.3.0
CMake version: version 3.13.4

Python version: 3.6
Is CUDA available: N/A
CUDA runtime version: Could not collect
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect

Versions of relevant libraries:
[pip] Could not collect
[conda] Could not collect

Additional context

@mrshenli
Copy link
Contributor

Can you confirm that the Python version when you run python setup.py build is indeed 3.6.9?

@mrshenli mrshenli added module: build Build system issues triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Jan 28, 2020
@franva
Copy link
Author

franva commented Jan 28, 2020

Can you confirm that the Python version when you run python setup.py build is indeed 3.6.9?

hi @mrshenli yes, I can confirm that.
How?

python --version

I saw 3.6.9

@mrshenli
Copy link
Contributor

Marking this as "triage review" as it is not obvious to me why using PY 3.6.9 to build would load 3.7 packages.

@colesbury
Copy link
Member

It's probably because you are running sudo.

@franva
Copy link
Author

franva commented Jan 30, 2020

It's probably because you are running sudo.

hi @colesbury could you explain the reason please?

Thanks

@colesbury
Copy link
Member

sudo can change the $PATH. Try running without sudo. If that doesn't help, check $PATH and $PYTHONPATH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: build Build system issues triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

4 participants