I need Anaconda 32bit and 64bit

2019-07-18 06:45发布

I currently develop in Pycharm v4 and use Anaconda 64bit. I now need to begin using http://www.zipline.io/ which only supports Anaconda 32bit. Is there a way to have both the 32 and 64 bit versions installed and just tell Pycharm which one to use for a specific project?

Pycharm supports the creation of virtualenv environments from within the IDE, perhaps something can be done in that way? I've never used virtual environments before. Or would it be possible to just install Anaconda 32bit into it's own folder, then tell Pycharm which to use for each project.

Any advice is appreciated.


I have installed Anaconda 32 bit in a separate folder and selected this version from within Pycharm settings for the interpreter. When trying to run a basic zipline project I get the following error:

"C:\...\Anaconda3 - 32bit\python.exe" "E:/Python Projects/ZiplineTesting/Main.py"
Traceback (most recent call last):
DLL load failed: %1 is not a valid Win32 application.
File "E:/Python Projects/ZiplineTesting/Main.py", line 1, in <module>
from zipline.api import order, record, symbol
File "C:\...\AppData\Roaming\Python\Python34\site-packages\zipline\__init__.py", line 25, in <module>
    from . import data
  File "C:\...\AppData\Roaming\Python\Python34\site-packages\zipline\data\__init__.py", line 1, in <module>
    from . import loader
  File "C:\...\AppData\Roaming\Python\Python34\site-packages\zipline\data\loader.py", line 25, in <module>
    import pandas as pd
  File "C:\...\AppData\Roaming\Python\Python34\site-packages\pandas\__init__.py", line 7, in <module>
    from . import hashtable, tslib, lib
ImportError: DLL load failed: %1 is not a valid Win32 application.

Process finished with exit code 1

It's worth noting that in my code, Pycharm has highlighted my import statement as having an error (with 'order' as well as 'record'). However there is nothing wrong with the import:

from zipline.api import order, record, symbol

The error is:

Unresolved reference 'order'
This inspection detects names that should resolve but dont.
Due to dynamic dispatch and duck typing, this is possible in a limited
but useful number of cases, Top-level and class-level items are supported
better than instance items.

Any ideas on what I might be doing incorrectly? I have tried uninstalling and reinstalling zipline which hasn't helped. It seems like there is some sort of conflict with my prior 64bit stuff with the new 32bit stuff.

1条回答
贼婆χ
2楼-- · 2019-07-18 07:08

In the "Settings" menu of PyCharm look for the "Project: [project name]" section. You can select the Python interpreter used for the project from there.

As long as the 32-bit version of Anaconda is installed to a separate location from the 64-bit version, there should be no problem.

查看更多
登录 后发表回答