简体   繁体   中英

how to pipenv install 64 bit packages in virtual environement (.virtualenvs) while having both 32 bit and 64 bit versions?

I have installed both 64 and 32 bit versions of python in Windows 10:

  • 64 bit python (along with Visual Studio)
  • 32 bit python (independently, path is registered in environments path)

I am using VS Code to work on python projects. I am able to use any version of installed python including virtualenvs. Also intellisense and debugging is going great.

But when i am trying to use TensorFlow ie only available for 64 bit python. I am not finding any way to say hey use 64 bit python for this Virtual environment (pipenv).

Note: I want to use 32 bit as default in VS Code for my other projects, so changing the env path variable to 32/64 bit python again is not preferable idea.

Thank you for any suggestions in advance.

Wow! Like python, it is quite easy but remain unexplored for bit of time for me:)

Just used my 64 bit python to create the pipenv.

 & 'C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36
_64\python.exe' -m pipenv shell

Note:

  • & is used to tell powershell to consider exe path as command but not string.
  • If your 64 bit python has not pipenv installed consider adding it first with below command
 & 'C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\Python36 _64\\python.exe' -m pip install pipenv 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM